Releases: hyriver/pygeohydro
v0.12.0
Release Notes
New Features
- Add support for getting instantaneous streamflow from NWIS in addition to the daily streamflow by adding
freq
argument toNWIS.get_streamflow
that can be eitheriv
ordv
. The default isdv
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 returnedpandas.DataFrame
. (:issue_hydro:[75]{.title-ref}) - Add a new flag to
NWIS.get_streamflow
for returning the streamflow asxarray.Dataset
. This dataset has two dimensions;time
andstation_id
. It has ten variables which includesdischarge
and nine other station attributes. (:issue_hydro:[75]{.title-ref}) - Add
drain_sqkm
from GagesII toNWIS.get_info
. - Show
drain_sqkm
in the interactive map generated byinteractive_map
. - Add two new functions for getting NLCD data;
nlcd_bygeom
andnlcd_bycoords
. The newnlcd_bycoords
function returns ageopandas.GeoDataFrame
with the NLCD layers as columns and input coordinates, which should be a list of(lon, lat)
tuples, as thegeometry
column. Moreover, The newnlcd_bygeom
function now accepts ageopandas.GeoDataFrame
as the input. In this case, it returns adict
with keys as indices of the inputgeopandas.GeoDataFrame
. (:issue_hydro:[80]{.title-ref}) - The previous
nlcd
function is being deprecated. For now, it callsnlcd_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
anddisable_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 settingattrs
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
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 soNID(2)
. The default version is 2.
Bug Fixes
- Fix an issue with background percentage calculation in
cover_statistics
.
v0.11.3
v0.11.2
Release Notes
Bug Fixes
- Refactor
cover_statistics
to address an issue with wrong category names and also improve performance for large datasets by usingnumpy
'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
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.
- For handling more of NWIS's services make
-
Add a new argument called
nwis_kwds
tointeractive_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
Release Notes
Breaking Changes
- Drop support for Python 3.6 since many of the dependencies such as
xarray
andpandas
have done so. - Remove
get_nid
andget_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 soNID()
and with three methods ofAGRBase
class, the user can retrieve the data. These methods are:bygeom
,byids
, andbysql
. Moreover, it has anattrs
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
andNWIS.get_info
to make them more efficient and reduce their code complexity.
v0.10.2
Release Notes
- Add annoucement regarding the new name for the softwate stack, HyRiver.
- Improve
pip
installation and release workflow.
Release v0.10.1
Please check HISTORY.rst file for a detailed list
of changes.
Release v0.10.0
Please check HISTORY.rst file for a detailed list
of changes.
Release v0.9.2
Please check HISTORY.rst file for a detailed list
of changes.