esda
Exploratory Spatial Data Analysis in PySAL
What it is and what it does
esda is a Python library for exploratory spatial data analysis, part of the PySAL ecosystem. It provides methods to measure and test spatial autocorrelation—the degree to which values at nearby locations are similar—and to identify spatial clustering, hot spots, and cold spots in geospatial data. The library implements both global statistics (Moran's I, Geary's C, Getis-Ord G) that summarize spatial structure across an entire dataset, and local indicators (LISA) that reveal where clustering occurs.
Built on NumPy, SciPy, GeoPandas, and libpysal, esda integrates with the broader PySAL ecosystem and supports areal and point-referenced data, binary and categorical patterns, and multivariate spatial association. It includes permutation-based inference for statistical significance testing and works directly with GeoPandas DataFrames and spatial weights objects, making it practical for researchers and practitioners who need to understand spatial structure before formal modeling.
Use it for:
- Identify spatial autocorrelation in epidemiological data (disease incidence) to detect clustering before regression modeling.
- Detect hot spots and cold spots in crime or economic indicators across administrative regions using local Moran statistics.
- Test for spatial randomness in ecological or environmental measurements to validate assumptions for spatial models.
- Analyze multivariate spatial association between correlated geospatial variables (e.g., income and education).
- Measure shape regularity and geometric characteristics of spatial features to understand spatial configuration.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
esda computes global and local spatial autocorrelation statistics, join-count tests, and multivariate spatial association measures to identify spatial structure and clustering patterns in geospatial data.
Yes. esda is actively maintained, has low install friction, carries a permissive BSD license, and provides essential spatial statistics tools for exploratory analysis. It integrates seamlessly with GeoPandas and the PySAL ecosystem. No known vulnerabilities. Suitable for research, spatial analysis, and GIS workflows. Requires Python 3.12+.
Install
esda on PyPI
pip
pip install esdauv
uv add esdapoetry
poetry add esdaInstalling esda
Before you install
Low friction: pure Python wheel with well-maintained dependencies (geopandas, libpysal, scipy, scikit-learn). Active development with last commit 2026-07-20 and release 56 days ago. Requires Python 3.12+.
License in practice
BSD 3-Clause permissive license allows use in most projects, including commercial, with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install esda
import esda
import geopandas as gpd
from libpysal.weights import Queen
gdf = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
weights = Queen.from_dataframe(gdf)
moran = esda.Moran(gdf['pop_est'], weights)
print(moran.I, moran.p_sim)
Requires Python 3.12+; geopandas and libpysal must be installed and functional with valid geospatial data.
Verify before relying
- Whether permutation-based inference is available for all statistics or only a subset.
- Performance characteristics when analyzing large datasets (millions of features).
- Compatibility with specific versions of geopandas, libpysal, or scikit-learn beyond minimum requirements.
Package facts
| License | BSD 3-Clause (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — geopandas, libpysal, numpy, pandas, scikit-learn, scipy, shapely |
| Maintenance | actively maintained — 56 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 262,141/month — #8,379 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: esda-2.10.0-py3-none-any.whl
Keywords: exploratory data analysis, spatial statistics
Tags
More GIS packages
Shapely provides Python tools for creating,…
permissive · top 1,000 on PyPI
pyprojpyproj provides a Python interface to PROJ,…
permissive · top 1,000 on PyPI
geopandasGeoPandas extends pandas DataFrames to handle…
permissive · top 1,000 on PyPI
geopygeopy is a Python client for geocoding and…
permissive · top 5,000 on PyPI
pyogrioPyogrio provides fast, bulk-oriented read and…
permissive · top 5,000 on PyPI
h3h3 provides Python bindings to Uber's H3…
permissive · top 5,000 on PyPI
giddyGiddy provides methods for exploratory…
permissive · top 15,000 on PyPI
inequalityInequality provides methods for measuring…
permissive · top 15,000 on PyPI
pointpatsPointpats provides statistical methods for…
permissive · top 15,000 on PyPI
pysalPySAL is a meta-package that bundles 29 spatial…
permissive · top 15,000 on PyPI
spaghettiSpaghetti analyzes network-based spatial data…
permissive · top 15,000 on PyPI
splotsplot creates static and interactive…
permissive · top 15,000 on PyPI
segregationCalculates over 40 segregation indices—both…
permissive · top 15,000 on PyPI
libpysallibpysal provides core spatial analysis…
permissive · top 15,000 on PyPI
spregspreg estimates simultaneous autoregressive…
permissive · top 15,000 on PyPI
accessCalculates spatial accessibility metrics to…
permissive · top 15,000 on PyPI