epa_loadAnnual: Load annual EPA monitoring data

Description Usage Arguments Value References Examples

View source: R/epa_loadAnnual.R

Description

Loads pre-generated .RData files containing annual EPA data.

EPA parameter codes include:

  1. 88101 – PM2.5 FRM/FEM Mass (begins in 2008)

  2. 88502 – PM2.5 non FRM/FEM Mass (begins in 1998)

Avaialble RData and associated log files can be seen at: https://haze.airfire.org/monitoring/EPA/RData/

Usage

1
2
3
4
5
6
epa_loadAnnual(
  year = NULL,
  parameterCode = NULL,
  baseUrl = "https://haze.airfire.org/monitoring",
  dataDir = NULL
)

Arguments

year

Desired year (integer or character representing YYYY).

parameterCode

Pollutant code.

baseUrl

Base URL for 'annual' EPA data files.

dataDir

Local directory containing 'annual' data files.

Value

A ws_monitor object with EPA data.

References

EPA AirData Pre-Generated Data Files

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Fail gracefully if any resources are not available
try({

epa_loadAnnual(2000, "88502") %>%
  monitor_subset(stateCodes = 'WA', tlim=c(20000701,20000801)) %>%
  monitor_map()

}, silent = FALSE)

## End(Not run)

PWFSLSmoke documentation built on Nov. 23, 2021, 5:06 p.m.