Learn R Programming

dataRetrieval (version 2.5.1)

importWQP: Basic Water Quality Portal Data parser

Description

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

Usage

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

Arguments

obs_url
character URL to Water Quality Portal#' @keywords data import USGS web service
zip
logical to request data via downloading zip file. Default set to FALSE.
tz
character 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, and converted to UTC. See http://www.waterqualitydata.us/portal_userguide.jsp for more information.

See Also

readWQPdata, readWQPqw, whatWQPsites

Examples

Run this code
# These examples require an internet connection to run

## Examples take longer than 5 seconds:
## Not run: 
# rawSampleURL <- constructWQPURL('USGS-01594440','01075', '', '')
# 
# rawSample <- importWQP(rawSampleURL)
# 
# rawSampleURL_Zip <- constructWQPURL('USGS-01594440','01075', '', '', TRUE)
# rawSample2 <- importWQP(rawSampleURL_Zip, zip=TRUE)
# 
# STORETex <- constructWQPURL('WIDNR_WQX-10032762','Specific conductance', '', '')
# STORETdata <- importWQP(STORETex)
# ## End(Not run)

Run the code above in your browser using DataLab