hfsubsetR

The goal of hfsubsetR is to extract hydrofabric subsets from cloud or local archives built in spatial.water.noaa.gov.

Installation

You can install the development version of hfsubsetR from GitHub with:

# install.packages("remotes")
# remotes::install_github("owp-spatial/hfsubsetR")
install.packages("hfsubsetR", repos = c('https://owp-spatial.r-universe.dev', 'https://cloud.r-project.org'))
library(hfsubsetR)

Basic Use

From local file

We can download a version (default = ‘2.2’) hydrofabric (default = ‘nextgen’) for any domain (default = ‘conus’) using get_hydrofabric.

gpkg <- './conus_nextgen.gpkg'

get_hydrofabric(outfile = gpkg)

From that, we can extract data for a VPU:

get_vpu_fabric(gpkg, 
               vpuid = "01", 
               outfile = './01_nextgen.gpkg')

Or, we can extract a subset based on an input identifier (one of id, comid, hl_uri, poi_id, nldi_feature, xy):

subset_fabric <- get_subset(gpkg = gpkg, comid = 101)

From Remote

Coming soon…

Questions?

Please reach out via an issue or PR if you have comments, concerns, or questions!