Closed lewfish closed 2 years ago
Designing a library depends on the kinds of queries we'll have to run. Tasks 1 and 2 will inform that design.
We should also see if HyRiver already has this functionality.
HyRiver does provide NHD access through the PyNHD package. This queries the WaterData web service under the hood, and supports both Medium Resolution and High Resolution querying.
A full demo can be seen in this notebook: https://github.com/hyriver/HyRiver-examples/blob/main/notebooks/nhdplus.ipynb. Specifically, these lines show how PyNHD is used to query streams:
from pynhd import NHDPlusHR, WaterData
geometry = ???
nhdp_mr = WaterData("nhdflowline_network")
flw_mr = nhdp_mr.bybox(geometry.bounds)
nhdp_hr = NHDPlusHR("flowline")
flw_hr = nhdp_hr.bygeom(geometry.bounds)
In addition, it also pulls data from NHD MR and NHDPlus HR web services.
Azavea will develop an NHDPlus data access library for Python and publish it under an open source license to support a wider audience for its ongoing contribution and stewardship. The availability of this library will greatly simplify the use of NWM outputs by modelers in the Jupyter Notebook environment.