Description Usage Arguments Value See Also Examples
View source: R/monitor_loadLatest.R
Wrapper function to load and combine recent data from AirNow, AIRSIS and WRCC:
1 2 3 4 | airnow <- airnow_loadLatest()
airsis <- airsis_loadLatest()
wrcc <- wrcc_loadLatest()
ws_monitor <- monitor_combine(list(airnow, airsis, wrcc))
|
If dataDir
is defined, data will be loaded from this local
dirctory. Otherwise, data will be loaded from the monitoring data repository
maintained by PWFSL.
The files loaded by this function are updated multiple times an hour and contain data for the previous 10 days.
For daily updates covering the most recent 45 days, use monitor_loadDaily()
.
For data extended more than 45 days into the past, use monitor_load()
.
Currently supported parameters include the following:
PM2.5
Avaialble RData files can be seen at: https://haze.airfire.org/monitoring/latest/RData/
1 2 3 4 5 | monitor_loadLatest(
parameter = "PM2.5",
baseUrl = "https://haze.airfire.org/monitoring/latest/RData/",
dataDir = NULL
)
|
parameter |
Parameter of interest. |
baseUrl |
Base URL for 'daily' AirNow data files. |
dataDir |
Local directory containing 'daily' data files. |
A ws_monitor object with PM2.5 monitoring data.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
# Fail gracefully if any resources are not available
try({
monitor_loadLatest() %>%
monitor_subset(stateCodes=CONUS) %>%
monitor_map()
}, silent = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.