• Stars
    star
    1,312
  • Rank 35,858 (Top 0.8 %)
  • Language
    Python
  • Created 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 Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment

Welcome to leafmap

image image image image image image image image image image image image status

logo

A Python package for geospatial analysis and interactive mapping in a Jupyter environment.

Introduction

Leafmap is a Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment. It is a spin-off project of the geemap Python package, which was designed specifically to work with Google Earth Engine (GEE). However, not everyone in the geospatial community has access to the GEE cloud computing platform. Leafmap is designed to fill this gap for non-GEE users. It is a free and open-source Python package that enables users to analyze and visualize geospatial data with minimal coding in a Jupyter environment, such as Google Colab, Jupyter Notebook, and JupyterLab. Leafmap is built upon several open-source packages, such as folium and ipyleaflet (for creating interactive maps), WhiteboxTools and whiteboxgui (for analyzing geospatial data), and ipywidgets (for designing interactive graphical user interface [GUI]). Leafmap has a toolset with various interactive tools that allow users to load vector and raster data onto the map without coding. In addition, users can use the powerful analytical backend (i.e., WhiteboxTools) to perform geospatial analysis directly within the leafmap user interface without writing a single line of code. The WhiteboxTools library currently contains 500+ tools for advanced geospatial analysis, such as GIS Analysis, Geomorphometric Analysis, Hydrological Analysis, LiDAR Data Analysis, Mathematical and Statistical Analysis, and Stream Network Analysis.

Acknowledgments

This project is supported by Amazon Web Services (AWS).

Statement of Need

There are a plethora of Python packages for geospatial analysis, such as geopandas for vector data analysis and xarray for raster data analysis. However, few Python packages provide interactive GUIs for loading geospatial data in a Jupyter environment. It might take many lines to code to load and display geospatial data with various file formats on an interactive map, which can be a challenging task for novice users with limited coding skills. There are also some notable Python packages for visualizing geospatial data in a Jupyter environment, such as plotly and kepler.gl. However, plotly is designed for displaying static data, which lacks bidirectional communication between the front-end and the backend. Kepler.gl provides unique 3D functionality for visualizing large-scale geospatial datasets, but it lacks tools for performing geospatial analysis, such as hydrological analysis and LiDAR data analysis. In contrast, leafmap provides many convenient functions for loading and visualizing geospatial datasets with only one line of code. Users can also use the interactive GUI to load geospatial datasets without coding. Leafmap is intended for anyone who would like to analyze and visualize geospatial data interactively in a Jupyter environment. It is particularly suited for novice users with limited programming skills. Advanced programmers can also find leafmap a useful tool for analyzing geospatial data and building interactive web apps.

Launch the interactive notebook tutorial for the leafmap Python package with JupyterLite, Google Colab, Binder, or Amazon Sagemaker Studio Lab now:

image image image Open In Studio Lab

Check out this excellent article on Medium - Leafmap a new Python Package for Geospatial data science

To learn more about leafmap, check out the leafmap documentation website - https://leafmap.org

Key Features

Below is a partial list of features available for the leafmap package. Please check the examples page for notebook examples, GIF animations, and video tutorials.

  • Create an interactive map with only one-line of code.
  • Select from a variety of basemaps interactively without coding.
  • Add XYZ, WMS, and vector tile services to the map.
  • Convert CSV to points and display points as a marker cluster.
  • Add local vector data (e.g., shapefile, GeoJSON, KML) to the map without coding.
  • Add local raster data (e.g., GeoTIFF) to the map without coding.
  • Add Cloud Optimized GeoTIFF (COG) and SpatialTemporal Asset Catalog (STAC) to the map.
  • Add OpenStreetMap data to the map with a single line of code.
  • Add a GeoPandas GeoDataFrame to the map with a single line of code.
  • Add a point layer with popup attributes to the map.
  • Add data from a PostGIS database to the map.
  • Add custom legends and colorbars to the map.
  • Perform geospatial analysis using WhiteboxTools and whiteboxgui.
  • Create split-panel map and linked maps.
  • Publish interactive maps with a single line of code.
  • Download and display OpenStreetMap data with a single line of code.

Citations

If you find leafmap useful in your research, please consider citing the following paper to support my work. Thank you for your support.

  • Wu, Q. (2021). Leafmap: A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment. Journal of Open Source Software, 6(63), 3414. https://doi.org/10.21105/joss.03414

Demo

YouTube Channel

I have created a YouTube Channel for sharing geospatial tutorials. You can subscribe to my channel for regular updates. If there is any specific tutorial you would like to see, please submit a feature request here.

Earth Engine Tutorials on YouTube

More Repositories

1

earthengine-py-notebooks

A collection of 360+ Jupyter Python notebook examples for using Google Earth Engine with interactive mapping
Jupyter Notebook
1,213
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