download_aqs | R Documentation |
The download_aqs()
function accesses and downloads Air Quality System (AQS) data from the U.S. Environmental Protection Agency's (EPA) Pre-Generated Data Files.
download_aqs(
parameter_code = 88101,
resolution_temporal = "daily",
year = c(2018, 2022),
url_aqs_download = "https://aqs.epa.gov/aqsweb/airdata/",
directory_to_save = NULL,
acknowledgement = FALSE,
download = FALSE,
remove_command = FALSE,
unzip = TRUE,
remove_zip = FALSE,
hash = FALSE
)
parameter_code |
integer(1). length of 5. EPA pollutant parameter code. For details, please refer to AQS parameter codes |
resolution_temporal |
character(1).
Name of column containing POC values.
Currently, no value other than |
year |
character(1 or 2). length of 4. Year or start/end years for downloading data. |
url_aqs_download |
character(1). URL to the AQS pre-generated datasets. |
directory_to_save |
character(1). Directory to save data. Two sub-directories will be created for the downloaded zip files ("/zip_files") and the unzipped data files ("/data_files"). |
acknowledgement |
logical(1). By setting |
download |
logical(1). |
remove_command |
logical(1).
Remove ( |
unzip |
logical(1). Unzip zip files. Default |
remove_zip |
logical(1). Remove zip file from directory_to_download.
Default |
hash |
logical(1). By setting |
For hash = FALSE
, NULL
For hash = TRUE
, an rlang::hash_file
character.
Zip and/or data files will be downloaded and stored in
directory_to_save
.
Mariana Kassien, Insang Song, Mitchell Manware
data_usepa2023airdataamadeus
## Not run:
download_aqs(
parameter_code = 88101,
resolution_temporal = "daily",
year = 2023,
directory_to_save = tempdir(),
acknowledgement = TRUE,
download = FALSE, # NOTE: download skipped for examples,
remove_command = TRUE,
unzip = FALSE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.