View source: R/epa_aqs_getCodes.R
epa_aqs_getCodes | R Documentation |
Download and parse code tables from the US EPA.
See https://www.epa.gov/aqs/aqs-code-list for a list of tables. the
tableName
can be determined by hovering over each link. For example,
the tableName
for the "General > Parameters" table is "parameters".
epa_aqs_getCodes(
tableName = NULL,
baseUrl = "https://aqs.epa.gov/aqsweb/documents/codetables/"
)
tableName |
Character name associated with the code table. |
baseUrl |
Character base URL for EPA AQS code tables. |
Tibble of EPA AQS codes.
Column types are determined automatically by readr::read_csv()
based on the first 1000 rows of input. In addition, any column matching
" Code$"
will be converted to 'character' type (typically from
'numeric'). It is up to the user to review column types
(with dplyr::glimpse()
) and reassign where desired.
## 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)
# Get a table of parameter codes
parameter_codes <- epa_aqs_getCodes(tableName = "parameters")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.