$npx skillfedfor your agent

spreg

PySAL Spatial Econometric Regression in Python

With conditionsPyPI GISReleased Jul 2026137.3K downloads / moBSD 3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — spreg-1.9.1-py3-none-any.whl
v1.9.1 · released 2026-07-27 · Python >=3.12 · 5 runtime deps: libpysal, numpy, pandas, scikit-learn, scipy

Yes, if you are modeling spatial data with autocorrelation. The package is actively maintained, has low install friction, carries a permissive BSD 3-Clause license, and integrates cleanly with numpy, pandas, scikit-learn, and scipy. No known vulnerabilities. Requires Python 3.12 or later, which may constrain legacy environments. Suitable for academic and applied spatial econometric work.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.12 or later.
  • Low friction installation with a pure-Python wheel.
  • Active maintenance: last commit 2026-07-27, released 18 days ago.

License · maintenance · safety

BSD 3-Clause (permissive) — BSD 3-Clause permissive license allows commercial and private use with attribution and liability disclaimer.

last release 2026-07-27 (18 days) · last repo commit 2026-07-27 · 90 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 137,298 downloads/mo, #11,372 on PyPI

Verify before relying

pip install spreg
import spreg
from libpysal import weights
from spreg import OLS
# model = OLS(y, X, w=weights_matrix)
  • Whether the package supports spatial lag and spatial error models specifically, or other SAR variants
  • Performance characteristics or scalability limits for large spatial datasets
  • Availability and completeness of documentation beyond the repository README
Same gist for agents: .md · .json

What it is and what it does

spreg is a Python package for estimating simultaneous autoregressive spatial regression models, part of the PySAL ecosystem. It addresses the statistical modeling of spatial processes where observations are not independent but interact with neighboring observations—a common scenario in geography, economics, and environmental science. The package builds on established scientific Python libraries (numpy, pandas, scikit-learn, scipy) and integrates with libpysal for spatial data structures.

The package is designed for researchers and practitioners who need to move beyond standard regression when spatial autocorrelation is present in their data. It handles the computational complexity of fitting models where the outcome at one location depends on outcomes at nearby locations, which violates the independence assumption of ordinary regression and requires specialized estimation techniques.

Use it for

  • Model house prices or property values where neighboring properties influence each other through spatial spillover effects
  • Estimate regional economic growth where neighboring regions' economies interact and influence each other
  • Analyze disease or pollution incidence across geographic areas accounting for spatial clustering and diffusion
  • Study crime rates in neighborhoods where crime in adjacent areas affects local crime patterns
  • Model agricultural yields or environmental variables across spatial fields with spatial correlation

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are modeling spatial data with autocorrelation.

The package is actively maintained, has low install friction, carries a permissive BSD 3-Clause license, and integrates cleanly with numpy, pandas, scikit-learn, and scipy. No known vulnerabilities. Requires Python 3.12 or later, which may constrain legacy environments. Suitable for academic and applied spatial econometric work.

Install

spreg on PyPI

Before you install

Low friction installation with a pure-Python wheel. Active maintenance: last commit 2026-07-27, released 18 days ago. Requires Python 3.12 or later.

Requires Python 3.12 or later.

License in practice

BSD 3-Clause permissive license allows commercial and private use with attribution and liability disclaimer.

Quickstart

pip install spreg
import spreg
from libpysal import weights
from spreg import OLS
# model = OLS(y, X, w=weights_matrix)

Verify before relying

  • Whether the package supports spatial lag and spatial error models specifically, or other SAR variants
  • Performance characteristics or scalability limits for large spatial datasets
  • Availability and completeness of documentation beyond the repository README

Package facts

LicenseBSD 3-Clause permissive
Python supportSupports the current Python release >=3.12
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
libpysalnumpypandasscikit-learnscipy
MaintenanceActively maintained 18 days since the last release
Last repo commit
First released
Downloads137,298 / month, #11,372 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone 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: spreg-1.9.1-py3-none-any.whl

Tags

Capabilities
spatial regression modelsautoregressive spatial econometricsspatial modeling pythonsimultaneous autoregressive estimationspatial econometric regressionspatial interaction modelinggis regression analysis
Topics
spatial-analysiseconometricsgis
PyPI keywords
spatial econometricsregressionstatisticsspatial modeling

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “spatial regression models”

  • spregspreg estimates simultaneous autoregressive spatial regression models…
  • mgwrCalibrates multiscale and traditional geographically weighted…
  • spglmFits Gaussian, Poisson, QuasiPoisson, and Logistic generalized linear…

Give your agent the search over MCP, or paste the wish link into any chat.

More GIS packages

shapely Worth it
PyPI · GIS · released Sep 2025

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.

BSD-3-Clausecompiled wheel · 3.10+
85.8Mdownloads / mo
pyproj Unrated
PyPI · Scientific/Engineering · released Aug 2025

pyproj provides a Python interface to PROJ, enabling cartographic projections and coordinate system transformations for geospatial applications.

MITcompiled wheel · 3.11+
28.0Mdownloads / mo
geopandas Worth it
PyPI · GIS · released Jun 2026

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.

BSD-3-Clausepure Python · 3.10+
24.8Mdownloads / mo
geopy Worth it
PyPI · Python Modules · released Jul 2026

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.

MITpure Python · 3.8+
19.0Mdownloads / mo
pyogrio Worth it
PyPI · GIS · released Jun 2026

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.

MITcompiled wheel · 3.10+
17.2Mdownloads / mo
h3 Worth it
PyPI · GIS · released May 2026

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.

Apache-2.0compiled wheel · 3.10+
12.1Mdownloads / mo

See also spint · splot · pysal · spglm · esda · mgwr · linearmodels · spopt · arch · gstools