Skip to contents

Returns a list of sites with year-by-year information on what data is available. The 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. One way to figure out how to construct a WQP query is to go to the "Advanced" form in the Water Quality Portal: https://www.waterqualitydata.us/#mimeType=csv&providers=NWIS&providers=STORET Use the form to discover what parameters are available. Once the query is set in the form, scroll down to the "Query URL". You will see the parameters after "https://www.waterqualitydata.us/#". For example, if you chose "Nutrient" in the Characteristic Group dropdown, you will see characteristicType=Nutrient in the Query URL. The corresponding argument for dataRetrieval is characteristicType = "Nutrient". dataRetrieval users do not need to include mimeType, and providers is optional (these arguments are picked automatically).

Value

A data frame from the data returned from the Water Quality Portal

See also

whatWQPsites whatWQPdata

Examples

# \donttest{
# Summary of a single site for the last 5 years:
site_5 <- readWQPsummary(
  siteid = "USGS-07144100",
  summaryYears = 5
)
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html

# Summary of a single site for the full period of record:
site_all <- readWQPsummary(
  siteid = "USGS-07144100",
  summaryYears = "all"
)
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html

# Summary of the data available from streams in a single county:
dane_county_data <- readWQPsummary(
  countycode = "US:55:025",
  summaryYears = 5,
  siteType = "Stream"
)
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html

# Summary of the data all available from lakes in a single county:
lake_sites <- readWQPsummary(
  siteType = "Lake, Reservoir, Impoundment",
  countycode = "US:55:025"
)
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html

# Summary of the data available for the last 5 years in New Jersey:
state1 <- readWQPsummary(
  statecode = "NJ",
  summaryYears = 5,
  siteType = "Stream"
)
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html
#> NEWS: Legacy profile requested, and no equivalent/similar WQX 3.0
#> profile currently exists. Legacy profiles do not include USGS data newer
#> than March 11, 2024. 
#> More details: 
#> https://doi-usgs.github.io/dataRetrieval/articles/Status.html
# }