Retrieval Functions for USGS and EPA Hydrology and Water Quality Data
Overview
Collection of functions to help retrieve U.S. Geological Survey and U.S. Environmental Protection Agency water quality and hydrology data from web services.
- All NWIS functions will now error out by default. NWIS servers will be taken offline February 22nd, 2027. Use override_error = TRUE to temporarily override this error.
- Added sublocation_identifier parameter to read_waterdata_field_measurements and read_waterdata_field_meta.
- Added method_category parameter to read_waterdata_continuous.
- Updated Water Data API informational links to v1.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 84 (13 internal)includes a package overview page
- Examples that run
- 28%19 run in a plain check (6 of them under a condition) · 38 only when donttest examples are enabled (R CMD check --as-cran) · 8 never run · 4 hold no code
- Exported functions with examples
- 92%
- Documented parameters
- 100%
- Return-value docs
- 59%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 94%
- Median days to close, 50 most recently updated closed issues
- 10
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
14 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/doi-usgs/dataretrieval on 2026-10-11.
The R CMD check workflow runs on Linux and macOS
GitHub Pages site last deployed 2026-10-01 · The repository has a site deploy workflow
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen on or before 2026-04-14Named in .Rbuildignore: .claudeCommits: some crediting it in the message, count not recorded
- Claude CodePull requests: 4 from outside contributors, first on 2026-04-13, 4 from forks
- DevinPull requests: 1 from outside contributors, first on 2026-02-11, 1 from forks
Dependencies
Installing dataRetrieval adds 45 packages (30 with compiled code, 33 MB of source tarballs). Heaviest: sf 9.3 MB, data.table 5.7 MB, s2 2.8 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 2.7.27Latest
- 2.7.262026-09-11 · diff ↗ ·
removed 3 exports
readNGWMNdata, readNGWMNlevels, readNGWMNsitesadded 8 exports
get_monitoring_location_arguments, read_ngwmn, read_ngwmn_lithology, read_ngwmn_providers, read_ngwmn_sites, read_ngwmn_water_level, read_ngwmn_well_construction, read_waterdata_latest_field_measurements - 2.7.25
- RR 4.6.0 released · 2026-04-24
- 2.7.242026-03-31 · diff ↗
- 2.7.232026-03-10 · diff ↗ ·
removed 2 exports
readNWISgwl, readNWISmeasadded 5 exports
read_waterdata_channel, read_waterdata_combined_meta, read_waterdata_field_meta, read_waterdata_stats_daterange, read_waterdata_stats_por - 2.7.222026-01-23 · diff ↗ ·
removed 1 export
constructUseURLadded 3 exports
get_ogc_params, read_waterdata_continuous, read_waterdata_latest_daily - 2.7.21
- 2.7.20
- 2.7.192025-06-27 · diff ↗ ·
removed 2 exports
check_param, construct_USGS_sample_requestadded 11 exports
check_OGC_requests, check_waterdata_sample_params, construct_api_requests, construct_waterdata_sample_request, read_waterdata, read_waterdata_daily, read_waterdata_latest_continuous, read_waterdata_monitoring_location, read_waterdata_samples, read_waterdata_ts_meta, summarize_waterdata_samples - RR 4.5.0 released · 2025-04-11
- 2.7.182025-02-27 · diff ↗ ·
added 4 exports
check_param, construct_USGS_sample_request, read_USGS_samples, summarize_USGS_samples - 2.7.17
- 2.7.162024-07-30 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 2.7.15
Show 41 earlier eventsHide 41 earlier events
- 2.7.142023-10-05 · diff ↗
- 2.7.13
- RR 4.3.0 released · 2023-04-21
- 2.7.12
- RR 4.2.0 released · 2022-04-22
- 2.7.11
- 2.7.10
- 2.7.92021-07-30 · diff ↗
- 2.7.82021-06-26 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 2.7.7
- RR 4.0.0 released · 2020-04-24
- 2.7.62020-03-11 · diff ↗
- 2.7.5
- RR 3.6.0 released · 2019-04-26
- 2.7.42019-03-26 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 2.7.32017-09-28 · diff ↗
- 2.7.22017-05-23 · diff ↗
- 2.7.12017-05-19 · diff ↗
- 2.7.02017-05-16 · diff ↗ ·
added 9 exports
addWaterYear, calcWaterYear, importNGWMN, readNGWMNdata, readNGWMNlevels, readNGWMNsites, whatWQPdata, whatWQPmetrics, whatWQPsamples - RR 3.4.0 released · 2017-04-21
- 2.6.32016-12-08 · diff ↗
- 2.5.132016-09-27 · diff ↗
- 2.5.10
- RR 3.3.0 released · 2016-05-03
- 2.5.52016-04-20 · diff ↗
- 2.5.32016-03-28 · diff ↗
- 2.5.2
- 2.3.12015-08-14 · diff ↗
- 2.3.02015-07-07 · diff ↗
- 2.2.12015-04-28 · diff ↗
- RR 3.2.0 released · 2015-04-16
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.12014-12-03 · diff ↗ ·
removed 11 exports
getNWISData, getNWISDataAvailability, getNWISPcodeInfo, getNWISSiteInfo, getNWISSites, getNWISdvData, getNWISqwData, getNWISunitData, getWQPData, getWQPSites, getWQPqwData - 2.0.02014-11-14 · diff ↗ ·
removed 30 exports
checkStartEndDate, compressData, dataOverview, dateFormatCheck, formatCheckDate, formatCheckParameterCd, getDailyDataFromFile, getDataFromFile, getNWISDaily, getNWISInfo, getNWISSample, getRDB1Data, getUserDaily, getUserInfo, getUserSample, getWQPInfo, getWQPSample, getWaterML1Data, mergeReport, padVariable, populateConcentrations, populateDaily, populateDateColumns, populateParameterINFO, populateSampleColumns, populateSiteINFO, processQWData, readWQPData, removeDuplicates, renameColumnsadded 22 exports
constructWQPURL, importRDB1, importWQP, importWaterML1, importWaterML2, readNWISdata, readNWISdv, readNWISgwl, readNWISmeas, readNWISpCode, readNWISpeak, readNWISqw, readNWISrating, readNWISsite, readNWISuv, readWQPdata, readWQPqw, renameNWISColumns, whatNWISdata, whatNWISsites, whatWQPsites, zeroPad - 1.4.02014-10-13
- RR 3.1.0 released · 2014-04-10
Package metadata
- First published
- 2014-10-13
- Total releases
- 44 / 12 yrs
- License
- CC0 · relicensed from Unlimited | file LICENSE in 2.0.1
- Copyright
- This software is in the public domain because it contains materials that originally came from the United States Geological Survey, an agency of the United States Department of Interior.
- Minimum R
- ≥ 4.1.0
- Download size
- 4.1 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("dataRetrieval")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.5066/p9x4l3ge.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.