epa_aqs_loadAnnual: Load annual AirNow monitoring data

View source: R/epa_aqs_loadAnnual.R

epa_aqs_loadAnnualR Documentation

Load annual AirNow monitoring data

Description

Loads pre-generated .rda files containing hourly AirNow data.

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 contain a single year's worth of data.

Pre-processed AirNow exists for the following parameter codes:

  1. 88101 – PM2.5 FRM/FEM Mass

  2. 88502 – PM2.5 non FRM/FEM Mass

Specifying parameterCode = "PM2.5" will merge records from both sources.

Usage

epa_aqs_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"),
  parameterCode = c("PM2.5", "88101", "88502")
)

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.

parameterCode

One of the EPA AQS criteria parameter codes.

Value

A mts_monitor object with EPA AQS data. (A list with meta and data dataframes.)

Examples

## Not run: 
library(AirMonitor)

# Fail gracefully if any resources are not available
try({

# See https://en.wikipedia.org/wiki/2017_Montana_wildfires

# Daily Barplot of Montana wildfires
epa_aqs_loadAnnual(2015) \
  monitor_filter(stateCode == "WA") \
  monitor_filterDate(20150724, 20150907) \
  monitor_dailyStatistic() \
  monitor_timeseriesPlot(
    main = "Washington 2015 -- AirNow Daily Average PM2.5"
  )

}, silent = FALSE)

## End(Not run)

AirMonitor documentation built on Aug. 26, 2023, 1:08 a.m.