R/cefa_loadMultiple.R
cefa_loadMultiple.Rd
Loads FW13 station metadata and data from the rawsDataDir
. If the
data is not in this directory, this will download and save the data.
cefa_loadMultiple(
nwsIDs = NULL,
meta = NULL,
newDownload = NA,
baseUrl = "https://cefa.dri.edu/raws/fw13/",
verbose = TRUE
)
Vector of NWS RAWS station identifiers.
Tibble of FW13 station metadata.
Logical flag stating whether or not to download and override existing data.
Base URL for data queries.
Logical flag controlling detailed progress statements.
List of timeseries objects each containing '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.
cefa_createRawsObject
cefa_load
setRawsDataDir
if (FALSE) {
# Fail gracefully if any resources are not available
try({
library(MazamaSpatialUtils)
setSpatialDataDir("~/Data/Spatial")
loadSpatialData("NaturalEarthAdm1")
library(RAWSmet)
setRawsDataDir("~/Data/RAWS")
stationMeta <- cefa_loadMeta()
nwsIDs <- c("021503", "500726", "020401")
stationData <- cefa_loadMultiple(nwsIDs = nwsIDs, meta = stationMeta)
dplyr::glimpse(stationData, width = 75)
}, silent = FALSE)
}