cefa_load | R Documentation |
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_load(
nwsID = NULL,
meta = NULL,
newDownload = NA,
baseUrl = "https://cefa.dri.edu/raws/fw13/",
verbose = TRUE
)
nwsID |
NWS RAWS station identifier. |
meta |
Tibble of FW13 station metadata. |
newDownload |
Logical flag specifying whether or not to download and override existing data. |
baseUrl |
Base URL for data queries. |
verbose |
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.
Program for Climate, Ecosystem and Fire Applications
cefa_createRawsObject
setRawsDataDir
## Not run:
# Fail gracefully if any resources are not available
try({
# For creation of metadata
library(MazamaSpatialUtils)
setSpatialDataDir("~/Data/Spatial")
loadSpatialData("NaturalEarthAdm1.rda")
library(RAWSmet)
setRawsDataDir("~/Data/RAWS")
meta <- cefa_loadMeta()
rawsObject <- cefa_load(nwsID = 451702, meta = meta)
head(rawsObject$data)
}, silent = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.