Skip to content

Commit

Permalink
Renamed notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Apr 12, 2020
1 parent 9be82d0 commit 51c6468
Show file tree
Hide file tree
Showing 17 changed files with 432 additions and 319 deletions.
7 changes: 6 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ More video tutorials for geemap and Earth Engine are available on my [YouTube ch
11. [Exporting Earth Engine Image and ImageCollection as GeoTIFF and Numpy array](#11-exporting-earth-engine-image-and-imagecollection-as-geotiff-and-numpy-array)
12. [Computing zonal statistics with Earth Engine and exporting results as CSV or shapefile](#12-computing-zonal-statistics-with-earth-engine-and-exporting-results-as-csv-or-shapefile)
13. [Calculating zonal statistics by group (e.g., analyzing land cover composition of each country/state)](#13-calculating-zonal-statistics-by-group-eg-analyzing-land-cover-composition-of-each-countrystate)
14. [Adding a customized legend for Earth Engine data](#14-adding-a-customized-legend-for-earth-engine-data)


### 1. Introducing the geemap Python package for interactive mapping with Google Earth Engine
Expand Down Expand Up @@ -86,4 +87,8 @@ More video tutorials for geemap and Earth Engine are available on my [YouTube ch

### 13. Calculating zonal statistics by group (e.g., analyzing land cover composition of each country/state)

![zonal by group](https://i.imgur.com/LxD2em9.gif)
![zonal by group](https://i.imgur.com/LxD2em9.gif)

### 14. Adding a customized legend for Earth Engine data

![legend](https://i.imgur.com/idkZHQp.gif)
157 changes: 157 additions & 0 deletions examples/notebooks/01_geemap_intro.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import geemap"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "431de37205ef422c9d2a9f19a1cd0ec8",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Map(center=[40, -100], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zoom_out_t…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"Map = geemap.Map()\n",
"Map"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"Map.add_basemap('HYBRID')"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"ROADMAP\n",
"SATELLITE\n",
"TERRAIN\n",
"HYBRID\n",
"ESRI\n",
"Esri Ocean\n",
"Esri Satellite\n",
"Esri Standard\n",
"Esri Terrain\n",
"Esri Transportation\n",
"Esri Topo World\n",
"Esri National Geographic\n",
"Esri Shaded Relief\n",
"Esri Physical Map\n",
"FWS NWI Wetlands\n",
"FWS NWI Wetlands Raster\n",
"Google Maps\n",
"Google Satellite\n",
"Google Terrain\n",
"Google Satellite Hybrid\n",
"NLCD 2016 CONUS Land Cover\n",
"NLCD 2013 CONUS Land Cover\n",
"NLCD 2011 CONUS Land Cover\n",
"NLCD 2008 CONUS Land Cover\n",
"NLCD 2006 CONUS Land Cover\n",
"NLCD 2004 CONUS Land Cover\n",
"NLCD 2001 CONUS Land Cover\n",
"USGS NAIP Imagery\n",
"USGS Hydrography\n",
"USGS 3DEP Elevation\n",
"OpenStreetMap.Mapnik\n",
"OpenStreetMap.BlackAndWhite\n",
"OpenStreetMap.DE\n",
"OpenStreetMap.France\n",
"OpenStreetMap.HOT\n",
"OpenTopoMap\n",
"Hydda.Full\n",
"Hydda.Base\n",
"Esri.WorldStreetMap\n",
"Esri.DeLorme\n",
"Esri.WorldTopoMap\n",
"Esri.WorldImagery\n",
"Esri.NatGeoWorldMap\n",
"HikeBike.HikeBike\n",
"MtbMap\n",
"CartoDB.Positron\n",
"CartoDB.DarkMatter\n",
"NASAGIBS.ModisTerraTrueColorCR\n",
"NASAGIBS.ModisTerraBands367CR\n",
"NASAGIBS.MidsTerraBands721CR\n",
"NASAGIBS.ModisAquaTrueColorCR\n",
"NASAGIBS.ModisAquaBands721CR\n",
"NASAGIBS.ViirsTrueColorCR\n",
"NASAGIBS.ViirsEarthAtNight2012\n",
"Strava.All\n",
"Strava.Ride\n",
"Strava.Run\n",
"Strava.Water\n",
"Strava.Winter\n",
"Stamen.Terrain\n",
"Stamen.Toner\n",
"Stamen.Watercolor\n"
]
}
],
"source": [
"basemaps = geemap.ee_basemaps\n",
"for basemap in basemaps:\n",
" print(basemap)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"Map.add_basemap('OpenTopoMap')"
]
}
],
"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": 4
}
84 changes: 84 additions & 0 deletions examples/notebooks/02_using_basemaps.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import geemap"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Map = geemap.Map(center=[40, -100], zoom=4)\n",
"Map"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Map.add_basemap('HYBRID')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"naip_url = 'https://services.nationalmap.gov/arcgis/services/USGSNAIPImagery/ImageServer/WMSServer?'\n",
"Map.add_wms_layer(url=naip_url, layers='0', name='NAIP Imagery', format='image/png', shown=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"url = 'https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}'\n",
"Map.add_tile_layer(url, name='Google Map', attribution='Google')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"m = geemap.Map()\n",
"m.basemap_demo()\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": 4
}
85 changes: 85 additions & 0 deletions examples/notebooks/03_inspector_tool.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import ee\n",
"import geemap"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create an interactive map"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Map = geemap.Map(center=(40, -100), zoom=4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Add Earth Engine Python script"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Add Earth Engine dataset\n",
"dem = ee.Image('USGS/SRTMGL1_003')\n",
"landcover = ee.Image(\"ESA/GLOBCOVER_L4_200901_200912_V2_3\").select('landcover')\n",
"landsat7 = ee.Image('LE7_TOA_5YEAR/1999_2003')\n",
"states = ee.FeatureCollection(\"TIGER/2018/States\")\n",
"\n",
"# Set visualization parameters.\n",
"vis_params = {\n",
" 'min': 0,\n",
" 'max': 4000,\n",
" 'palette': ['006633', 'E5FFCC', '662A00', 'D8D8D8', 'F5F5F5']}\n",
"\n",
"# Add Earth Eninge layers to Map\n",
"Map.addLayer(dem, vis_params, 'STRM DEM', True, 0.5)\n",
"Map.addLayer(landcover, {}, 'Land cover')\n",
"Map.addLayer(landsat7, {'bands': ['B4', 'B3', 'B2'], 'min': 20, 'max': 200}, 'Landsat 7')\n",
"Map.addLayer(states, {}, \"US States\")\n",
"\n",
"Map"
]
}
],
"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": 4
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"metadata": {},
"outputs": [],
"source": [
"import ee\n",
"import geemap"
]
},
Expand All @@ -25,7 +26,6 @@
"metadata": {},
"outputs": [],
"source": [
"import ee\n",
"# Add Earth Engine dataset\n",
"image = ee.Image('USGS/SRTMGL1_003')\n",
"\n",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@
"source": [
"m.plot_demo()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 51c6468

Please sign in to comment.