R/cefa_createRawsObject.R
cefa_createRawsObject.RdObtains station data from a webservice and converts
it into a quality controlled, metadata enhanced "raw" tibble
ready for use with all raw_~ functions.
Steps involved include:
download data text
parse data text
standardized names
The columns of the 'data' dataframe include:
datetime: UTC datetime of observation
temperature: temperature (°C)
humidity: average relative humidity (%)
windSpeed: average wind speed (m/s)
windDirection: average wind direction (°)
maxGustSpeed: max gust speed (m/s)
maxGustDirection: max gust direction (°)
precipitation: precipitation (mm/hr)
solarRadiation: solar radiation (W/m^2)
fuelMoisture: 10-hour time lag fuel moisture
fuelTemperature: NA for FW13 data
cefa_createRawsObject(
nwsID = NULL,
meta = NULL,
baseUrl = "https://cefa.dri.edu/raws/fw13/",
verbose = FALSE
)Station identifier found in 'meta'.
Tibble of RAWS metadata containing nwsID.
Base URL for data queries.
Logical flag controlling detailed progress statements.
Timeseries object with 'meta' and 'data'.
if (FALSE) {
# Fail gracefully if any resources are not available
try({
library(RAWSmet)
setRawsDataDir("~/Data/RAWS")
library(MazamaSpatialUtils)
setSpatialDataDir("~/Data/Spatial")
loadSpatialData("NaturalEarthAdm1.rda")
nws_500726 <- cefa_createRawsObject(nwsID = 500726)
}, silent = FALSE)
}