DOI-USGS / DOI-USGS/hydrogeofetch

Incorporate NHDPlus HR catchment datasets into get_catchment_characteristics()

Open
#414 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
96
Forks
38
Avg merge
1d 4h
Merged PRs (30d)
4

Description

A nice feature enhancement would be to enable the `reference_fabric` argument to accept a change from "nhdplusv2" to the "nhdplusHR", which would then switch to alternative dataset(s) produced for NHDPlusHR.

A new dataset has been released by [Gressler et al. 2024](https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sciencebase.gov%2Fcatalog%2Fitem%2F6310e170d34e36012efa0f26&data=05%7C02%7Cmcashman%40usgs.gov%7C3b1a98f086074150d69408dd1857ef6b%7C0693b5ba4b184d7b9341f32f400a5494%7C0%7C0%7C638693488137377251%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=EwKq0MLBt0LPc7qoi9FxaTKecqLnz6rPdyQGlm24JPw%3D&reserved=0) for catchment characteristics attributed and accumulated at the NHDPlus High Res for the Chesapeake Bay watershed (HUCs 0205, 0206, 0207 and 0208).

These datasets are analogous to the NHDPlus Medium Res datasets produced by Mike Wieczorek, which are currently used as the data backbone for the existing `get_catchment_characteristics()` function. They are also cloud-hosted on S3 within sciencebase, in parquet file format, and have some existing data dictionary tables for use in variable querying and retrievals. The tables would need minor modification by joining them into a single master lookup table for joining and have s3 urls added, but that would be pretty straightforward.

There are a few potential bigger conceptual limitations to implementation at this time, that I'll document below. But this is a good time to document this feature enhancement regardless.
1. These HR data are only available within the Chesapeake Bay watershed, not for CONUS. Therefore, even if this enhancement were implemented, it might be a bit of a mismatch for medium-res to have data available for CONUS, while high-res only providing data for one region. This might be less incongruous if/when more regional datasets are available at the HR (although I do not know of existing plans for more regional high-res datasets at this point).
2. There is no current functionality in nhdplusTools or NLDI to navigate the NHDPlusHR, so there's no native discovery method for the NHDPlusHR identifiers. This wouldn't be an issue for retrieving data if the end-user already had their locations of interest, but that could be a mismatch with the "full-service" set of tools nhdplusTools currently provides.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at get_catchment_characteristics() and inspect how reference_fabric="nhdplusv2" selects the existing lookup tables and S3-hosted parquet data. Review the NHDPlusHR data dictionary and ScienceBase datasets, then assess how the Chesapeake-only coverage and lack of NHDPlusHR identifier discovery affect the design. Done means the supported reference_fabric behavior and data mappings are defined with appropriate validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.