Learn R Programming

dataRetrieval (version 2.7.11)

readWQPsummary: Summary of Data Available from Water Quality Portal

Description

Returns a list of sites from the Water Quality Portal web service. This function gets the data from: https://www.waterqualitydata.us. Arguments to the function should be based on https://www.waterqualitydata.us/webservices_documentation. The information returned from this function describes the available data at the WQP sites, and some metadata on the sites themselves.

Usage

readWQPsummary(...)

Arguments

see https://www.waterqualitydata.us/webservices_documentation for a complete list of options. A list of arguments can also be supplied.

Value

A data frame with at least the following columns:

Name Type Description
"Provider" character Providing database.
"MonitoringLocationIdentifier" character A designator used to describe the unique name, number, or code assigned to identify the monitoring location.
"YearSummarized" numeric The year of the summary
"CharacteristicType" character CharacteristicType
"CharacteristicName" character The object, property, or substance which is evaluated or enumerated by either a direct field measurement, a direct field observation, or by laboratory analysis of material collected in the field.
"ActivityCount" numeric The number of times the location was sampled
"ResultCount" numeric The number of individual data results.
"LastResultSubmittedDate" Date Date when data was last submitted.
"OrganizationIdentifier" character A designator used to uniquely identify a unique business establishment within a context.
"OrganizationFormalName" character The legal designator (i.e. formal name) of an organization.
"MonitoringLocationName character MonitoringLocationName
"MonitoringLocationTypeName" character MonitoringLocationTypeName
"ResolvedMonitoringLocationTypeName" character
"HUCEightDigitCode" character 8-digit HUC id.
"MonitoringLocationUrl" character URL to monitoring location.
"CountyName" character County of sampling location.
"StateName" character State of sampling location.
"MonitoringLocationLatitude" numeric latitude of sampling location.
"MonitoringLocationLongitude" numeric longitude of sampling location.

Examples

Run this code
# NOT RUN {
# Summary of a single site for the last 5 years:
site_5 <- readWQPsummary(siteid="USGS-07144100",
                        summaryYears=5)
                        
# Summary of a single site for the full period of record:
site_all <- readWQPsummary(siteid="USGS-07144100",
                           summaryYears="all")

# Summary of the data available from streams in a single county:       
dane_county_data <- readWQPsummary(countycode = "US:55:025",
                        summaryYears = 5,
                        siteType = "Stream")

# Summary of the data all available from lakes in a single county:
lake_sites <- readWQPsummary(siteType = "Lake, Reservoir, Impoundment",
                         countycode = "US:55:025")

# Summary of the data available for the last 5 years in New Jersey:
state1 <- readWQPsummary(statecode="NJ",
                         summaryYears = 5,
                         siteType = "Stream")
# }

Run the code above in your browser using DataLab