Description Usage Arguments Format Functions Source Examples
View source: R/download_province.R
Functions for accessing the Meteorological Data from the province of South Tyrol. The function
rg_province_get
can be used to download station measurements for the requested time
period and stations. Information about valid station_codes and
sensors can be retrieved using the function rg_province_info
.
1 2 3 4 5 6 7 8 9 10 | rg_province_get(
station_code,
sensor_code,
datestart = Sys.Date() - 1,
dateend = Sys.Date(),
format = "wide",
dburl = "http://daten.buergernetz.bz.it/services/meteo/v1/timeseries"
)
rg_province_info(format = "table")
|
station_code |
string; Code of the station |
sensor_code |
string; Abbreviation of the sensor of interest (e.g. "N" for Precipitation or "LT" for air temperature). Use |
datestart |
date; Starting date for the download |
dateend |
date; End date for the download |
format |
string, wide or long for a wide or long table as result for function |
dburl |
URL; URL of the Province Database |
The table returned by the function rg_progince_info
contains the following information:
ID of the station
Full name of the station
Station elevation in meters
Station longitude in EPSG:4326
Station latitude in EPSG:4326
Sensor Type
Full name of Sensor
Measurement unit of the sensor
rg_province_info
: This function returns all the metainformation of the meteorological Data from the OpenData Portal South Tyrol.
https://github.com/mattia6690/MonalisR/blob/master/R/Processing.R
1 2 3 4 5 | Get a vector of available station ids with air temperature measurements
ids <- rg_province_info() %>% filter(TYPE == 'LT') %>% pull(SCODE)
download data for all stations
data <- rg_province_get(station_code = ids, sensor_code = 'LT', datestart = as.Date('20180101', format = '%Y%m%d'), dateend = as.Date('20180105', format = '%Y%m%d'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.