R/monitor_loadLatest.R
monitor_loadLatest.Rd
Combine recent data from AirNow, AIRSIS and WRCC:
If archiveDataDir
is defined, data will be loaded from this local
archive. Otherwise, data will be loaded from the monitoring data repository
maintained by the USFS AirFire team.
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()
.
Base URL for monitoring v2 data files.
Local base directory for monitoring v2 data files.
Type of QC to apply to negative values.
A mts_monitor object with PM2.5 monitoring data. (A list with
meta
and data
dataframes.)
This function guarantees that only a single time series will be
associated with each locationID
using the following logic:
AirNow data takes precedence over data from AIRSIS or WRCC
more recent data takes precedence over older data
This relevant mostly for "temporary" monitors which may be replaced after they
are initially deployed. If you want access to all device deployments associated
with a specific locationID
, you can use the provider specific functions:
airnow_loadLatest
,
airsis_loadLatest
and
wrcc_loadLatest
if (FALSE) {
library(AirMonitor)
# Fail gracefully if any resources are not available
try({
monitor_loadLatest() %>%
monitor_filter(stateCode %in% CONUS) %>%
monitor_leaflet()
}, silent = FALSE)
}