$npx skillfedfor your agent

mgwr

multiscale geographically weighted regression

Worth itPyPI Scientific/EngineeringReleased Jan 2024101.8K downloads / mo3-Clause BSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — mgwr-2.2.1-py3-none-any.whl
v2.2.1 · released 2024-01-06 · Python >3.5 · 5 runtime deps: scipy, numpy, libpysal, spglm, spreg

Yes. The package is production-stable, actively maintained, has no known vulnerabilities, and low installation friction. It fills a specialized but well-established niche in spatial statistics. Install it if you need to model geographic variation in regression relationships; skip it if your analysis is non-spatial or you need only global regression coefficients.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction installation with a pure-Python wheel.
  • The package depends on five established scientific libraries (scipy, numpy, libpysal, spglm, spreg) that are well-maintained and widely available.
  • Maintenance is active with recent commits and production-stable status.

License · maintenance · safety

3-Clause BSD (permissive) — Licensed under 3-Clause BSD (permissive), so you can use, modify, and distribute the package freely in both open-source and commercial projects with minimal restrictions.

last release 2024-01-06 (951 days) · last repo commit 2026-04-05 · 432 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 101,811 downloads/mo, #12,914 on PyPI

Verify before relying

pip install mgwr

import mgwr.gwr as gwr
from mgwr.sel_bw import Sel_BW

# Prepare data: y (dependent), X (independent), coords (lat/lon)
bw = Sel_BW(coords, y, X).search()
model = gwr.GWR(coords, y, X, bw=bw).fit()
  • Whether parallel computing support requires additional setup or dependencies beyond the listed runtime packages.
  • Performance characteristics and scalability limits for large spatial datasets.
  • Availability and completeness of documentation for model diagnostics and covariate-specific inference workflows.
Same gist for agents: .md · .json

What it is and what it does

MGWR is a Python implementation of multiscale geographically weighted regression, a statistical method for modeling spatial relationships where regression coefficients vary across geographic locations. It extends traditional GWR by allowing different spatial scales (bandwidths) for different covariates, capturing the idea that some processes operate at finer or coarser geographic resolutions than others.

The package handles model calibration for Gaussian, Poisson, and binomial probability distributions; bandwidth selection via golden section or equal interval search; spatial prediction; and model diagnostics including multiple hypothesis test correction and local collinearity assessment. It builds on sparse generalized linear modeling (spglm) and integrates with the PySAL ecosystem (libpysal, spreg). Parallel computing is available for computationally intensive GWR and MGWR workflows.

Use it for

  • Analyze how housing price determinants vary geographically—e.g., proximity to transit matters more in urban areas than rural ones.
  • Model disease incidence or health outcomes across regions where risk factors operate at different spatial scales.
  • Estimate local effects of environmental variables (pollution, temperature) on ecological or agricultural outcomes.
  • Conduct spatial heterogeneity tests to determine whether a global regression model is appropriate or if local variation is significant.
  • Generate spatially-varying predictions and confidence intervals for regression surfaces across a study region.

Worth the install?

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

Worth it

Yes.

The package is production-stable, actively maintained, has no known vulnerabilities, and low installation friction. It fills a specialized but well-established niche in spatial statistics. Install it if you need to model geographic variation in regression relationships; skip it if your analysis is non-spatial or you need only global regression coefficients.

Install

mgwr on PyPI

Before you install

Low friction installation with a pure-Python wheel. The package depends on five established scientific libraries (scipy, numpy, libpysal, spglm, spreg) that are well-maintained and widely available. Maintenance is active with recent commits and production-stable status.

License in practice

Licensed under 3-Clause BSD (permissive), so you can use, modify, and distribute the package freely in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install mgwr

import mgwr.gwr as gwr
from mgwr.sel_bw import Sel_BW

# Prepare data: y (dependent), X (independent), coords (lat/lon)
bw = Sel_BW(coords, y, X).search()
model = gwr.GWR(coords, y, X, bw=bw).fit()

Verify before relying

  • Whether parallel computing support requires additional setup or dependencies beyond the listed runtime packages.
  • Performance characteristics and scalability limits for large spatial datasets.
  • Availability and completeness of documentation for model diagnostics and covariate-specific inference workflows.

Package facts

License3-Clause BSD permissive
Python supportSupports the current Python release >3.5
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
scipynumpylibpysalspglmspreg
MaintenanceActively maintained 951 days since the last release
Last repo commit
First released
Downloads101,811 / month, #12,914 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: GIS

Evidence: mgwr-2.2.1-py3-none-any.whl

Tags

Capabilities
geographically weighted regressionspatial regression analysislocal regression by locationGWR MGWR modelsspatial heterogeneity regressionmultiscale spatial modelingbandwidth selection spatial
Topics
spatial-statisticsgeospatial-analysisregression-modeling
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 › “geographically weighted regression”

  • mgwrCalibrates multiscale and traditional geographically weighted…
  • polars-olsPolars OLS provides Rust-optimized linear regression models (OLS,…
  • spglmFits Gaussian, Poisson, QuasiPoisson, and Logistic generalized linear…

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

More Scientific/Engineering packages

numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
pandas Worth it
PyPI · Scientific/Engineering · released Jul 2026

pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.

BSD-3-Clausecompiled wheel · 3.11+
769.1Mdownloads / mo
scipy Worth it
PyPI · Libraries · released Jun 2026

scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.

BSD-3-Clausecompiled wheel · 3.12+
449.0Mdownloads / mo
scikit-learn Worth it
PyPI · Software Development · released Jun 2026

scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.

Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.

BSD-3-Clausecompiled wheel · 3.11+
235.5Mdownloads / mo
dill Worth it
PyPI · Software Development · released Jan 2026

dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.

BSD-3-Clausepure Python · 3.9+
208.1Mdownloads / mo
multiprocess Worth it
PyPI · Software Development · released Jan 2026

Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.

Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.

BSD-3-Clausepure Python · 3.9+
202.7Mdownloads / mo

See also spglm · spint · spreg · gmr · pysal · glum · dask-glm · statsmodels · gstools · SALib