Learn R Programming

dataRetrieval (version 2.0.0)

importWQP: Basic Water Quality Portal Data grabber

Description

Imports data from the Water Quality Portal based on a specified url.

Usage

importWQP(url, zip = FALSE, tz = "")

Arguments

url

string URL to Water Quality Portal#'

zip

logical used to request the data in a zip format (TRUE)

tz

string to set timezone attribute of datetime. Default is an empty quote, which converts the datetimes to UTC (properly accounting for daylight savings times based on the data's provided tz_cd column). Possible values to provide are "America/New_York","America/Chicago", "America/Denver","America/Los_Angeles", "America/Anchorage","America/Honolulu","America/Jamaica","America/Managua","America/Phoenix", and "America/Metlakatla"

Value

retval dataframe raw data returned from the Water Quality Portal. Additionally, a POSIXct dateTime column is supplied for start and end times.

Examples

Run this code
# NOT RUN {
# These examples require an internet connection to run
# }
# NOT RUN {
## Examples take longer than 5 seconds:
rawSampleURL <- constructWQPURL('USGS-01594440','01075', '', '')
rawSample <- importWQP(rawSampleURL)
url2 <- paste0(rawSampleURL,"&zip=yes")
rawSample2 <- importWQP(url2, TRUE)
# }

Run the code above in your browser using DataLab