• Stars
    star
    1,213
  • Rank 38,632 (Top 0.8 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created almost 5 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of 360+ Jupyter Python notebook examples for using Google Earth Engine with interactive mapping

earthengine-py-notebooks

image image image image image image image image Twitter Follow

A collection of 360+ Jupyter Python notebook examples for using Google Earth Engine with interactive mapping

Contact: Qiusheng Wu (https://wetlands.io)

1. Description

This repository is a collection of 360+ Jupyter Python notebook examples. I developed these examples by converting my other repo qgis-earthengine-examples from Python scripts to Jupyter notebooks. Now you can display Earth Engine data layers interactively in Jupyter notebooks without having to install QGIS. Several Python packages are being used in these examples, including the Earth Engine Python API, folium, ipyleaflet, and geemap. The geemap Python package is built upon the folium and ipyleaflet packages and implements several methods for interacting with Earth Engine data layers, such as Map.addLayer(), Map.setCenter(), Map.centerObject(), and Map.setOptions().

2. Usage

  • Step 1: Explore this repository and open any available Jupyter notebook in your browser (e.g., template.ipynb)
  • Step 2: When the selected Jupyter notebook is open, click the Notebook Viewer link to view the interactive map.
  • Step 3: If you would like to execute cells in the notebook interactively, you will need to Sign up for a Google Earth Engine account. Then you can click either Run in Google Colab to execute code interactively. This will allow you to add your own Earth Engine Python script.

3. How to automatically convert Earth Engine JavaScripts to Python scripts?

The following examples require the geemap package, which can be installed using pip install geemap. Check the Installation section for more information.

Launch an interactive notebook with Google Colab. Keep in mind that the conversion might not always work perfectly. Additional manual changes might still be needed. ui and chart are not supported. The source code for this automated conversion module can be found at conversion.py.

image

import os
from geemap.conversion import *

# Create a temporary working directory
work_dir = os.path.join(os.path.expanduser('~'), 'geemap')
# Get Earth Engine JavaScript examples. There are five examples in the geemap package folder. 
# Change js_dir to your own folder containing your Earth Engine JavaScripts, such as js_dir = '/path/to/your/js/folder'
js_dir = get_js_examples(out_dir=work_dir) 

# Convert all Earth Engine JavaScripts in a folder recursively to Python scripts.
js_to_python_dir(in_dir=js_dir, out_dir=js_dir, use_qgis=True)
print("Python scripts saved at: {}".format(js_dir))

# Convert all Earth Engine Python scripts in a folder recursively to Jupyter notebooks.
nb_template = get_nb_template()  # Get the notebook template from the package folder.
py_to_ipynb_dir(js_dir, nb_template)

# Execute all Jupyter notebooks in a folder recursively and save the output cells.
execute_notebook_dir(in_dir=js_dir)

image

4. Demo

ee-py-notebooks

5. Examples

The Table of Contents below mimics the structure of the Google Earth Engine API Documentation. I strongly encourage you to check out the API Documentation if you need an in-depth explanation of each Python example. Please note that the list below does not include all the Python examples contained in this repository. You are welcome to explore the repository and find more examples to suit your needs.

Get Started

Machine Learning

Image

ImageCollection

Geometry, Feature, FeatureCollection

Reducer

Join

Array

Specialized Algorithms

Asset Management

How Earth Engine Works

Filter

Visualization

Datasets

Tutorials

Gena's Examples

More Repositories

1

leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
Python
1,312
star
2

qgis-earthengine-examples

A collection of 300+ Python examples for using Google Earth Engine in QGIS
Python
800
star
3

streamlit-geospatial

A multi-page streamlit app for geospatial
Python
586
star
4

python-geospatial

A collection of Python packages for geospatial analysis with binder-ready notebook examples
Shell
564
star
5

Awesome-GEE

A curated list of Google Earth Engine resources
545
star
6

geospatial-data-catalogs

A list of open geospatial datasets available on AWS, Earth Engine, Planetary Computer, NASA CMR, and STAC Index
Jupyter Notebook
380
star
7

whitebox-python

WhiteboxTools Python Frontend
Python
315
star
8

aws-open-data-geo

A list of open geospatial datasets on AWS
Python
239
star
9

geospatial

A Python package for installing commonly used packages for geospatial analysis and data visualization with only one command.
Python
205
star
10

WhiteboxTools-ArcGIS

ArcGIS Python Toolbox for WhiteboxTools
Python
196
star
11

geog-312

Introduction to GIS Programming
Jupyter Notebook
179
star
12

lidar

A Python package for delineating nested surface depressions from digital elevation data.
Python
173
star
13

mapwidget

Custom Jupyter widgets for creating interactive 2D/3D maps using popular JavaScript libraries with bidirectional communication, such as Cesium, Mapbox, MapLibre, Leaflet, and OpenLayers
Python
151
star
14

whiteboxR

WhiteboxTools R Frontend
R
147
star
15

geebook

Geospatial Data Science with Earth Engine and Geemap
Jupyter Notebook
114
star
16

geospatial-ml

A Python package for installing commonly used packages for geospatial analysis and machine learning with only one command.
Python
111
star
17

whiteboxgui

An interactive GUI for WhiteboxTools in a Jupyter-based environment
Python
108
star
18

earthengine-py-examples

A collection of 300+ examples for using Earth Engine and the geemap Python package
Python
103
star
19

streamlit-timeline

Streamlit component for rendering vis.js timeline
Python
96
star
20

geog-414

A repo for GEOG-414 (Spatial Data Management) at the University of Tennessee
HTML
89
star
21

manjaro-linux

Shell scripts for setting up Manjaro Linux for Python programming and deep learning
Shell
88
star
22

GEE-Courses

A collection of Jupyter notebooks for GEE Courses
84
star
23

streamlit-template

A streamlit app template based on streamlit-option-menu
Python
64
star
24

streamlit-multipage-template

A streamlit multipage app template for geospatial applications
Python
60
star
25

maxar-open-data

The Maxar Open Data STAC Catalog in CSV, GeoJSON, and MosaicJSON formats
Python
58
star
26

Wetland-Hydro-GEE

Mapping wetland hydrological dynamics using Google Earth Engine (GEE)
JavaScript
50
star
27

leafmap-book

Geospatial Data Science with Leafmap
Jupyter Notebook
45
star
28

gee-tutorials

Google Earth Engine tutorials
Jupyter Notebook
39
star
29

geemap-apps

Interactive web apps created using geemap and streamlit
Python
33
star
30

postgis

Spatial Data Management with PostgreSQL and PostGIS https://gishub.org/sdm
Jupyter Notebook
32
star
31

leafmap-apps

Interactive web apps created using leafmap and streamlit
Python
32
star
32

giswqs

30
star
33

giswqs-bk

30
star
34

Learning-R

R Tutorials
R
29
star
35

geehydro

A Python package for mapping inundation dynamics using Google Earth Engine
Python
27
star
36

eefolium

A lightweight Python package for interactive mapping with Earth Engine and folium
Python
24
star
37

earthengine-apps

A collection of Earth Engine Apps created using geemap and voila
Jupyter Notebook
23
star
38

geemap-heroku

Python scripts for deploying Earth Engine Apps to heroku
Jupyter Notebook
22
star
39

whitebox-frontends

WhiteboxTools Frontends
20
star
40

geodemo

A Python package for interactive mapping
Python
19
star
41

aws-open-data

A list of open datasets on AWS
Python
17
star
42

leafmap-streamlit

Publishing interactive web apps using leafmap and streamlit
Python
17
star
43

geog-414-fall2022

Spatial Data Management with Google Earth Engine
Jupyter Notebook
17
star
44

data

Some commonly used geospatial datasets
Jupyter Notebook
16
star
45

gh-pages-html-template

A simple template for deploying an HTML website to GitHub Pages
HTML
16
star
46

streamlit-mapbox

A Streamlit Component for rendering Mapbox GL JS
Python
14
star
47

mkdocs-template

A template for building a mkdocs website
14
star
48

geospatial-apps

A collection of streamlit web apps for geospatial applications
Python
14
star
49

notebook-share

A repo for sharing notebooks
13
star
50

aws-open-data-stac

A list of STAC endpoints for the AWS Open Data Program
Python
12
star
51

global-surface-water

A streamlit web app for mapping global surface water
Python
12
star
52

streamlit-water

A streamlit web app visualizing global surface water datasets.
Python
12
star
53

GEOG-503

Programming in GIS (GEOG-503)
Jupyter Notebook
11
star
54

wetland

Mapping surface water and wetland hydrological dynamics using Google Earth Engine
Python
11
star
55

geemap-streamlit

geemap with streamlit
Python
11
star
56

streamlit-leaflet

A Streamlit component for rendering leaflet maps
Python
10
star
57

leafmap-jupyterlite

Leafmap for Jupyterlite
Jupyter Notebook
10
star
58

giswqs.github.io-bk

Public website
CSS
10
star
59

Depression-Analysis-Toolbox

An ArcGIS toolbox for identifying nested depressions in digital elevation models (DEMs)
Python
10
star
60

leafmaptools

A Python package for building a tool widgets infrastructure with ipyleaflet and ipywidgets
Python
10
star
61

GeoPython-Twitter-Bot

A Twitter Bot for GeoPython
JavaScript
10
star
62

NASA-CMR-STAC

A list of geospatial datasets on NASA's Common Metadata Repository (CMR)
Jupyter Notebook
9
star
63

streamlit-google-sheet

A streamlit web app for connecting Streamlit to a public Google Sheet
Python
9
star
64

sysu-workshop

This repo hosts materials for my workshop given at Sun Yat-sen University during July 19-21, 2017
HTML
9
star
65

GIS-Info.github.io

GIS็•™ๅญฆ๏ผšๅญฆๆ กไธŽ้กน็›ฎๆŒ‡ๅ— | GIS Study Abroad: Universities and Projects Guide
9
star
66

geemap-tutorials

Interactive geemap tutorials on heroku
Jupyter Notebook
9
star
67

geog-312-fall2019

First Steps in GIS Programming
HTML
8
star
68

geospatial-notebooks

A collection of Jupyter notebooks for geospatial applications
8
star
69

earthengine-js-examples

Google Earth Engine JavaScript Examples
JavaScript
8
star
70

Wetland-Hydrology-Analyst-Toolbox

An ArcGIS toolbox for wetland hydrology
Python
8
star
71

geog-312-2021

First Steps in GIS Programming (GEOG 312) at the University of Tennessee, Knoxville
Jupyter Notebook
8
star
72

Learning-Python

Python notebooks
Python
8
star
73

streamlit-raster

A Python package for rendering raster datasets with streamlit and localtileserver
Python
8
star
74

scholarpy

A Python package for searching journal publications and researchers
Python
8
star
75

dem-depression-level-set-method

Delineating nested hierarchy of topographic depressions in digital elevation models (DEMs) using level set methods
Python
8
star
76

streamlit-maps

A steamlit app for mapping applications
Python
7
star
77

geemap-ai-docker

AI Platform Deep Learning VM Image with geemap
Jupyter Notebook
7
star
78

Planetary-Computer-Catalog

The Microsoft Planetary Computer Catalog in CSV format
Python
7
star
79

stac-index-catalogs

A list of STAC endpoints retrieved from https://stacindex.org
Jupyter Notebook
7
star
80

geebook-code

Jupyter notebooks for the GEE book
7
star
81

earthengine-py-documentation

Unofficial Google Earth Engine Python Documentation
Jupyter Notebook
6
star
82

Earth-Engine-Catalog

The Google Earth Engine data catalog in CSV format
Python
6
star
83

pyhydro

A Python package for modeling fill-spill hydrology in depression-dominated landscapes
Python
6
star
84

Learning-SciPy

Learning SciPy for Numerical and Scientific Computing
Jupyter Notebook
6
star
85

streamlit-demo

Streamlit demos for geospatial
Python
6
star
86

geosdemo

A Python package demo for interactive mapping
Python
6
star
87

Earth-Engine-Python

Earth Engine Python Examples
Python
5
star
88

geoscale

Python library for scale-based spatial analysis
Python
5
star
89

richdem-binder

Binder for the richdem Python package
5
star
90

timelapse

An interactive streamlit web app for creating satellite timelapse
Python
5
star
91

plotly-dash-template

A template for deploying a plotly dash app on Heroku
Python
4
star
92

streamlit-cartopy

A streamlit web app for hurricane mapping
Python
4
star
93

Earth-Engine-Twitter-Bot

A Twitter Bot for #EarthEngine
JavaScript
4
star
94

streamlit-app-template

A multi-page streamlit web app template for geospatial applications
Python
4
star
95

Crime-Analysis

Crime analysis using R and Python
HTML
4
star
96

streamlit-timeline-demo

Streamlit component for rendering vis.js timeline
Python
4
star
97

GEOG-510

A test repo for GEOG-510
4
star
98

streamlit-tnview

A streamlit application for TennesseeView
Python
3
star
99

Python-books

Python
3
star
100

whitebox-r-binder

Binder for the whitebox R package
Jupyter Notebook
3
star