inequality
inequality: Spatial inequality analysis
What it is and what it does
Inequality is a PySAL module for measuring and analyzing spatial inequality—how unevenly a phenomenon is distributed across geographic regions. It provides statistical methods to quantify inequality patterns in spatial data, typically used alongside numpy, scipy, and pandas for data manipulation and matplotlib for visualization. The package is part of the broader PySAL ecosystem for spatial analysis in Python.
The package is designed for researchers and analysts working with geographic or regional data who need to compute inequality metrics and understand distributional disparities. It integrates with libpysal for spatial data structures and leverages standard scientific Python libraries for computation and display.
Use it for:
- Measure income or wealth inequality across geographic regions or administrative boundaries.
- Analyze spatial disparities in economic indicators, health outcomes, or demographic variables.
- Compare inequality metrics over time to track changes in regional distribution patterns.
- Integrate inequality analysis into broader spatial statistical workflows within PySAL.
- Visualize inequality patterns on maps using matplotlib for publication or reporting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Inequality provides methods for measuring spatial inequality across geographic regions, integrating with the PySAL ecosystem to analyze distributional patterns in spatial data.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It fills a specific role in the PySAL ecosystem for spatial inequality measurement. Install it if you are working with geographic or regional data and need to quantify distributional disparities.
Install
inequality on PyPI
pip
pip install inequalityuv
uv add inequalitypoetry
poetry add inequalityInstalling inequality
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance as of July 2026, with recent commits and an open repository. Requires current Python (3.11+) and five common scientific dependencies (numpy, scipy, pandas, matplotlib, libpysal).
License in practice
BSD 3-Clause permissive license allows use in most commercial and open-source projects with minimal restrictions; attribution required but no copyleft obligations.
Quickstart
pip install inequality
import inequality
from libpysal import examples
# Load spatial data and apply inequality measures
Requires Python 3.11 or later; libpysal must be installed as a runtime dependency.
Verify before relying
- Specific inequality metrics or methods provided by the package (e.g., Gini, Theil, Atkinson indices).
- Whether the package includes visualization functions beyond matplotlib integration.
- Performance characteristics or scalability limits for large spatial datasets.
Package facts
| License | BSD 3-Clause (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — libpysal, matplotlib, numpy, pandas, scipy |
| Maintenance | actively maintained — 400 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 100,658/month — #12,977 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: inequality-1.1.2-py3-none-any.whl
Keywords: spatial statistics, spatial inequality
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
accessCalculates spatial accessibility metrics to…
permissive · top 15,000 on PyPI
esdaesda computes global and local spatial…
permissive · top 15,000 on PyPI
libpysallibpysal provides core spatial analysis…
permissive · top 15,000 on PyPI
pointpatsPointpats provides statistical methods for…
permissive · top 15,000 on PyPI
toblerTobler transfers spatial data between different…
permissive · top 15,000 on PyPI
segregationCalculates over 40 segregation indices—both…
permissive · top 15,000 on PyPI
pysalPySAL is a meta-package that bundles 29 spatial…
permissive · top 15,000 on PyPI
momepyMomepy quantifies urban form through…
permissive · top 15,000 on PyPI
spaghettiSpaghetti analyzes network-based spatial data…
permissive · top 15,000 on PyPI
giddyGiddy provides methods for exploratory…
permissive · top 15,000 on PyPI