Pynhd

Latest version: v0.18.0

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 7

0.13.10

--------------------

New Features
~~~~~~~~~~~~
- Add support for the new EPA's
`StreamCat <https://www.epa.gov/national-aquatic-resource-surveys/streamcat-dataset>`__
Restful API with around 600 NHDPlus
catchment level metrics. One class is added for getting the service
properties such as valid metrics, called ``StreamCat``. You can use
``streamcat`` function to get the metrics as a ``pandas.DataFrame``.
- Refactor the ``show_versions`` function to improve performance and
print the output in a nicer table-like format.

Internal Changes
~~~~~~~~~~~~~~~~
- Skip 0.13.9 version so the minor version of all HyRiver packages become
the same.
- Modify the codebase based on the latest changes in ``geopandas`` related
to empty dataframes.

0.13.8

-------------------

New Features
~~~~~~~~~~~~
- Add a new function, called ``nhdplus_attrs_s3``, for accessing the recently
released NHDPlus derived attributes on a USGS's S3 bucket. The attributes are
provided in parquet files, so getting them is faster than ``nhdplus_attrs``.
Also, you can request for multiple attributes at once whereas in ``nhdplus_attrs``
you had to request for each attribute one at a time. This function will replace
``nhdplus_attrs`` in a future release, as soon as all data that are available
on the ScienceBase version are also accessible from the S3 bucket.
- Add two new functions called ``mainstem_huc12_nx`` and ``enhd_flowlines_nx``.
These functions generate a ``networkx`` directed graph object of NHD HUC12
water boundaries and flowlines, respectively. They also return a dictionary
mapping of COMID and HUC12 to the corresponding ``networkx`` node.
Additionally, a topologically sorted list of COMIDs/HUC12s are returned.
The generated data are useful for doing US-scale network analysis and flow
accumulation on the NHD network. The NHD graph has about 2.7 million edges
and the mainstem HUC12 graph has about 80K edges.
- Add a new function for getting the entire NHDPlus dataset for CONUS (Lower 48),
called ``nhdplus_l48``. The entire NHDPlus dataset is downloaded from
`here <https://www.epa.gov/waterdata/nhdplus-national-data>`__.
This 7.3 GB file will take a while to download, depending on your internet
connection. The first time you run this function, the file will be downloaded
and stored in the ``./cache`` directory. Subsequent calls will use the cached
file. Moreover, there are two additional dependencies for using this function:
``pyogrio`` and ``py7zr``. These dependencies can be installed using
``pip install pyogrio py7zr`` or ``conda install -c conda-forge pyogrio py7zr``.

Internal Changes
~~~~~~~~~~~~~~~~
- Refactor ``vector_accumulation`` for significant performance improvements.
- Modify the codebase based on `Refurb <https://github.com/dosisod/refurb>`__
suggestions.

0.13.7

-------------------

New Features
~~~~~~~~~~~~
- Add a new function called ``epa_nhd_catchments`` to access one of the
EPA's HMS endpoints called ``WSCatchment``. You can use this function to
access 414 catchment-scale characteristics for all the NHDPlus catchments
including 16-day average curve number. More information on the curve number
dataset can be found at its project page
`here <https://cfpub.epa.gov/si/si_public_record_Report.cfm?Lab=CEMM&dirEntryId=351307>`__.

Bug Fixes
~~~~~~~~~
- Fix a bug in ``NHDTools`` where due to the recent changes in ``pandas``
exception handling, the ``NHDTools`` fails in converting columns with
``NaN`` values to integer type. Now, ``pandas`` throws ``IntCastingNaNError``
instead of ``TypeError`` when using ``astype`` method on a column.

Internal Changes
~~~~~~~~~~~~~~~~
- Use ``pyupgrade`` package to update the type hinting annotations
to Python 3.10 style.

0.13.6

-------------------

Internal Changes
~~~~~~~~~~~~~~~~
- Add the missing PyPi classifiers for the supported Python versions.

0.13.5

-------------------

Breaking Changes
~~~~~~~~~~~~~~~~
- Append "Error" to all exception classes for conforming to PEP-8 naming conventions.

Internal Changes
~~~~~~~~~~~~~~~~
- Bump the minimum versions of ``pygeoogc`` and ``pygeoutils`` to 0.13.5 and that of
``async-retriever`` to 0.3.5.

Bug Fixes
~~~~~~~~~
- Fix an issue in ``nhdplus_vaa`` and ``enhd_attrs`` functions where if ``cache`` folder
does not exist, it would not have been created, thus resulting to an error.

0.13.3

-------------------

Internal Changes
~~~~~~~~~~~~~~~~
- Use the new ``async_retriever.stream_write`` function to download files in
``nhdplus_vaa`` and ``enhd_attrs`` functions. This is more memory efficient.
- Convert the type of list of not found items in ``NLDI.comid_byloc`` and
``NLDI.feature_byloc`` to list of tuples of coordinates from list of strings.
This matches the type of returned not found coordinates to that of the inputs.
- Fix an issue with NLDI that was caused by the recent changes in the NLDI web
service's error handling. The NLDI web service now returns more descriptive
error messages in a ``json`` format instead of returning the usual status
errors.
- Slice the ENHD dataframe in ``NHDTools.clean_flowlines`` before updating
the flowline dataframe to reduce the required memory for the ``update`` operation.

Page 3 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.