Loads WRCC station metadata and data from the rawsDataDir
. If the
data is not in this directory, this will download and save the data.
wrcc_loadYear(
wrccID = NULL,
meta = NULL,
year = NULL,
newDownload = NA,
password = NULL,
baseUrl = "https://wrcc.dri.edu/cgi-bin/wea_list2.pl",
verbose = TRUE
)
RAWS station identifier (will be upcased)
Tibble of WRCC station metadata.
Year to access station data for.
Logical flag specifying whether or not to download and override existing data.
Password required for access to archival data.
Base URL for data queries.
Logical flag controlling detailed progress statements.
Timeseries object with 'meta' and 'data'.
The `newDownload` parameter has three possible settings:
NA
-- Download data if it is not found in rawsDataDir
TRUE
-- Always download data, overwriting existing data in rawsDataDir
.
This is useful for updating data files with more recent data.
FALSE
-- Never download data. This is useful when working with
wrcc_loadMultiple and archival data to avoid continually requesting
data for stations which have no data over a particular time period.
wrcc_createRawsObject
setRawsDataDir
if (FALSE) {
# Fail gracefully if any resources are not available
try({
library(RAWSmet)
setRawsDataDir("~/Data/RAWS/")
wa_meta <- wrcc_loadMeta(stateCode = "WA")
rawsObject <- wrcc_loadYear(
wrccID = "waWENU",
meta = wa_meta,
year = 2020,
password = MY_PASSWORD
)
dplyr::glimpse(rawsObject)
}, silent = FALSE)
}