leafmap
A Python package for geospatial analysis and interactive mapping in a Jupyter environment.
What it is and what it does
Leafmap is a Python package for interactive geospatial mapping and analysis designed to work in Jupyter environments. It wraps several established libraries—folium and ipyleaflet for mapping, geopandas for vector data, WhiteboxTools for geospatial analysis, and ipywidgets for interactive interfaces—into a unified API that lets you load and visualize geospatial data with one line of code. The package supports multiple mapping backends, interactive basemap switching, vector and raster data display, and includes a GUI for users who prefer not to code.
Leafmap addresses the gap between simple visualization libraries and full GIS platforms by providing bidirectional communication between the browser and Python backend, enabling interactive exploration and editing of spatial data. It is aimed at both novice users with limited programming skills and advanced developers building interactive web applications. The package includes tools for drawing and editing vector features, searching STAC catalogs and other geospatial data sources, inspecting raster pixel values, and creating choropleth and heat maps.
Use it for:
- Explore and visualize satellite imagery, digital elevation models, and other gridded geospatial datasets interactively in a notebook.
- Load and analyze vector data (shapefiles, GeoJSON, GeoPackage) alongside raster layers for spatial analysis.
- Create split-panel or linked maps to compare different datasets or time series side by side.
- Perform geospatial analysis using WhiteboxTools for tasks like hydrology, LiDAR processing, or terrain analysis without leaving the notebook.
- Build interactive web applications for geospatial data exploration with minimal coding overhead.
- Search and download geospatial data from STAC catalogs, OpenStreetMap, and other public sources directly in your workflow.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Leafmap enables interactive geospatial mapping and analysis in Jupyter notebooks with minimal code, combining vector and raster data visualization, interactive editing, and backend analysis tools.
Yes. Leafmap is actively maintained, has no known vulnerabilities, installs with low friction, and offers a well-integrated solution for interactive geospatial work in Jupyter. It is particularly valuable if you need to combine mapping, vector/raster analysis, and interactive exploration without switching between tools. The large dependency tree (23 runtime packages) is manageable given the wheel distribution and active support for modern Python versions.
Install
leafmap on PyPI
pip
pip install leafmapuv
uv add leafmappoetry
poetry add leafmapInstalling leafmap
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a release 12 days ago and 3757 GitHub stars. Supports Python 3.9 through 3.13.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install leafmap
import leafmap
m = leafmap.Map()
m.show()
Requires a Jupyter environment (Notebook, Lab, Google Colab, or marimo) to display interactive maps.
Verify before relying
- Whether all 23 runtime dependencies install smoothly together in typical environments.
- Performance characteristics when working with large raster or vector datasets.
- Extent of WhiteboxTools integration and whether the 500+ tools are all accessible through the GUI.
Package facts
| License | MIT license (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 23 — anywidget, bqplot, duckdb, folium, gdown, geojson, geopandas, ipyevents, ipyfilechooser, ipyleaflet, ipyvue, ipyvuetify, ipywidgets, maplibre, matplotlib, numpy, pandas, plotly, pystac-client, python-box, scooby, whiteboxgui, xyzservices |
| Maintenance | actively maintained — 12 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,024/month — #14,035 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: leafmap-0.63.1-py2.py3-none-any.whl
Keywords: leafmap
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
foliumfolium builds interactive web maps by combining…
permissive · top 5,000 on PyPI
geemapGeemap provides interactive geospatial analysis…
permissive · top 15,000 on PyPI
whiteboxguiProvides an interactive graphical interface for…
permissive · top 15,000 on PyPI
ipyleafletipyleaflet embeds interactive Leaflet maps…
permissive · top 15,000 on PyPI
whiteboxWhitebox is a Python frontend to WhiteboxTools,…
permissive · top 15,000 on PyPI
keplerglA Jupyter widget that embeds kepler.gl's…
unclear · top 15,000 on PyPI
jupyter-leafletjupyter-leaflet provides interactive map…
permissive · top 15,000 on PyPI
pydeckPydeck provides Python bindings for deck.gl,…
permissive · top 1,000 on PyPI
streamlit-foliumRenders interactive Folium maps in Streamlit…
unclear · top 15,000 on PyPI
highcharts-mapsHighcharts Maps for Python wraps the Highcharts…
unclear · top 15,000 on PyPI