Skip to content

Commit

Permalink
Added notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed May 24, 2021
1 parent 8960ab2 commit f8b2661
Show file tree
Hide file tree
Showing 11 changed files with 644 additions and 138 deletions.
3 changes: 3 additions & 0 deletions docs/colormaps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# colormaps module

::: leafmap.colormaps
52 changes: 24 additions & 28 deletions docs/notebooks/01_leafmap_intro.ipynb

Large diffs are not rendered by default.

126 changes: 126 additions & 0 deletions docs/notebooks/02_using_basemaps.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "c471be2d",
"metadata": {},
"outputs": [],
"source": [
"import leafmap"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "592a22e8",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map()\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0fd28018",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map(google_map=\"HYBRID\")\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d18349ef",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map(google_map=\"TERRAIN\")\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fb97d9ad",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map()\n",
"m.add_basemap(\"HYBRID\")\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "482f3a67",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map()\n",
"m.add_tile_layer(url=\"https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}\", name=\"Google Satellite\")\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "082b1959",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map()\n",
"naip_url = 'https://services.nationalmap.gov/arcgis/services/USGSNAIPImagery/ImageServer/WMSServer?'\n",
"m.add_wms_layer(url=naip_url, layers='0', name='NAIP Imagery', format='image/png', shown=True)\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "97a36db9",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"m = leafmap.Map(google_map=\"HYBRID\")\n",
"\n",
"url1 = \"https://www.fws.gov/wetlands/arcgis/services/Wetlands/MapServer/WMSServer?\"\n",
"m.add_wms_layer(url1, layers=\"1\",format='image/png', transparent=True, name=\"NWI Wetlands Vector\")\n",
"\n",
"url2 = \"https://www.fws.gov/wetlands/arcgis/services/Wetlands_Raster/ImageServer/WMSServer?\"\n",
"m.add_wms_layer(url2, layers=\"0\",format='image/png', transparent=True, name=\"NWI Wetlands Raster\")\n",
"\n",
"m.add_legend(builtin_legend=\"NWI\")\n",
"m"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
52 changes: 24 additions & 28 deletions examples/notebooks/01_leafmap_intro.ipynb

Large diffs are not rendered by default.

73 changes: 0 additions & 73 deletions examples/notebooks/02_leafmap.ipynb

This file was deleted.

126 changes: 126 additions & 0 deletions examples/notebooks/02_using_basemaps.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "c471be2d",
"metadata": {},
"outputs": [],
"source": [
"import leafmap"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "592a22e8",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map()\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0fd28018",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map(google_map=\"HYBRID\")\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d18349ef",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map(google_map=\"TERRAIN\")\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fb97d9ad",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map()\n",
"m.add_basemap(\"HYBRID\")\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "482f3a67",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map()\n",
"m.add_tile_layer(url=\"https://mt1.google.com/vt/lyrs=y&x={x}&y={y}&z={z}\", name=\"Google Satellite\")\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "082b1959",
"metadata": {},
"outputs": [],
"source": [
"m = leafmap.Map()\n",
"naip_url = 'https://services.nationalmap.gov/arcgis/services/USGSNAIPImagery/ImageServer/WMSServer?'\n",
"m.add_wms_layer(url=naip_url, layers='0', name='NAIP Imagery', format='image/png', shown=True)\n",
"m"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "97a36db9",
"metadata": {
"scrolled": false
},
"outputs": [],
"source": [
"m = leafmap.Map(google_map=\"HYBRID\")\n",
"\n",
"url1 = \"https://www.fws.gov/wetlands/arcgis/services/Wetlands/MapServer/WMSServer?\"\n",
"m.add_wms_layer(url1, layers=\"1\",format='image/png', transparent=True, name=\"NWI Wetlands Vector\")\n",
"\n",
"url2 = \"https://www.fws.gov/wetlands/arcgis/services/Wetlands_Raster/ImageServer/WMSServer?\"\n",
"m.add_wms_layer(url2, layers=\"0\",format='image/png', transparent=True, name=\"NWI Wetlands Raster\")\n",
"\n",
"m.add_legend(builtin_legend=\"NWI\")\n",
"m"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit f8b2661

Please sign in to comment.