epa_parseData: Parse EPA data

Description Usage Arguments Value Note References Examples

View source: R/epa_parseData.R

Description

This function uncompress previously downloaded air quality .zip files from the EPA and reads it into a tibble.

Available parameters include:

  1. Ozone

  2. SO2

  3. CO

  4. NO2

  5. PM2.5

  6. PM10

  7. Wind

  8. Temperature

  9. Barometric_Pressure

  10. RH_and_Dewpoint

  11. HAPs

  12. VOCs

  13. NONOxNOy

Associated parameter codes include:

  1. 44201 – Ozone

  2. 42401 – SO2

  3. 42101 – CO

  4. 42602 – NO2

  5. 88101 – PM2.5

  6. 88502 – PM2.5

  7. 81102 – PM10

  8. SPEC – PM2.5

  9. WIND – Wind

  10. TEMP – Temperature

  11. PRESS – Barometric Pressure

  12. RH_DP – RH and dewpoint

  13. HAPS – HAPs

  14. VOCS – VOCs

  15. NONOxNOy

Usage

1
epa_parseData(zipFile = NULL)

Arguments

zipFile

absolute path to monitoring data .zip file

Value

Tibble of EPA data.

Note

Unzipped CSV files are almost 100X larger than the compressed .zip files. CSV files are removed after data are read into a dataframe.

References

EPA AirData Pre-Generated Data Files

file format description

Examples

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

zipFile <- epa_downloadData(2016, "88101", '~/Data/EPA')
tbl <- epa_parseData(zipFile, "PM2.5")

}, silent = FALSE)

## End(Not run)

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