skillfed

inequality

inequality: Spatial inequality analysis

inequality v1.1.2 100.7K downloads/30d#12,977 on PyPI36
Permissive license BSD 3-Clause Active released

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 inequality

uv

uv add inequality

poetry

poetry add inequality

Installing 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

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

Tags

spatial inequality measurementgeographic inequality analysisspatial statistics pythonregional inequality metricspysal spatial analysisgini coefficient spatialinequality distribution mapping
spatial-analysisgispysal

More GIS packages