downloadWQP | R Documentation |
Download data from EPA's Water Quality Portal (WQP) as .csv files to outfile_path folder.
downloadWQP(
outfile_path = getwd(),
retrieve = c("narrowresult", "activity", "sites", "detquantlim"),
siteType = c("Aggregate surface-water-use", "Lake, Reservoir, Impoundment", "Spring",
"Stream"),
statecode = "US:49",
zip = FALSE,
unzip = FALSE,
...
)
outfile_path |
Path for file outputs. Defaults to current working directory. |
retrieve |
Vector of data type names to retrieve from WQP. One or more of: "result","narrowresult","activity","sites","detquantlim". Defaults to query narrowresult, activity, sites, and detquantlim. |
zip |
Logical. If FALSE (default) files downloaded as zip folders are not automatically unzipped. If TRUE, the function will unzip all downloaded zip files. Only used if zip==TRUE. |
... |
Other arguments to be passed to readWQP when generating a query URL. |
start_date |
Query start date. "mm/dd/yyyy" format. |
end_date |
Query end date. "mm/dd/yyyy" format. |
Exports .csv files for all selected data types during selected date period in specified output path.
# Read 2018 download narrow result & sites
downloadWQP(outfile_path='C:\\Your\\Folder\\Path', start_date="01/01/2018", end_date="12/31/2018", retrieve=c("narrowresult","sites"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.