Description Usage Arguments Value Note References See Also Examples
View source: R/wrcc_createRawDataframe.R
Obtains monitor data from a WRCC webservice and converts
it into a quality controlled, metadata enhanced "raw" tibble
ready for use with all raw_~
functions.
Steps involved include:
download CSV text
parse CSV text
apply quality control
apply clustering to determine unique deployments
enhance metadata to include: elevation, timezone, state, country, site name
1 2 3 4 5 6 7 8 9 | wrcc_createRawDataframe(
startdate = strftime(lubridate::now(tzone = "UTC"), "%Y010100", tz = "UTC"),
enddate = strftime(lubridate::now(tzone = "UTC"), "%Y%m%d23", tz = "UTC"),
unitID = NULL,
clusterDiameter = 1000,
baseUrl = "https://wrcc.dri.edu/cgi-bin/wea_list2.pl",
saveFile = NULL,
flagAndKeep = FALSE
)
|
startdate |
Desired start date (integer or character representing YYYYMMDD[HH]). |
enddate |
Desired end date (integer or character representing YYYYMMDD[HH]). |
unitID |
Station identifier (will be upcased). |
clusterDiameter |
Diameter in meters used to determine the number of clusters (see |
baseUrl |
Base URL for data queries. |
saveFile |
Optional filename where raw CSV will be written. |
flagAndKeep |
Flag, rather then remove, bad data during the QC process. |
Raw tibble of WRCC data.
The downloaded CSV may be saved to a local file by providing an argument to the saveFile
parameter.
Monitor unitIDs can be found at https://wrcc.dri.edu/cgi-bin/smoke.pl.
Fire Cache Smoke Monitoring Archive
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
# Fail gracefully if any resources are not available
try({
library(PWFSLSmoke)
tbl <- wrcc_createRawDataframe(20150701, 20150930, unitID = 'SM16')
dplyr::glimpse(tbl)
}, silent = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.