Spatial statistics for planners — inside the QGIS Processing Toolbox.
From "is this clustered?" to "which model explains it?" — 30+ Processing algorithms covering the full spatial-statistics workflow, with guidance built in at every step.
Install · Tool catalog · Guided workflow · Optional libraries · Sample data · Türkçe
| 🧭 It guides, not just computes | A Workflow Advisor recommends a tool sequence for your analysis goal; a Data Readiness Audit checks geometry validity, CRS risk, outliers and multicollinearity before you model. Every report explains assumptions, pitfalls and safer moves. |
| 📊 Full method ladder | Global pattern scans → local hot spots/outliers → centers & direction → OLS/GLR → spatial lag & error models → GWR/MGWR → model comparison → Monte Carlo sensitivity. One provider, one consistent reporting style. |
| 🧪 Reproducible & honest | Permutation inference where it matters, CSV/JSON exports for audit handoffs, and HTML analyst guidance attached to results — interpretation included, not implied. |
| 🏙 Planner-first | Bundled İzmir neighbourhoods dataset (237 polygons, heat/vegetation/population/park/street-network indicators) so every tool is try-able in one click. |
| 🔌 Honest dependencies | Core tools run on pure QGIS. Advanced methods (PySAL/MGWR/scikit-learn) are optional — a Library Status tool diagnoses the QGIS Python environment and a transparent installer previews the exact pip command before touching anything. |
All tools live under Processing Toolbox → PlanX GeoStats Lab, organised as a numbered workflow:
GeoStats Library Status · Install/Update GeoStats Libraries · Sample Dataset Guide · GeoStats Workflow Advisor · Data Readiness Audit
Export Attributes · Calculate Distance Band (neighbour-distance selection)
| Tool | Question it answers |
|---|---|
| Average Nearest Neighbor | Are my points clustered or dispersed? |
| Ripley's K | …and at which distances? |
| Global Moran's I | Is the attribute spatially autocorrelated? |
| Incremental Spatial Autocorrelation | At what scale does clustering peak? |
| Getis-Ord General G | Do high or low values dominate the clustering? |
| Bivariate Lee's L | Do two indicators co-cluster in space? |
| Spatial Inequality (Gini + Spatial Gini) | How unequal is the distribution — and how much of that inequality is spatial? |
| Tool | Output |
|---|---|
| Hot Spot Analysis (Getis-Ord Gi*) | Statistically significant hot/cold spots |
| Cluster & Outlier Analysis (Local Moran's I / LISA) | HH·LL clusters, HL·LH outliers |
| Multivariate Clustering | K-means feature groups across several indicators |
| Similarity Search | Features most similar to your reference feature |
Mean Center · Median Center · Central Feature · Standard Distance · Standard Deviational Ellipse · Linear Directional Mean
| Tool | Method |
|---|---|
| Ordinary Least Squares | Baseline regression + residual diagnostics |
| Generalized Linear Regression | Gaussian/binary/count families |
| Exploratory Regression | Search candidate variable combinations |
| Spatial Lag Regression | Spatial dependence in the outcome |
| Spatial Error Regression | Spatial dependence in the residuals |
| GWR / MGWR | Local — and multiscale local — relationships |
| Model Comparison | Score competing models side by side |
| Monte Carlo Sensitivity Test | How robust is the result to perturbation? |
The intended session is itself a method:
00 Data Readiness Audit → 02 pattern scan → 03 hot spots / LISA
↓ (is it clustered?) (where exactly?)
Workflow Advisor ↓
(pick the goal, 05 OLS → spatial lag/error → GWR/MGWR → comparison → sensitivity
get the sequence) (why? and is the "why" stable across space and noise?)
Each report ends with interpretation guidance — what the statistic assumes, what commonly goes wrong, and which tool to run next. The decision logic lives in QGIS-independent core helpers, so it is unit-tested headlessly on every release.
Core tools are pure QGIS. Advanced methods use, when present:
libpysal · esda · spreg · mgwr · scikit-learn · numba
The honest installer: QGIS plugins run inside QGIS's own Python — installing into Anaconda or a system Python won't help. GeoStats Library Status shows exactly which interpreter QGIS uses and what's missing; Install/Update GeoStats Libraries previews the full pip command and only runs it after an explicit confirmation checkbox. Restart QGIS afterwards.
| Dataset | Contents | Use it for |
|---|---|---|
İzmir neighbourhoods (planx_geostats_izmir_neighborhoods.gpkg) |
237 polygons; heat, vegetation, population, parks, street-network structure, building form, model-QA fields — English schema | Realistic end-to-end workflow practice |
Synthetic QA fixture (planx_geostats_synthetic_qa.gpkg) |
Deterministic point/line/polygon + model-output layers | Edge cases: KNN weights, multipart lines, binary/count models |
Load either (or both) via 00 → Sample Dataset Guide, then run Data Readiness Audit for suggested analysis roles and starter sequences.
From QGIS Plugin Hub (recommended)
Plugins → Manage and Install Plugins…→ search PlanX GeoStats Lab → Install. Tools appear in the Processing Toolbox (no toolbar/menu clutter — this plugin is Processing-only by design).
From ZIP
Download the latest zip from Releases →
Plugins → Install from ZIP.
| Requirement | Value |
|---|---|
| QGIS | 3.28 LTR → 4.x (validated on both runtimes) |
| Hard dependencies | None — pure QGIS for core tools |
| Optional | PySAL stack + scikit-learn via the built-in guided installer |
| License | GPL-3.0 |
- Headless smoke tests (
tests/smoke_core.py,smoke_sample_data.py,smoke_provider_catalog.py) run without QGIS and gate every release. The report decision logic is intentionally kept in QGIS-independent core helpers, so workflow advising, model-comparison scoring, Monte Carlo sensitivity interpretation, Global Moran's I report interpretation and Spatial Gini inequality decomposition are unit-tested without launching QGIS. - A full QGIS runtime matrix executes every algorithm against the bundled sample data on QGIS 3 LTR and QGIS 4.
- A manual QA test matrix (
QA_MANUAL_TEST_MATRIX.md) covers setup, statistics, symbology, report interpretation and release gates. - The release-zip verifier asserts that developer-only paths are absent, algorithm icons are present, metadata points to a packaged icon, and the plugin remains Processing-only with no menu or toolbar UI hooks.
Developer validation commands
py -3 planx_geostats\tests\smoke_core.py
py -3 planx_geostats\tests\smoke_sample_data.py
py -3 planx_geostats\tests\smoke_provider_catalog.py
py -3 packaging\test_verify_release_zip.py
py -3 packaging\validate_plugin.py planx_geostats --strict
powershell -NoProfile -ExecutionPolicy Bypass -File .\packaging\Build-PluginZip.ps1 -PluginDir planx_geostats
py -3 packaging\verify_release_zip.py QGIS_Plugin_Releases\planx_geostats.zip --root planx_geostats --version 0.9.17PlanX GeoStats Lab, QGIS İşlem Araç Kutusu (Processing) içinde çalışan, plancılar için tasarlanmış bir mekânsal istatistik laboratuvarıdır:
- 30+ araç, numaralı iş akışı: veri hazırlık ve denetim (00–01) → küresel desen taraması: Ortalama En Yakın Komşu, Ripley K, Global Moran I, General G, İki Değişkenli Lee L, Mekânsal Gini eşitsizliği (02) → sıcak nokta (Getis-Ord Gi*) ve LISA küme/aykırı analizi, çok değişkenli kümeleme, benzerlik araması (03) → merkez/yön/dağılım araçları (04) → EKK, GLR, mekânsal gecikme/hata modelleri, keşifsel regresyon, GWR/MGWR, model karşılaştırma ve Monte Carlo duyarlılık testi (05).
- Yol gösteren laboratuvar: Workflow Advisor analiz hedefinize göre araç sırası önerir; Data Readiness Audit modellemeden önce geometri, CRS, aykırı değer ve çoklu doğrusallık risklerini raporlar. Her raporun sonunda varsayımlar, sık hatalar ve "bundan sonra ne çalıştırmalı" rehberi vardır.
- Örnek veri dahildir: 237 mahalleli İzmir veri seti (ısı, bitki örtüsü, nüfus, park, sokak ağı göstergeleri) ve sentetik QA veri seti — her araç tek tıkla denenebilir.
- Dürüst bağımlılık yönetimi: Çekirdek araçlar saf QGIS ile çalışır; gelişmiş yöntemler için PySAL/MGWR/scikit-learn kurulumunu, çalıştırmadan önce pip komutunu aynen gösteren şeffaf bir kurulum aracı üstlenir.
Kurulum: QGIS → Eklentiler → Eklentileri Yönet ve Kur → PlanX GeoStats Lab aratın; araçlar İşlem Araç Kutusu'nda görünür.
This plugin is one of 15 open-source QGIS plugins for urban planning by the same author:
| Planning & analysis | CAD & production | 3D & visualization |
|---|---|---|
| PlanX — spatial-planning suite | PlanX CAD Toolset — drafting-grade CAD | PlanX 3D City — Three.js city viewer |
| GeoStats Lab — spatial statistics | EasyFillet — tangent-arc fillet | 3D OSM Model — OSM → 3D city in browser |
| Suitability Lab — raster MCDA | Settlement Toolset — 9-stage settlement plans | OSM Quick 3D — OSM → native QGIS 3D |
| DataCube Lab — spatiotemporal cubes | UIP Toolset — Turkish master-plan automation | Urban Procedural 3D — parametric zoning lab |
| Urban Resilience — 28 resilience tools | ParcelFlux — parcel subdivision | CartoLab — publication cartography |
- 🐛 Bugs / requests → Issues
- 📜 Changelog → CHANGELOG.md follows Keep a Changelog
- ✅ Before a PR:
py -3 tests/smoke_core.py && py -3 tests/smoke_sample_data.py && py -3 tests/smoke_provider_catalog.py(headless, no QGIS required)
Yusuf Eminoğlu — urban planner & developer GitHub · yusuf.eminoglu@deu.edu.tr
