#!/usr/bin/env python # coding: utf-8 # [![image](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://demo.leafmap.org/lab/index.html?path=notebooks/98_watershed.ipynb) # [![image](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/opengeos/leafmap/blob/master/docs/notebooks/98_watershed.ipynb) # [![image](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/opengeos/leafmap/HEAD) # # **Retrieving watershed boundaries from the National Hydrography Dataset (NHD)** # # Uncomment the following line to install [leafmap](https://leafmap.org) if needed. # In[ ]: # %pip install -U leafmap # In[ ]: import leafmap # In[ ]: point_geometry = {"x": -114.452985, "y": 36.13323} # In[ ]: gdf = leafmap.get_wbd(point_geometry, digit=8, return_geometry=True) gdf.explore() # In[ ]: bbox_geometry = {"xmin": -115.0954, "ymin": 36.1000, "xmax": -114.6658, "ymax": 36.1986} # In[ ]: gdf = leafmap.get_wbd(bbox_geometry, digit=8, return_geometry=True) gdf.explore() # In[ ]: huc_id = "10160002" gdf = leafmap.get_wbd(searchText=huc_id, digit=8) gdf.explore() # In[ ]: gdf = leafmap.get_wbd(searchText=huc_id, digit=10) gdf.explore()