mapclassify
Classification Schemes for Choropleth Maps.
What it is and what it does
Mapclassify solves the problem of how to divide continuous geographic data into discrete classes for color-coded choropleth maps. It focuses on the algorithmic side—determining how many classes to use and which observations belong in each—leaving the actual map rendering to downstream visualization packages. The package is built on a stack of scientific Python tools: numpy for numerical operations, pandas for data handling, scikit-learn and scipy for statistical methods, and networkx for graph-based algorithms that some classification schemes may require.
Typically used in geographic data science workflows, it sits between raw spatial data and visualization, taking continuous values and producing class assignments that make choropleth maps readable and meaningful. The package is maintained as part of the PySAL ecosystem and is actively developed.
Use it for:
- Determine optimal class boundaries for a choropleth map before rendering with downstream visualization tools.
- Assign spatial data to color classes using different classification algorithms to compare visual patterns.
- Classify continuous geographic data into discrete categories for thematic mapping.
- Experiment with multiple classification schemes on the same dataset to find the most effective visualization.
- Automate class assignment in batch geographic data processing pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Mapclassify implements classification schemes for choropleth maps, determining the optimal number of classes and assigning observations to them for use with geovisualization packages.
Yes. Mapclassify is actively maintained, has no known vulnerabilities, uses a permissive BSD 3-Clause license, and solves a specific problem in geographic data visualization. Install it if you are building choropleth maps and need to classify continuous spatial data into discrete color classes.
Install
mapclassify on PyPI
pip
pip install mapclassifyuv
uv add mapclassifypoetry
poetry add mapclassifyInstalling mapclassify
Before you install
Low install friction with a pure Python wheel. Active maintenance with a recent release and steady development. Requires Python 3.12 or later.
License in practice
BSD 3-Clause permissive license allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention.
Quickstart
pip install mapclassify
import mapclassify
# Pass data and classification scheme to mapclassify for class assignment
Requires Python 3.12 or later.
Verify before relying
- Whether the package supports all common choropleth classification methods beyond what the description implies.
- Performance characteristics when classifying large spatial datasets.
- Whether it integrates directly with upstream packages or requires manual data passing.
Package facts
| License | BSD 3-Clause (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — networkx, numpy, pandas, scikit-learn, scipy |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 913,662/month — #4,737 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mapclassify-2.11.0-py3-none-any.whl
Keywords: spatial statistics, geovisualization
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
pointpatsPointpats provides statistical methods for…
permissive · top 15,000 on PyPI
plotbinPlotBin provides utilities to create and…
unclear · top 15,000 on PyPI
pystac-ext-classificationProvides PySTAC extension support for…
permissive · top 5,000 on PyPI
segregationCalculates over 40 segregation indices—both…
permissive · top 15,000 on PyPI
splotsplot creates static and interactive…
permissive · top 15,000 on PyPI
dask-geopandasDask-GeoPandas parallelizes geospatial…
permissive · top 15,000 on PyPI
toblerTobler transfers spatial data between different…
permissive · top 15,000 on PyPI
pysalPySAL is a meta-package that bundles 29 spatial…
permissive · top 15,000 on PyPI
giddyGiddy provides methods for exploratory…
permissive · top 15,000 on PyPI