Getting Started#
Why HyRiver?#
Some major capabilities of HyRiver are as follows:
Easy access to many web services for subsetting data on server-side and returning the requests as masked Datasets or GeoDataFrames.
Splitting large requests into smaller chunks, under-the-hood, since web services often limit the number of features per request. So the only bottleneck for subsetting the data is your local machine memory.
Navigating and subsetting NHDPlus database (both medium- and high-resolution) using web services.
Cleaning up the vector NHDPlus data, fixing some common issues, and computing vector-based accumulation through a river network.
A URL inventory for some popular (and tested) web services.
Some utilities for manipulating the obtained data and their visualization.
Software Stack#
Installation#
You can install all the packages using pip:
$ pip install py3dep pynhd pygeohydro pydaymet pygridmet pynldas2 hydrosignatures pygeoogc pygeoutils async-retriever
Please note that installation with pip fails if libgdal is not installed on your system.
You should install this package manually beforehand. For example, on Ubuntu-based distros
the required package is libgdal-dev. If this package is installed on your system
you should be able to run gdal-config --version successfully.
Alternatively, you can install them using conda:
$ conda install -c conda-forge py3dep pynhd pygeohydro pydaymet pygridmet pynldas2 hydrosignatures pygeoogc pygeoutils async-retriever
or mambaforge (recommended):
$ mamba install py3dep pynhd pygeohydro pydaymet pygridmet pynldas2 hydrosignatures pygeoogc pygeoutils async-retriever
Additionally, you can create a new environment, named hyriver with all the packages
and optional dependencies installed with mambaforge using the provided
environment.yml file:
$ mamba env create -f ./environment.yml
Dependencies#
aiodnsaiofilesaiohttp>=3.8.3aiohttp-client-cache>=0.12.3aiosqlitebrotlicytoolzmultidictorjson>=3.10,<4yarl
async-retriever>=0.19,<0.20cytoolzdefusedxmljoblibmultidictorjson>=3.10,<4owslib>=0.27.2pyproj>=3.0.1requestsrequests-cache>=0.9.6shapely>=2typing-extensionsurl-normalize>=1.4urllib3yarl
cytoolzgeopandas>=1netcdf4numpy>=2pyproj>=3.0.1rasterio>=1.2rioxarray>=0.15scipyshapely>=2xarray>=2024.7
async-retriever>=0.19.3,<0.20cytoolzgeopandas>=1networkxnumpy>=2pandas>=1pyarrow>=1.0.1pygeoogc>=0.19.3,<0.20pygeoutils>=0.19.5,<0.20shapely>=2
async-retriever>=0.19,<0.20click>=0.7cytoolzgeopandas>=1numpy>=1.17pygeoogc>=0.19,<0.20pygeoutils>=0.19,<0.20rasterio>=1.2rioxarray>=0.15shapely>=2xarray>=2024.7
async-retriever>=0.19.3,<0.20cytoolzdefusedxmlgeopandas>=1h5netcdfhydrosignatures>=0.19.3,<0.20numpy>=2pandas>=1pygeoogc>=0.19.4,<0.20pygeoutils>=0.19.5,<0.20pynhd>=0.19.3,<0.20pyproj>=3.0.1rioxarray>=0.15scipyshapely>=2xarray>=2024.7
click>=0.7netcdf4numpy>=2pandas>=1pyproj>=3.0.1rasteriorioxarray>=0.15shapely>=2tiny-retriever>=0.1.3xarray>=2024.7
click>=0.7netcdf4numpy>=2pandas>=1pyproj>=3.0.1rioxarray>=0.15shapely>=2tiny-retriever>=0.1.3xarray>=2024.7
netcdf4numpy>=2pandas>=1pyproj>=3.0.1rioxarray>=0.15shapely>=2tiny-retriever>=0.1.3xarray>=2024.7
numpy>=2pandas>=1scipyxarray>=2024.7
Additionally, you can also install bottleneck and numba to improve
the performance of some computations. Installing pyogrio is highly recommended
for improving the performance of working with vector data. For NHDPlus, py7zr
and pyogrio are required dependencies. For retrieving soil
data, you should install planetary-computer and pystac-client.