Skip to content

Commit

Permalink
Update NWI notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Oct 21, 2024
1 parent 3613898 commit 486fe4f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/notebooks/99_wetlands.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@
"metadata": {},
"outputs": [],
"source": [
"gdf = leafmap.get_nwi_by_huc8(huc8, quiet=False)"
"try:\n",
" gdf = leafmap.get_nwi_by_huc8(huc8, quiet=False)\n",
"except Exception as e:\n",
" print(e)\n",
" gdf = None"
]
},
{
Expand All @@ -212,7 +216,8 @@
"source": [
"m = leafmap.Map()\n",
"m.add_basemap(\"HYBRID\")\n",
"m.add_nwi(gdf, layer_name=\"Wetlands\", zoom_to_layer=True)\n",
"if gdf is not None:\n",
" m.add_nwi(gdf, layer_name=\"Wetlands\", zoom_to_layer=True)\n",
"m"
]
}
Expand Down

0 comments on commit 486fe4f

Please sign in to comment.