powered by
Loads monitoring data for a given time range. Data from AirNow, AIRSIS and WRCC are combined into a single ws_monitor object.
Archival datasets are joined with 'daily' and 'latest' datasets as needed to satisfy the requested date range.
monitor_load( startdate = NULL, enddate = NULL, monitorIDs = NULL, parameter = "PM2.5", baseUrl = "https://haze.airfire.org/monitoring", dataDir = NULL, aqsPreference = "airnow" )
Desired start date (integer or character in ymd[hms] format or POSIXct).
POSIXct
Desired end date (integer or character in ymd[hms] format or POSIXct).
Optional vector of monitorIDs.
Parameter of interest.
Base URL for data files.
Local directory containing monitoring data files.
Preferred data source for AQS data when annual data files are available from both `epa` and `airnow`.
A ws_monitor object with PM2.5 monitoring data.
loadDaily
loadLatest
# NOT RUN { # Fail gracefully if any resources are not available try({ ca <- monitor_load(20170601,20171001) %>% monitor_subset(stateCodes='CA') }, silent = FALSE) # }
Run the code above in your browser using DataLab