skillfed

esda

Exploratory Spatial Data Analysis in PySAL

esda v2.10.0 262.1K downloads/30d#8,379 on PyPI256
Permissive license BSD 3-Clause Active released

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 esda

uv

uv add esda

poetry

poetry add esda

Installing 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

Intended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: GIS

Tags

spatial autocorrelation statisticsmoran's i geary's clocal indicators spatial associationspatial clustering detectionexploratory spatial data analysishot spot cold spot analysisspatial weights geopandas
spatial-statisticsgispysal-ecosystem

More GIS packages