Skip to content

Releases: hyriver/pygeohydro

v0.12.0

28 Dec 06:12
Compare
Choose a tag to compare

Release Notes

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]{.title-ref})
  • 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]{.title-ref})
  • 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]{.title-ref})
  • 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

  • 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]{.title-ref})
  • Add all the missing types so mypy --strict passes.

v0.11.4

24 Nov 20:33
Compare
Choose a tag to compare

Release Notes

New Features

  • Add support for the Water Quality Portal Web Services. (:issue_hydro:[72]{.title-ref})
  • Add support for two version 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.

v0.11.3

12 Nov 23:01
Compare
Choose a tag to compare

Release Notes

New Features

  • Use a new MapService for National Inventory of Dams (NID).

Internal Changes

  • Use importlib-metadata for getting the version insead of pkg_resources to decrease import time as discussed in this issue.

v0.11.2

31 Jul 21:42
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • Refactor cover_statistics to address an issue with wrong category names and also improve performance for large datasets by using numpy's functions.
  • Fix an issue with detecting wrong number of stations in
    NWIS.get_streamflow. Also, improve filtering stations that their start/end date don't match the user requested interval.

v0.11.1

31 Jul 06:22
Compare
Choose a tag to compare

Release Notes

The highlight of this release is adding support for NLCD 2019 and
singnificant improvements in NWIS support.

New Features

  • Add support for the recently released version of NLCD (2019),
    including the impervious descriptor layer. Highlights of the new database are:

    NLCD 2019 now offers land cover for years 2001, 2004, 2006, 2008, > 2011, 2013, 2016, 2019, and impervious surface and impervious > descriptor products now updated to match each date of land cover. > These products update all previously released versions of > landcover and impervious products for CONUS (NLCD 2001, NLCD 2006, > NLCD 2011, NLCD 2016) and are not directly comparable to previous > products. NLCD 2019 land cover and impervious surface product > versions of previous dates must be downloaded for proper > comparison. NLCD 2019 also offers an impervious surface descriptor > product that identifies the type of each impervious surface pixel. > This product identifies types of roads, wind tower sites, building > locations, and energy production sites to allow deeper analysis of > developed features. > > -- MRLC

  • Add support for all the supported regions of NLCD database (CONUS, AK, HI, and PR).

  • Add support for passing multiple years to the NLCD function, like so {"cover": [2016, 2019]}.

  • Add plot.descriptor_legends function to plot the legend for the impervious descriptor layer.

  • New features in NWIS class are:

    * Remove query_* methods since it's not convenient to pass them directly as a dictionary.

    * Add a new function called get_parameter_codes to query parameters and get information about them.

    * To decrease complexity of get_streamflow method add a new private function to handle some of the tasks.

    • For handling more of NWIS's services make retrieve_rdb more general.
  • Add a new argument called nwis_kwds to interactive_map so any NWIS specific keywords can be passed for filtering stations.

  • Improve exception handling in get_info method and simplify and improve its performance for getting HCDN.

Internal Changes

  • Migrate to using AsyncRetriever for handling communications with web services.

v0.11.0

20 Jun 03:59
Compare
Choose a tag to compare

Release Notes

Breaking Changes

  • Drop support for Python 3.6 since many of the dependencies such as xarray and pandas have done so.
  • Remove get_nid and get_nid_codes functions since NID now has a
    ArcGISRESTFul service.

New Features

  • Add a new class called NID for accessing the recently released National Inventory of Dams web service. This service is based on ArcGIS's RESTful service. So now the user just need to instantiate the class like so NID() and with three methods of AGRBase class, the user can retrieve the data. These methods are: bygeom, byids, and bysql. Moreover, it has an attrs property that includes descriptions of the database fields with their units.
  • Refactor NWIS.get_info to be more generic by accepting any valid
    queries that are documented at USGS Site Web Service.
  • Allow for passing a list of queries to NWIS.get_info and use
    async_retriever that significantly improves the network response time.
  • Add two new flags to interactive_map for limiting the stations to
    those with daily values (dv=True) and/or instantaneous values (iv=True). This function now includes a link to stations webpage on USGS website.

Internal Changes

  • Use persistent caching for all send/receive requests that can significantly improve the network response time.
  • Explicitly include all the hard dependencies in setup.cfg.
  • Refactor interactive_map and NWIS.get_info to make them more efficient and reduce their code complexity.

v0.10.2

27 Mar 23:27
Compare
Choose a tag to compare

Release Notes

  • Add annoucement regarding the new name for the softwate stack, HyRiver.
  • Improve pip installation and release workflow.

Release v0.10.1

06 Mar 09:23
Compare
Choose a tag to compare
Release v0.10.1 Pre-release
Pre-release

Please check HISTORY.rst file for a detailed list
of changes.

Release v0.10.0

06 Mar 08:39
Compare
Choose a tag to compare
Release v0.10.0 Pre-release
Pre-release

Please check HISTORY.rst file for a detailed list
of changes.

Release v0.9.2

03 Mar 00:51
Compare
Choose a tag to compare
Release v0.9.2 Pre-release
Pre-release

Please check HISTORY.rst file for a detailed list
of changes.