View source: R/epa_aqs_parseHourlyData.R
epa_aqs_parseHourlyData | R Documentation |
Uncompress previously downloaded, hourly air quality .zip files from the US EPA and parse the data into a tibble.
EPA parameter codes and (start year) include:
– Ozone (1980)
– SO2 (1980)
– CO (1980)
– NO2 (1980)
– PM2.5 FRM/FEM (2008)
– PM2.5 non FRM/FEM (1998)
– PM10 (1988)
– PM2.5 Speciation(2001)
– PM10 Speciation (1988)
– Winds (1980)
– Temperature (1980)
– Barometric Pressure (1980)
– RH and Dewpoint (1980)
– HAPs (1993)
– VOCs (1980)
– Nitrous Oxides (1980)
epa_aqs_parseHourlyData(zipFile = NULL, quiet = TRUE)
zipFile |
Absolute path to monitoring data .zip file |
quiet |
Logical passed on to |
Tibble of EPA air quality data.
Unzipped CSV files are almost 100X larger than the compressed .zip files. CSV files are removed after data are read into a tibble.
EPA AirData Pre-Generated Data Files
## Not run:
library(AirMonitorIngest)
library(MazamaCoreUtils)
# Create a directory specifically for EPA data
dir.create("~/Data/EPA", recursive = TRUE)
# Set logging level so messages and errors will appear in the console
MazamaCoreUtils::initializeLogging(logDir = "~/Data/EPA/")
logger.setLevel(TRACE)
# Save the download in ~/Data/EPA
zipFile <- epa_aqs_downloadHourlyData(2008, "88101", "~/Data/EPA/", quiet = FALSE)
# Uncompress and parse into a tibble
tbl <- epa_aqs_parseHourlyData(zipFile)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.