skillfed

leafmap

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

leafmap v0.63.1 84.0K downloads/30d#14,035 on PyPI3,757
Permissive license MIT license Active released

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 leafmap

uv

uv add leafmap

poetry

poetry add leafmap

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

interactive geospatial mapping jupytervector raster data visualizationgeospatial analysis jupyter notebookinteractive map creation pythongeospatial data exploration tool
geospatial-gisjupyter-interactivemapping-visualization

More Information Analysis packages