Learn R Programming

AirMonitor (version 0.4.2)

monitor_loadAnnual: Load annual monitoring data from all sources

Description

Combine annual 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.

Current year files loaded by this function are updated once per week.

For the most recent data in the last 10 days, use monitor_loadLatest().

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().

Usage

monitor_loadAnnual(
  year = 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

year

Year [YYYY].

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.

epaPreference

Preferred data source for EPA data when annual data files are available from both `epa_aqs` and `airnow`.

See Also

monitor_loadDaily

monitor_loadLatest

Examples

Run this code
if (FALSE) {
library(AirMonitor)
# Fail gracefully if any resources are not available
try({

monitor_loadAnnual() %>%
  monitor_filter(stateCode %in% CONUS) %>%
  monitor_leaflet()

}, silent = FALSE)
}

Run the code above in your browser using DataLab