-------------------
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.