View source: R/import_annual.R
import_annual | R Documentation |
This function imports annual temperature and precipitation data from ClimateAnalyzer.org into R.
import_annual(
station_id,
start_year,
end_year = NULL,
screen_blanks = "true",
remove_missing = TRUE,
convert = FALSE
)
station_id |
The character string of the station_id field from
|
start_year |
The four digit number of the first year of interest. |
end_year |
The four digit number of the last year of interest. Default is NULL. If NULL, current year will be used. |
screen_blanks |
A character string stating if years with 15 or more missing values will be screened out and the data replaced with NA. Options are 'true' or 'false', in lower case not upper case. This object is included directly into the URL to retrieve the data from ClimateAnalyzer.org. |
remove_missing |
Logical. If TRUE, columns that tally missing values are excluded from result. If FALSE, these columns are included in the result. Default is TRUE. |
convert |
Logical. If TRUE, data are precipitation and temperature values are converted to metric. These converted values are included as additional columns in the data frame denoted by "_mm" or "_C". Default is FALSE. |
A tibble
.
The import_data
wrapper function.
library(climateAnalyzeR)
# Import annual temperature and precipitation data
import_annual(station_id = "zion_np", start_year = 1980)
# Import annual temperature and precipitation data and convert values to metric
import_annual(station_id = "zion_np", start_year = 1980, end_year = 2020,
convert = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.