Learn R Programming

dataRetrieval (version 2.0.0)

getNWISDataAvailability: USGS data availability

Description

Imports a table of available parameters, period of record, and count. See http://waterservices.usgs.gov/rest/Site-Service.html for more information.

Usage

getNWISDataAvailability(siteNumbers, service = c("uv", "dv", "qw"))

whatNWISdata(siteNumbers, service = "all", parameterCd = "all", statCd = "all")

Arguments

siteNumbers

string vector of USGS site number or multiple sites.

service

vector string. Options are "all", or one or many of "dv"(daily values), "uv","rt", or "iv"(unit values), "qw"(water-quality),"sv"(sites visits),"pk"(peak measurements), "gw"(groundwater levels), "ad" (sites included in USGS Annual Water Data Reports External Link), "aw" (sites monitored by the USGS Active Groundwater Level Network External Link), "id" (historical instantaneous values)

parameterCd

string vector of valid parameter codes to return. Defaults to "all" which will not perform a filter.

statCd

string vector of all statistic codes to return. Defaults to "all" which will not perform a filter.

Value

retval dataframe with all information found in the expanded site file

Examples

Run this code
# NOT RUN {
availableData <- whatNWISdata('05114000')
# To find just unit value ('instantaneous') data:
uvData <- whatNWISdata('05114000',service="uv")
uvDataMulti <- whatNWISdata(c('05114000','09423350'),service=c("uv","dv"))
siteNumbers <- c("01491000","01645000")
flowAndTemp <- whatNWISdata(siteNumbers, parameterCd=c("00060","00010"))
# }

Run the code above in your browser using DataLab