-------------------
New Features
~~~~~~~~~~~~
- Add a new function, called ``nhdplus_attrs_s3``, for accessing the recently
released NHDPlus derived attributes on a USGS's S3 bucket. The attributes are
provided in parquet files, so getting them is faster than ``nhdplus_attrs``.
Also, you can request for multiple attributes at once whereas in ``nhdplus_attrs``
you had to request for each attribute one at a time. This function will replace
``nhdplus_attrs`` in a future release, as soon as all data that are available
on the ScienceBase version are also accessible from the S3 bucket.
- Add two new functions called ``mainstem_huc12_nx`` and ``enhd_flowlines_nx``.
These functions generate a ``networkx`` directed graph object of NHD HUC12
water boundaries and flowlines, respectively. They also return a dictionary
mapping of COMID and HUC12 to the corresponding ``networkx`` node.
Additionally, a topologically sorted list of COMIDs/HUC12s are returned.
The generated data are useful for doing US-scale network analysis and flow
accumulation on the NHD network. The NHD graph has about 2.7 million edges
and the mainstem HUC12 graph has about 80K edges.
- Add a new function for getting the entire NHDPlus dataset for CONUS (Lower 48),
called ``nhdplus_l48``. The entire NHDPlus dataset is downloaded from
`here <https://www.epa.gov/waterdata/nhdplus-national-data>`__.
This 7.3 GB file will take a while to download, depending on your internet
connection. The first time you run this function, the file will be downloaded
and stored in the ``./cache`` directory. Subsequent calls will use the cached
file. Moreover, there are two additional dependencies for using this function:
``pyogrio`` and ``py7zr``. These dependencies can be installed using
``pip install pyogrio py7zr`` or ``conda install -c conda-forge pyogrio py7zr``.
Internal Changes
~~~~~~~~~~~~~~~~
- Refactor ``vector_accumulation`` for significant performance improvements.
- Modify the codebase based on `Refurb <https://github.com/dosisod/refurb>`__
suggestions.