View source: R/handle_chile_cr2_prec.R
handle_chile_cr2_prec | R Documentation |
This function allows to obtain information about weather stations located in Chile as well as a data frame containing historical records of daily precipitation from those weather stations. This function works with data from the website of the Center for Climate and Resilience Research (CR)2 sponsored by the University of Chile. The function allows to download the data (only recommended once) as well as to handle zip files previously downloaded. Data can be manually downloaded from the following link
handle_chile_cr2_prec( action, begin = 19500101, end = 20180309, latitude, longitude, number_of_stations = 25, path_zip_prec = NULL, stations_df = NULL, keep_data = TRUE )
action |
Character string input that defines the kind of data required. There are three options for this parameter:
|
begin |
Numeric parameter in YEARMODA format. This parameter represents the initial date of the period of interest. If it is not provided, the default is set to 19500101 which correspond to the oldest date possible to use |
end |
Numeric parameter in YEARMODA format. This parameter represents the final date of the period of interest. If it is not provided, the default is set to 20180309 which corresponds to the earliest possible date that can be used for the assessment |
latitude |
Numerical input. Latitude of the site of interest in decimal format |
longitude |
Numerical input. Longitude of the site of interest in decimal format |
number_of_stations |
Numerical input. Number of stations used as closest weather stations to the site of interest. Default option is 25 |
path_zip_prec |
Character string input. Location and name of the zip file downloaded and
containing the records for precipitation. This input must include the name and extension of the file.
Default is set to |
stations_df |
A dataframe containing the list of stations for which this function will retrieve
precipitation data. It is important that this dataframe be produced by this function under the action
"info_stations". The default is set to |
keep_data |
Boolean parameter indicating if the data downloaded should be deleted or not |
#handle_chile_cr2_prec(action = "my_data", begin = 20000101, end = 20101030, # latitude = -32.8958, longitude = -71.2092, # number_of_stations = 25, # path_zip_prec = NULL, stations_df = NULL, # keep_data = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.