monitor_load | R Documentation |
Loads monitoring data for a given time range. Data from AirNow, AIRSIS and WRCC are combined into a single mts_monitor object.
Archival datasets are combined with 'daily' and 'latest' datasets as needed to satisfy the requested date range.
monitor_load(
startdate = NULL,
enddate = NULL,
timezone = NULL,
archiveBaseUrl = paste0("https://airfire-data-exports.s3.us-west-2.amazonaws.com/",
"monitoring/v2"),
archiveBaseDir = NULL,
QC_negativeValues = c("zero", "na", "ignore"),
epaPreference = c("airnow", "epa_aqs")
)
startdate |
Desired start datetime (ISO 8601). |
enddate |
Desired end datetime (ISO 8601). |
timezone |
Olson timezone used to interpret dates. |
archiveBaseUrl |
Base URL for monitoring v2 data files. |
archiveBaseDir |
Local base directory for monitoring v2 data files. |
QC_negativeValues |
Type of QC to apply to negative values. files are available from both 'epa' and 'airnow'. |
epaPreference |
Preferred data source for EPA data when annual data files are available from both 'epa_aqs' and 'airnow'. |
A mts_monitor object with PM2.5 monitoring data. (A list with
meta
and data
dataframes.)
monitor_loadAnnual
monitor_loadDaily
monitor_loadLatest
## Not run:
library(AirMonitor)
# Fail gracefully if any resources are not available
try({
wa <-
monitor_load(20210601, 20211001) %>%
monitor_filter(stateCode == "WA")
monitor_timeseriesPlot(wa)
}, silent = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.