98 watershed
Retrieving watershed boundaries from the National Hydrography Dataset (NHD)
Uncomment the following line to install leafmap if needed.
In [1]:
Copied!
# %pip install -U leafmap
# %pip install -U leafmap
In [2]:
Copied!
import leafmap
import leafmap
In [3]:
Copied!
point_geometry = {"x": -114.452985, "y": 36.13323}
point_geometry = {"x": -114.452985, "y": 36.13323}
In [4]:
Copied!
gdf = leafmap.get_wbd(point_geometry, digit=8, return_geometry=True)
gdf.explore()
gdf = leafmap.get_wbd(point_geometry, digit=8, return_geometry=True)
gdf.explore()
Out[4]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [5]:
Copied!
bbox_geometry = {"xmin": -115.0954, "ymin": 36.1000, "xmax": -114.6658, "ymax": 36.1986}
bbox_geometry = {"xmin": -115.0954, "ymin": 36.1000, "xmax": -114.6658, "ymax": 36.1986}
In [6]:
Copied!
gdf = leafmap.get_wbd(bbox_geometry, digit=8, return_geometry=True)
gdf.explore()
gdf = leafmap.get_wbd(bbox_geometry, digit=8, return_geometry=True)
gdf.explore()
Out[6]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [7]:
Copied!
huc_id = "10160002"
gdf = leafmap.get_wbd(searchText=huc_id, digit=8)
gdf.explore()
huc_id = "10160002"
gdf = leafmap.get_wbd(searchText=huc_id, digit=8)
gdf.explore()
Out[7]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [8]:
Copied!
gdf = leafmap.get_wbd(searchText=huc_id, digit=10)
gdf.explore()
gdf = leafmap.get_wbd(searchText=huc_id, digit=10)
gdf.explore()
Out[8]:
Make this Notebook Trusted to load map: File -> Trust Notebook