pysal
Meta Package for PySAL - A library of spatial analysis functions
Decision gist · record as of 2026-08-14
Yes, if you are doing geospatial data science or spatial econometrics. PySAL is actively maintained, has no known vulnerabilities, and bundles a mature ecosystem of specialized tools. The permissive BSD license poses no restriction. The main constraint is the Python 3.12 requirement; if you are on an older Python version, you cannot use it. For researchers, urban planners, or data scientists working with geographic data, this is a standard reference library.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.12 or later; geospatial analysis typically requires shapefiles or GeoDataFrames as input data.
- Low install friction with a wheel distribution.
- Actively maintained with a release 14 days ago and 1519 repository stars.
License · maintenance · safety
BSD 3-Clause (permissive) — BSD 3-Clause permissive license allows use in commercial and proprietary projects with minimal restrictions, requiring only license and copyright notice retention.
last release 2026-07-31 (14 days) · last repo commit 2026-08-03 · 1,519 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 108,571 downloads/mo, #12,552 on PyPI
Alternatives
Verify before relying
pip install pysal
import pysal
from libpysal import weights
from esda import Moran
# Use spatial analysis functions from bundled packages
w = weights.Rook.from_shapefile('data.shp')
moran = Moran(y, w)- Whether all 29 bundled packages are installed by default or if selective installation is possible.
- Performance characteristics and memory footprint when working with large geospatial datasets.
- Compatibility with specific GIS software or data formats beyond the standard vector formats mentioned.
What it is and what it does
PySAL is a meta-package that brings together a curated ecosystem of 29 spatial analysis libraries under one installation. Rather than a monolithic tool, it serves as an entry point to a family of specialized packages organized into four layers: foundational algorithms (libpysal), exploratory analysis (esda, giddy, pointpats, segregation, spaghetti, inequality, momepy), confirmatory modeling (spreg, mgwr, spglm, spint, spml), and applied methods (access, tobler, spopt). The package is designed for geospatial data scientists working with vector data who need to detect spatial patterns, build spatial networks, fit regression models on geographic data, or measure spatial inequality and segregation.
When you install pysal, you gain access to methods for spatial autocorrelation analysis, network-based inference, urban morphometrics, areal interpolation, spatial optimization, and accessibility modeling. The runtime dependencies include geopandas, shapely, scipy, scikit-learn, and pandas—standard tools for geospatial and statistical computing. This is a research-grade library with emphasis on econometric and statistical rigor rather than real-time GIS operations.
Use it for
- Detect spatial clusters and hot-spots in disease incidence, crime, or economic data using local spatial autocorrelation methods.
- Build and analyze transportation networks or social networks embedded in geographic space using spaghetti and network algorithms.
- Estimate spatial regression models to understand how geographic proximity influences outcomes in econometric studies.
- Measure urban form and morphology by analyzing building footprints and street networks with momepy.
- Calculate spatial accessibility indices to evaluate service coverage or travel-time equity across regions.
- Perform areal interpolation to downscale census or administrative data to finer geographic units.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are doing geospatial data science or spatial econometrics.
PySAL is actively maintained, has no known vulnerabilities, and bundles a mature ecosystem of specialized tools. The permissive BSD license poses no restriction. The main constraint is the Python 3.12 requirement; if you are on an older Python version, you cannot use it. For researchers, urban planners, or data scientists working with geographic data, this is a standard reference library.
Install
pysal on PyPI
Before you install
Low install friction with a wheel distribution. Actively maintained with a release 14 days ago and 1519 repository stars. Requires Python 3.12 or later, which narrows compatibility to recent Python versions.
Requires Python 3.12 or later; geospatial analysis typically requires shapefiles or GeoDataFrames as input data.
License in practice
BSD 3-Clause permissive license allows use in commercial and proprietary projects with minimal restrictions, requiring only license and copyright notice retention.
Quickstart
pip install pysal
import pysal
from libpysal import weights
from esda import Moran
# Use spatial analysis functions from bundled packages
w = weights.Rook.from_shapefile('data.shp')
moran = Moran(y, w)
Verify before relying
- Whether all 29 bundled packages are installed by default or if selective installation is possible.
- Performance characteristics and memory footprint when working with large geospatial datasets.
- Compatibility with specific GIS software or data formats beyond the standard vector formats mentioned.
Package facts
| License | BSD 3-Clause permissive |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 29 packageslazy_loaderbeautifulsoup4geopandasnumpypackagingpandasplatformdirsrequestsscipyshapelyscikit-learnlibpysalaccessesdagiddyinequalitypointpatssegregationspaghettimgwrmomepyspglmspintspmlspregtoblermapclassifysplotspopt |
| Maintenance | Actively maintained 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 108,571 / month, #12,552 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: GIS |
Evidence: pysal-26.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
An agent finds packages by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language. Give your agent the search over MCP.
More GIS packages
Shapely provides Python tools for creating, manipulating, and analyzing 2D geometric objects (points, lines, polygons) using the GEOS library, with both scalar and vectorized NumPy-based operations.
pyproj provides a Python interface to PROJ, enabling cartographic projections and coordinate system transformations for geospatial applications.
GeoPandas extends pandas DataFrames to handle geographic data, combining pandas operations with shapely geometry and spatial analysis capabilities that would otherwise require a spatial database.
Install it if you work with geographic data in Python and want to avoid setting up a spatial database or learning a separate GIS tool.
geopy is a Python client for geocoding and distance calculation that converts addresses to coordinates and vice versa using multiple web-based geocoding services, and computes geodesic and great-circle distances between geographic points.
Install it if you need geocoding or distance calculations in your application.
Pyogrio provides fast, bulk-oriented read and write access to vector spatial data formats (Shapefile, GeoPackage, GeoJSON, etc.) via GDAL/OGR bindings, typically for use with GeoPandas GeoDataFrames.
h3 provides Python bindings to Uber's H3 geospatial indexing library, converting geographic coordinates into hierarchical hexagonal grid cells and performing spatial operations on them.
See also esda · segregation · splot · libpysal · pointpats · momepy · spaghetti · inequality · access · spreg