Pygeohydro

Latest version: v0.19.0

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

Scan your dependencies

Page 5 of 9

0.12.3

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

Bug Fixes
~~~~~~~~~
- Replace no data values of data in ``ssebopeta_bygeom`` with ``np.nan`` before
converting it to mm/day.
- Fix an inconsistency issue with CRS projection when using UTM in ``nlcd_*``.
Use ``EPSG:3857`` for all reprojections and get the data from NLCD in the same
projection. (:issue_hydro:`85`)
- Improve performance of ``nlcd_*`` functions by reducing number of service calls.

Internal Changes
~~~~~~~~~~~~~~~~
- Add type checking with ``typeguard`` and fix type hinting issues raised by
``typeguard``.
- Refactor ``show_versions`` to ensure getting correct versions of all
dependencies.

0.12.2

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

New Features
~~~~~~~~~~~~
- The ``NWIS.get_info`` now returns a ``geopandas.GeoDataFrame`` instead of a
``pandas.DataFrame``.

Bug Fixes
~~~~~~~~~
- Fix a bug in ``NWIS.get_streamflow`` where the drainage area might not be
computed correctly if target stations are not located at the outlet of
their watersheds.

0.12.1

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

Internal Changes
~~~~~~~~~~~~~~~~
- Use the three new ``ar.retrieve_*`` functions instead of the old ``ar.retrieve``
function to improve type hinting and to make the API more consistent.

Bug Fixes
~~~~~~~~~
- Fix an in issue with ``NWIS.get_streamflow`` where time zone of the data
was not being correctly determined when it was US specific abbreviations
such as ``CST``.

0.12.0

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

New Features
~~~~~~~~~~~~
- Add support for getting instantaneous streamflow from NWIS in addition to
the daily streamflow by adding ``freq`` argument to ``NWIS.get_streamflow``
that can be either ``iv`` or ``dv``. The default is ``dv`` to retain the previous
behavior of the function.
- Convert the time zone of the streamflow data to UTC.
- Add attributes of the requested stations as ``attrs`` parameter to the returned
``pandas.DataFrame``. (:issue_hydro:`75`)
- Add a new flag to ``NWIS.get_streamflow`` for returning the streamflow as
``xarray.Dataset``. This dataset has two dimensions; ``time`` and ``station_id``.
It has ten variables which includes ``discharge`` and nine other station attributes.
(:issue_hydro:`75`)
- Add ``drain_sqkm`` from GagesII to ``NWIS.get_info``.
- Show ``drain_sqkm`` in the interactive map generated by ``interactive_map``.
- Add two new functions for getting NLCD data; ``nlcd_bygeom`` and ``nlcd_bycoords``.
The new ``nlcd_bycoords`` function returns a ``geopandas.GeoDataFrame`` with the NLCD
layers as columns and input coordinates, which should be a list of ``(lon, lat)`` tuples,
as the ``geometry`` column. Moreover, The new ``nlcd_bygeom`` function now accepts a
``geopandas.GeoDataFrame`` as the input. In this case, it returns a ``dict`` with keys as
indices of the input ``geopandas.GeoDataFrame``. (:issue_hydro:`80`)
- The previous ``nlcd`` function is being deprecated. For now, it calls ``nlcd_bygeom``
internally and retains the old behavior. This function will be removed in future versions.

Breaking Changes
~~~~~~~~~~~~~~~~
- The ``ssebop_byloc`` is being deprecated and replaced by ``ssebop_bycoords``.
The new function accepts a ``pandas.DataFrame`` as input that should include
three columns: ``id``, ``x``, and ``y``. It returns a ``xarray.Dataset`` with
two dimensions: ``time`` and ``location_id``. The ``id`` columns from the input
is used as the ``location_id`` dimension. The ``ssebop_byloc`` function still
retains the old behavior and will be removed in future versions.
- Set the request caching's expiration time to never expire. Add two flags to all
functions to control the caching: ``expire_after`` and ``disable_caching``.
- Replace ``NID`` class with the new RESTful-based web service of National Inventory
of Dams. The new NID service is very different from the old one, so this is considered
a breaking change.

Internal Changes
~~~~~~~~~~~~~~~~
- Improve exception handling in ``NWIS.get_info`` when NWIS returns an error message
rather than 500s web service error.
- The ``NWIS.get_streamflow`` function now checks if the site info dataset contains
any duplicates. Therefore, all the remaining station numbers will be unique. This
prevents an issue with setting ``attrs`` where duplicate indexes cause an exception
when being converted to a dict. (:issue_hydro:`75`)
- Add all the missing types so ``mypy --strict`` passes.

0.11.4

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

New Features
~~~~~~~~~~~~
- Add support for the
`Water Quality Portal <http://www.waterqualitydata.us>`__ Web Services. (:issue_hydro:`72`)
- Add support for two versions of NID web service. The original NID web service is considered
version 2 and the new NID is considered version 3. You can pass the version number to the
``NID`` like so ``NID(2)``. The default version is 2.

Bug Fixes
~~~~~~~~~
- Fix an issue with background percentage calculation in ``cover_statistics``.

0.11.3

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

New Features
~~~~~~~~~~~~
- Add a `new <https://ags03.sec.usace.army.mil/server/rest/services/Dams_Public/MapServer/0>`__
map service for National Inventory of Dams (NID).

Internal Changes
~~~~~~~~~~~~~~~~
- Use ``importlib-metadata`` for getting the version instead of ``pkg_resources``
to decrease import time as discussed in this
`issue <https://github.com/pydata/xarray/issues/5676>`__.

Page 5 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.