Learn R Programming

AirMonitor (version 0.4.2)

monitor_load: Load monitoring data from all sources

Description

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.

Usage

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")
)

Value

A mts_monitor object with PM2.5 monitoring data. (A list with meta and data dataframes.)

Arguments

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`.

See Also

monitor_loadAnnual

monitor_loadDaily

monitor_loadLatest

Examples

Run this code
if (FALSE) {
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)
}

Run the code above in your browser using DataLab