Learn R Programming

⚠️There's a newer version (2.7.11) of this package.Take me there.

dataRetrieval

Retrieval functions for USGS and EPA hydrologic and water quality data. For tutorial information, see:

http://owi.usgs.gov/R/dataRetrieval.html

##Package Installation To install the dataRetrieval package, you must be using R 3.0 or greater and run the following command:

install.packages("dataRetrieval")

To get inter-CRAN release updates, use the command:

install.packages("dataRetrieval",repos="http://owi.usgs.gov/R")

To get cutting-edge changes, install from GitHub using the devtools packages:

library(devtools)
install_github("USGS-R/dataRetrieval")

##Reporting bugs

Please consider reporting bugs and asking questions on the Issues page:

https://github.com/USGS-R/dataRetrieval/issues

Follow @USGS-R on Twitter for updates on all USGS R packages: https://twitter.com/USGS_R

Current build tests:

LinuxWindowsTest Coverage

Current CRAN information:

VersionMonthly DownloadsTotal Downloads

Research software impact:

##Disclaimer This software is in the public domain because it contains materials that originally came from the U.S. Geological Survey, an agency of the United States Department of Interior. For more information, see the official USGS copyright policy

Although this software program has been used by the U.S. Geological Survey (USGS), no warranty, expressed or implied, is made by the USGS or the U.S. Government as to the accuracy and functioning of the program and related program material nor shall the fact of distribution constitute any such warranty, and no responsibility is assumed by the USGS in connection therewith.

This software is provided "AS IS."

Copy Link

Version

Install

install.packages('dataRetrieval')

Monthly Downloads

3,021

Version

2.5.12

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

Laura DeCicco

Last Published

February 18th, 2022

Functions in dataRetrieval (2.5.12)

constructWQPURL

Construct WQP url for data retrieval
importWaterML1

Function to return data from the NWISWeb WaterML1.1 service
readNWISpCode

USGS Parameter Data Retrieval
readNWISpeak

Peak flow data from USGS (NWIS)
pCodeToName

Data to convert USGS parameter code to characteristic names
readNWISgwl

Groundwater level measurements retrieval from USGS (NWIS)
readNWISdv

Daily Value USGS NWIS Data Retrieval
importWaterML2

Function to return data from the WaterML2 data
importWQP

Basic Water Quality Portal Data parser
readNWISdata

General Data Import from NWIS
readNWISmeas

Surface-water measurement data retrieval from USGS (NWIS)
setAccess

Set data endpoint
readNWISsite

USGS Site File Data Retrieval
readNWISqw

Raw Data Import for USGS NWIS QW Data
readNWISrating

Rating table for an active USGS streamgage retrieval
readNWISuv

Instantaneous value data retrieval from USGS (NWIS)
readNWISuse

Water use data retrieval from USGS (NWIS)
readWQPdata

General Data Import from Water Quality Portal
readNWISstat

Site statistics retrieval from USGS (NWIS)
readWQPqw

Raw Data Import for Water Quality Portal
stateCdLookup

State code look up
xmlcontent

drop in replacement for httr switching to xml2 from XML
whatNWISsites

Site Data Import from NWIS
zeroPad

Pad string with leading zeros
stateCd

US State Code Lookup Table
whatWQPsites

Site Data Import from Water Quality Portal
whatNWISdata

USGS data availability
constructUseURL

Construct URL for NWIS water use data service
getQuerySummary

getting header information from a WQP query
dataRetrieval-package

Retrieval functions for USGS and EPA data
checkWQPdates

Date Check for Water Quality Portal
importRDB1

Function to return data from the NWIS RDB 1.0 format
getWebServiceData

Function to return data from web services
countyCdLookup

County code look up
constructNWISURL

Construct NWIS url for data retrieval
countyCd

US County Code Lookup Table