Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ cran-comments.md
^CRAN-SUBMISSION$
temp.R
revdep
CLAUDE.md
dev
.claude
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: nhdplusTools
Type: Package
Title: NHDPlus Tools
Version: 1.5.0.9000
Version: 1.5.0
Authors@R: c(person(given = "David",
family = "Blodgett",
role = c("aut", "cre"),
Expand Down Expand Up @@ -29,7 +29,7 @@ BugReports: https://github.com/doi-usgs/nhdplusTools/issues/
Depends:
R (>= 4.1)
Imports: hydroloom, dataRetrieval, dplyr, sf, units, magrittr, jsonlite, httr, xml2, R.utils, utils, tidyr, methods, maptiles, mapsf, fst, arrow, tools, zip, pbapply, memoise, digest
Suggests: testthat, knitr, rmarkdown, ggmap, ggplot2, lwgeom, gifski, leaflet, httptest, future, future.apply, StreamCatTools
Suggests: testthat, knitr, rmarkdown, ggmap, ggplot2, lwgeom, gifski, leaflet, httptest, future, future.apply, StreamCatTools, terra
Remotes: doi-usgs/hydroloom
License: CC0
Encoding: UTF-8
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
nhdplusTools 1.5.0
==========

nhdplusTools 1.5.0 will be the last minor release of nhdplusTools before the package is renamed. Path releases may occur to fix minor issues or change things necessary for the name change, but the API is effectively frozen and all new dvelopment will go toward the replacement package `hydrogeofetch`. For more, see the README.md.

This release adds drainage area estimation tooling that combines HUC12 areas with NHDPlusV2 catchments to produce drainage area estimates at arbitrary points on the network.

- New `get_drainage_area_estimates()` returns total and contributing-only drainage area estimates at HUC12, HUC10, and HUC08 resolutions, alongside a network-derived comparison value and an optional NHDPlusHR-catchment estimate. Non-contributing areas (from the HUC12 `ncontrb_a` attribute) are accounted for.
Expand Down
14 changes: 13 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
output: github_document
output:
github_document:
html_preview: false
---

<!-- README.md is generated from README.Rmd. Please edit that file -->
Expand All @@ -17,6 +19,16 @@ knitr::opts_chunk$set(

![R-CMD-check](https://github.com/doi-usgs/nhdplusTools/workflows/R-CMD-check/badge.svg) [![codecov](https://codecov.io/gh/doi-usgs/nhdplusTools/branch/master/graph/badge.svg)](https://app.codecov.io/gh/doi-usgs/nhdplusTools) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/nhdplusTools)](https://cran.r-project.org/package=nhdplusTools) [![CRAN](https://www.r-pkg.org/badges/version/nhdplusTools)](https://cran.r-project.org/package=nhdplusTools)

## Renaming to `hydrogeofetch`

`nhdplusTools` is being renamed to `hydrogeofetch` (hydrologic geospatial fabric extraction tool chain). The package's scope has grown beyond NHDPlus, and the name is no longer accurate. `hydrogeofetch` will be a pure rename. Functions, function signatures, behavior, will all stay the same. `hydrogeofetch` will be published to CRAN as a new package.

Development on `nhdplusTools` has stopped; only critical bug fixes will be applied. Once `hydrogeofetch` v1.0 is released, `nhdplusTools` will become a deprecation shim that forwards calls to `hydrogeofetch` with a deprecation warnings. The shim will remain on CRAN until **October 2028**, at which point `nhdplusTools` will be archived. Archived packages stay installable from the CRAN archive, so code pinned to `nhdplusTools` will continue to run.

Plan to switch to `hydrogeofetch` once v1.0 is available.

Follow this repository to keep up to date!

## nhdplusTools: Tools for Accessing and Working with the NHDPlus and other US hydrographic data.

### Recommended Citation:
Expand Down
64 changes: 40 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@
Downloads](https://cranlogs.r-pkg.org/badges/grand-total/nhdplusTools)](https://cran.r-project.org/package=nhdplusTools)
[![CRAN](https://www.r-pkg.org/badges/version/nhdplusTools)](https://cran.r-project.org/package=nhdplusTools)

## Renaming to `hydrogeofetch`

`nhdplusTools` is being renamed to `hydrogeofetch` (hydrologic geospatial
fabric extraction tool chain). The package’s scope has grown beyond
NHDPlus, and the name is no longer accurate. `hydrogeofetch` will be a
pure rename. Functions, function signatures, behavior, will all stay the
same. `hydrogeofetch` will be published to CRAN as a new package.

Development on `nhdplusTools` has stopped; only critical bug fixes will
be applied. Once `hydrogeofetch` v1.0 is released, `nhdplusTools` will
become a deprecation shim that forwards calls to `hydrogeofetch` with a
deprecation warnings. The shim will remain on CRAN until **October
2028**, at which point `nhdplusTools` will be archived. Archived
packages stay installable from the CRAN archive, so code pinned to
`nhdplusTools` will continue to run.

Plan to switch to `hydrogeofetch` once v1.0 is available.

Follow this repository to keep up to date!

## nhdplusTools: Tools for Accessing and Working with the NHDPlus and other US hydrographic data.

### Recommended Citation:
Expand Down Expand Up @@ -166,11 +186,11 @@ is also supported.

### Related similar packages:

<https://github.com/mbtyers/riverdist>
<https://github.com/jsta/nhdR>
<https://github.com/lawinslow/hydrolinks>
<https://github.com/mikejohnson51/HydroData>
<https://github.com/ropensci/FedData>
<https://github.com/mbtyers/riverdist>\
<https://github.com/jsta/nhdR>\
<https://github.com/lawinslow/hydrolinks>\
<https://github.com/mikejohnson51/HydroData>\
<https://github.com/ropensci/FedData>\
<https://github.com/hyriver/pygeohydro> … others – please suggest
additions?

Expand Down Expand Up @@ -224,13 +244,13 @@ package a community created resource for us all to gain from and won’t
be able to do that without your help!

1) Contributions should be thoroughly tested with
[`testthat`](https://testthat.r-lib.org/).
[`testthat`](https://testthat.r-lib.org/).\
2) Code style should attempt to follow the [`tidyverse` style
guide.](https://style.tidyverse.org/)
guide.](https://style.tidyverse.org/)\
3) Please attempt to describe what you want to do prior to contributing
by submitting an issue.
by submitting an issue.\
4) Please follow the typical github [fork - pull-request
workflow.](https://gist.github.com/Chaser324/ce0505fbed06b947d962)
workflow.](https://gist.github.com/Chaser324/ce0505fbed06b947d962)\
5) Make sure you use roxygen and run Check before contributing. More on
this front as the package matures.

Expand All @@ -242,27 +262,23 @@ documentation. - this package uses pkgdown. Running

# Disclaimer

This information is preliminary or provisional and is subject to
revision. It is being provided to meet the need for timely best science.
The information has not received final approval by the U.S. Geological
Survey (USGS) and is provided on the condition that neither the USGS nor
the U.S. Government shall be held liable for any damages resulting from
the authorized or unauthorized use of the information.
This software has been approved for release by the U.S. Geological
Survey (USGS). Although the software has been subjected to rigorous
review, the USGS reserves the right to update the software as needed
pursuant to further analysis and review. No warranty, expressed or
implied, is made by the USGS or the U.S. Government as to the
functionality of the software and related material nor shall the fact of
release constitute any such warranty. Furthermore, the software is
released on condition that neither the USGS nor the U.S. Government
shall be held liable for any damages resulting from its authorized or
unauthorized use.

From:
<https://www.usgs.gov/office-of-science-quality-and-integrity/fundamental-science-practices#5>
From: <https://www2.usgs.gov/fsp/fsp_disclaimers.asp#5>

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](https://www.usgs.gov/information-policies-and-instructions/copyrights-and-credits "official USGS copyright policy")

Although this software program has been used by the 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.”

[![CC0](https://i.creativecommons.org/p/zero/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/)
37 changes: 37 additions & 0 deletions code.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
[
{
"name": "nhdplusTools",
"organization": "U.S. Geological Survey",
"description": "Tools for Using NHDPlus Data",
"version": "v1.5.0",
"status": "Production",
"permissions": {
"usageType": "openSource",
"licenses": [
{
"name": "Public Domain, CC0-1.0",
"URL": "https://code.usgs.gov/water/nhdplusTools/-/raw/v1.5.0/LICENSE.md"
}
]
},
"homepageURL": "https://code.usgs.gov/water/nhdplusTools/",
"downloadURL": "https://code.usgs.gov/water/nhdplusTools/-/archive/v1.5.0/nhdplustools-v1.5.0.zip",
"disclaimerURL": "https://code.usgs.gov/water/nhdplusTools/-/raw/v1.5.0/DISCLAIMER.md",
"repositoryURL": "https://code.usgs.gov/water/nhdplusTools.git",
"vcs": "git",
"laborHours": 2200,
"tags": [
"R",
"nhdplus",
"USGS",
"water"
],
"languages": [
"R"
],
"contact": {
"name": "David Blodgett",
"email": "dblodgett@usgs.gov"
},
"date": {
"metadataLastUpdated": "2026-04-19"
}
},{
"name": "nhdplusTools",
"organization": "U.S. Geological Survey",
"description": "Tools for Using NHDPlus Data",
Expand Down
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bibentry(bibtype = "Manual",
title = "nhdplusTools: Tools for Accessing and Working with the NHDPlus",
publisher = "U.S. Geological Survey",
address="Reston, VA",
version = "1.4.0",
version = "1.5.0",
institution = "U.S. Geological Survey",
year = 2025,
url = "https://doi.org/10.5066/P97AS8JD",
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test_01_get_nldi.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,13 @@ test_that("xs", {

xs <- get_xs_point(point, 300, 100)

skip_if(is.null(xs), "xs service broken?")

expect_true(inherits(xs, "sf"))
expect_equal(nrow(xs), 101)

expect_true(all(c("distance_m", "elevation_m") %in% names(xs)))


point1 <- sf::st_sfc(sf::st_point(x = c(-105.9667, 36.17602)), crs = 4326)
point2 <- sf::st_sfc(sf::st_point(x = c(-105.97768, 36.17526)), crs = 4326)

Expand Down
Loading