epa_aqs_getMonitors: Download and parse EPA AQS monitor metadata

View source: R/epa_aqs_getMonitors.R

epa_aqs_getMonitorsR Documentation

Download and parse EPA AQS monitor metadata

Description

Download monitor metadata from the US EPA and save it to a directory. Then uncompress and parse the data into a tibble.

Usage

epa_aqs_getMonitors(
  url = "https://aqs.epa.gov/aqsweb/airdata/aqs_monitors.zip",
  downloadDir = tempdir(),
  quiet = TRUE
)

Arguments

url

URL for the aqs_monitors.zip file.

downloadDir

Directory where .zip file will be saved.

quiet

Logical passed on to utils::download.file().

Value

Tibble of EPA site metadata.

References

Site and Monitor Descriptions

Examples

## Not run: 
library(AirMonitorIngest)

# 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)

# Download and parse site metadata
AQS_monitors <- epa_aqs_getMonitors(downloadDir = "~/Data/EPA", quiet = FALSE)

## End(Not run)

pnwairfire/AirMonitorIngest documentation built on Feb. 18, 2025, 7:50 p.m.