$npx skillfedfor your agent

spglm

Sparse Generalized Linear Models

With conditionsPyPI GISReleased Oct 2023103.0K downloads / moBSD 3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — spglm-1.1.0-py3-none-any.whl
v1.1.0 · released 2023-10-25 · Python >=3.9 · 4 runtime deps: libpysal, numpy, scipy, spreg

Yes, if you are working with sparse generalized linear models in a spatial statistics context (especially within PySAL). Install with caution if you need robust estimation of ill-conditioned data—the package's direct normal-equation solver is not the most numerically stable approach; Statsmodels is better for that. No known vulnerabilities and active maintenance make it a safe dependency.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Low friction: pure Python wheel with four standard dependencies (numpy, scipy, libpysal, spreg).
  • Actively maintained as of July 2026 with no known vulnerabilities.

License · maintenance · safety

BSD 3-Clause (permissive) — BSD 3-Clause permissive license allows commercial and private use with attribution; no restrictions on derivative works.

last release 2023-10-25 (1024 days) · last repo commit 2026-07-07 · 37 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 103,036 downloads/mo, #12,832 on PyPI

Verify before relying

pip install spglm
import spglm
from spglm.glm import GLM
model = GLM(y, X, family=spglm.family.Gaussian())
results = model.fit()
  • Whether the package is actively used in production spatial analysis workflows beyond PySAL ecosystem.
  • Performance characteristics and scalability limits for very large sparse matrices.
  • Availability and completeness of documentation beyond the homepage.
Same gist for agents: .md · .json

What it is and what it does

spglm is a lightweight, sparse-compatible implementation of generalized linear modeling adapted from Statsmodels. It provides estimation of Gaussian, Poisson, QuasiPoisson, and Logistic regression models using iteratively weighted least squares (IWLS), designed specifically for the sparse design matrices that arise in spatial interaction and geographic weighted regression problems. The package trades some diagnostic breadth for computational efficiency and sparse-matrix support, making it a specialized tool for spatial statistics rather than a general-purpose GLM framework.

The package depends on numpy, scipy, libpysal, and spreg, and is maintained as part of the PySAL ecosystem. It supports Python 3.9 and later and installs with low friction. The implementation solves least-squares normal equations directly rather than using pseudo-inverse methods, which the authors note is less robust for ill-conditioned data; for more comprehensive GLM functionality they recommend the original Statsmodels package.

Use it for

  • Fit Poisson or Logistic models to sparse spatial interaction matrices in transportation or migration studies.
  • Estimate geographic weighted regression (GWR) components with sparse design matrices.
  • Perform QuasiPoisson regression when overdispersion is present in count data.
  • Compute GLM diagnostics (residuals, fitted values, deviance) for sparse regression problems.
  • Build spatial statistical models as part of a PySAL-based analysis pipeline.

Worth the install?

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

With conditions

Yes, if you are working with sparse generalized linear models in a spatial statistics context (especially within PySAL).

Install with caution if you need robust estimation of ill-conditioned data—the package's direct normal-equation solver is not the most numerically stable approach; Statsmodels is better for that. No known vulnerabilities and active maintenance make it a safe dependency.

Install

spglm on PyPI

Before you install

Low friction: pure Python wheel with four standard dependencies (numpy, scipy, libpysal, spreg). Actively maintained as of July 2026 with no known vulnerabilities.

Requires Python 3.9 or later.

License in practice

BSD 3-Clause permissive license allows commercial and private use with attribution; no restrictions on derivative works.

Quickstart

pip install spglm
import spglm
from spglm.glm import GLM
model = GLM(y, X, family=spglm.family.Gaussian())
results = model.fit()

Verify before relying

  • Whether the package is actively used in production spatial analysis workflows beyond PySAL ecosystem.
  • Performance characteristics and scalability limits for very large sparse matrices.
  • Availability and completeness of documentation beyond the homepage.

Package facts

LicenseBSD 3-Clause permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
4 packages
libpysalnumpyscipyspreg
MaintenanceActively maintained 1,024 days since the last release
Last repo commit
First released
Downloads103,036 / month, #12,832 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 :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: GIS

Evidence: spglm-1.1.0-py3-none-any.whl

Tags

Capabilities
sparse generalized linear modelsGLM with sparse matricespoisson regression sparselogistic regression sparsespatial statistics regressionIWLS estimationquasipoisson regression
Topics
spatial-statisticssparse-matricesglm
PyPI keywords
spatialstatistics

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 › “sparse generalized linear models”

  • spglmFits Gaussian, Poisson, QuasiPoisson, and Logistic generalized linear…
  • glumglum is a high-performance Python library for fitting generalized…
  • dask-glmDistributed generalized linear model fitting using Dask for parallel…

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 glum · gmr · mgwr · qdldl · spint · statsmodels · dask-glm · linearmodels · spreg · tabmat

Further reading