Releases: hyriver/pygeohydro
Releases · hyriver/pygeohydro
v0.17.0
Release Notes
New Features
- Add support for the National Levee Dataset (NLD) from the USACE. The new class is called
NLD
and gives users the ability to subset the NLD dataset by geometry, ID, or SQL queries. The class has three methods:bygeom
,byids
, andbysql
.
Enhancements
- Add a new argument to
EHydro
for passing a directory to store the raw downloaded data. This is useful since most times the raw data is needed for further processing and reuse. So, by storing them in a folder other than its previous default location, i.e.,./cache
, users can easily access and manage them.
Internal Changes
- Add the
exceptions
module to the high-level API to declutter the main module. In the future, all exceptions will be raised from this module and not from the main module. For now, the exceptions are raised from both modules for backward compatibility. - Switch to using the
src
layout instead of theflat
layout for the package structure. This is to make the package more maintainable and to avoid any potential conflicts with other packages. - Add artifact attestations to the release workflow.
- Move
NID
class to thenid
module to make the package more organized and the main module less cluttered.
v0.16.5
v0.16.4
Release Notes
Bug Fixes
- Fix an issue in
NID.stage_nid_inventory
where the function was failing when the response status code was 206 (partial content). This issue is fixed by checking the response status code and if it's 206, the function will continue reading the headers and the get the modified date from the response headers. Also, the function incorrectly didn't check if the local database was up-to-date with the remote database when the processed database already existed. Now, the function will check changes in the remote database and re-download the data even if necessary even if the processed database exists.
v0.16.3
Release Notes
Internal Changes
- More robust handling of failed download links for eHydro data. For example, sometimes, eHydro web service uses placeholder as actual links. There are also cases where links are in the database but they are dead.
- Add the
exceptions
module to the high-level API to declutter the main module. In the future, all exceptions will be raised from this module and not from the main module. For now, the exceptions are raised from both modules for backward compatibility.
Bug Fixes
- In
EHydro
class, sometimes the requested surveys are not in the same CRS, so they couldn't be combined into a singleGeoDataFrame
. This issue is fixed by reprojecting all the requested surveys to 5070 CRS before combining them.
v0.16.1
Release Notes
Bug Fixes
- In
nlcd_helper
function the roughness value for class 82 was set to 0.16 instead of 0.037.
New Features
- Converted all methods of
NWIS
class toclassmethod
so the class can be used without instantiating it. This change makes the class more flexible and easier to use. - In
NID
class, thestage_nid_inventory
method now checks if the remote NID database has been modified since the last download and only downloads the new data if it has been modified. This change makes the method more efficient and reduces the network traffic while ensuring that the local database is always up-to-date.
v0.16.0
Release Notes
Breaking Changes
- Bump the minimum supported version of
shapely
to 2.
Internal Changes
- Update the link to NWIS error codes tables in the
nwis_errors
function. - Update
NWIS
class based on the latest changes to the NWIS web service. - Use the default tiles for the
interactive_map
function.
v0.15.2
Release Notes
New Features
- Add a new attribute to
EHydro
class calledsurvey_grid
. It's ageopandas.GeoDataFrame
that includes the survey grid of the eHydro dataset which is a 35-km hexagonal grid. - Add support for getting point cloud and survey outline data from eHydro. You can set
data_type
inEHydro
tobathymetry
,points
,outlines
, orcontours
to get the corresponding data. The default ispoints
since this is the recommended data type by USACE. - Add
NFHL
class withinnfhl
module to access FEMA's National Flood Hazard Layer (NFHL) using six different ArcGISRESTFul services. Contributed by Fernando Aristizabal. (108
{.interpreted-text role="pull_hydro"})
Internal Changes
- Remove dependency on
dask
. - Move all NLCD related functions to a separate module called
nlcd
. This doesn't affect the API since the functions are still available underpygeohydro
namespace.
v0.15.1
Release Notes
This release provides access to three new datasets:
- USACE Hydrographic Surveys (eHydro) and
- USGS Short-Term Network (STN) Flood Event Data (contributed by Fernando Aristizabal)
- NLCD 2021
New Features
- Add support for getting topobathymetry data from USACE Hydrographic Surveys (eHydro). The new class is called
EHydro
and gives users the ability to subset the eHydro dataset by geometry, ID, or SQL queries. - Add new
stnfloodevents
module withSTNFloodEventData
class for retrieving flood event data from the USGS Short-Term Network (STN) RESTful Service. This Python API abstracts away RESTful principles and produces analysis ready data in geo-referenced GeoDataFrames, DataFrames, lists, or dictionaries as desired. The core class methods available aredata_dictionary
,get_all_data
, andget_filtered_data
. These class methods retrieve the data dictionaries by type, get all the available data by type, and make filtered requests for data by type as well, respectively. The four types of data includeinstruments
,peaks
,hwms
, andsites
. Contributed by Fernando Aristizabal. - Add a wrapper function for the
STNFloodEventData
class calledstn_flood_event
. - Add support for the new NLCD data (2021) for the three supported layers.
v0.15.0
Release Notes
From release 0.15 onward, all minor versions of HyRiver packages will be pinned. This ensures that previous minor versions of HyRiver packages cannot be installed with later minor releases. For example, if you have py3dep==0.14.x
installed, you cannot install pydaymet==0.15.x
. This is to ensure that the API is consistent across all minor versions.
New Features
- Add a new option to
NWIS.get_info
, callednhd_info
, for retrieving NHDPlus related info on the sites. This will two new service calls that might slow down the function, so it's disabled by default. - Update links in
NID
to the latest CSV and GPKG versions of the NID dataset. - Add two new properties to
NID
to access the entire NID dataset. You can useNID.df
to access the CSV version as apandas.DataFrame
andNID.gdf
to access the GPKG version as ageopandas.GeoDataFrame
. Installingpyogrio
is highly recommended for much faster reading of the GPKG version. - Refactor
NID.bygeom
to use the newNID.gdf
property for spatial querying of the dataset. This change should make the query much faster. - For now, retain compatibility with
shapely<2
while supportingshapley>=2
.
v0.14.0
Release Notes
New Features
- Add a new function, called
nlcd_area_percent
, for computing the percentages or natural, developed, and impervious areas within geometries of a givenGeoDataFrame
. This function uses imperviousness and land use/land cover data from NLCD to compute the area percentages of the natural, developed, and impervious areas. For more information please refer to the function's documentation. - Add a new column to the dataframe returned by
NWIS.get_info
, callednhd_comid
, and renamedrain_sqkm
tonhd_areasqkm
. The new drainage area is the best available estimates of stations' drainage area that have been extracted from the NHDPlus. The newnhd_comid
column makes it easier to link stations to NHDPlus. - In
get_camels
, returnqobs
with negatives values set toNaN
. Also, Add a new variable calledNewman_2017
to both datasets for identifying the 531 stations that were used in Newman et al. (2017). - Add a new function, called
streamflow_fillna
, for filling missing streamflow values (NAN
) with day-of-year average values.
Breaking Changes
- Bump the minimum required version of
shapely
to 2.0, and use its new API.
Internal Changes
- Sync all minor versions of HyRiver packages to 0.14.0.
- Improve performance of all NLCD functions by merging two methods of the
NLCD
and also reducing the memory footprint of the functions.