header_tag.html

Skip to contents

Returns a list of sites from the NWIS web service. This function gets the data from: https://waterservices.usgs.gov/docs/site-service/. Mapper format is used

Usage

whatNWISsites(..., override_error = FALSE)

Arguments

...

see https://waterservices.usgs.gov/docs/site-service/ for a complete list of options. A list (or lists) can also be supplied.

override_error

Logical parameter that allows users to run this function during the final stages of NWIS decommission. NWIS servers will be taken offline February 22nd, 2027. Setting this parameter to TRUE should only be used as a tool to convert readNWIS to read_waterdata functions.

Value

A data frame with at least the following columns:

NameTypeDescription
agency_cdcharacterThe NWIS code for the agency reporting the data
site_nocharacterThe USGS site number
station_nmcharacterStation name
site_tp_cdcharacterSite type code
dec_lat_vanumericDecimal latitude
dec_long_vanumericDecimal longitude
queryTimePOSIXctQuery time

There are also several useful attributes attached to the data frame:

NameTypeDescription
urlcharacterThe url used to generate the data
queryTimePOSIXctThe time the data was returned

Examples


# see ?read_waterdata_monitoring_location
#siteListPhos <- whatNWISsites(stateCd = "OH", parameterCd = "00665")
#oneSite <- whatNWISsites(sites = "05114000")