View source: R/handle_cdc_germany.R
handle_cdc_germany | R Documentation |
This function access the Climate Data Center - CDC and allows to:
1) obtain information of the weather stations from Germany.
2) get weather data for one or more specific places of interest given the ID of the weather station.
handle_cdc_germany( action, variables, location = NA, begin = 19160101, end = chillR::Date2YEARMODA(Sys.Date()), number_of_stations = 25, add.DATE = FALSE, quiet = FALSE )
action |
is a character string to decide on 2 modes of action for the function.
|
variables |
is a character vector representing the variables requested For now, the function can return the wind speed (mean - "Wind_speed" and maximum - "Wind_speed_max"); the atmospheric pressure ("ATM_pressure"); the rainfall ("Rainfall"); the precipitation as snow ("Snow"), the minimum temperature 5 cm above the ground ("Tmin_5cm"); the air temperature 2 m above ground (minimum - "Tmin", mean - "Tmean", and maximum - "Tmax"); the relative humidity ("RH"); and the vapor pressure deficit ("VPD"). |
location |
accepts a numeric vector with two elements representing the longitude and latitude of a
given place or a vector of character strings representing the ID of the weather stations of interest.
If |
begin |
is a numeric parameter representing the start date for the period required. This must be specified in YEARMODA format. |
end |
is a numeric parameter representing the end date for the period required. This must be specified in YEARMODA format. |
number_of_stations |
is a numeric parameter defininf the numbers of stations to select from. |
add.DATE |
is a boolean parameter to be passed to |
quiet |
is a boolean parameter to be passed to |
If "list_stations" is used, the function returns a dataframe (9 columns x number_of_stations
rows) containing
information such as the name, latitude, longitude, begin, end and distance of the weather stations.
If "download_weather" is chosen, it downloads the weather data from the CDC website. The output is
a dataframe (in chillR
format) for all stations selected in the location parameter.
handle_cdc_germany(action = "list_stations", variables = c("Tmin", "Tmax", "Tmean"), location = c(latitude = 53.5373, longitude = 9.6397), begin = 20000101, end = 20101231, number_of_stations = 25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.