spatial-cluster-helper
A helper package for analyzing and visualizing spatial clusters, designed to facilitate reproducibility and ease of use in academic and applied research contexts. Developed in support of Anselin (2024).
📦 Features
Cluster Analysis & Validation
- Cluster Statistics: Generate labels/cardinality summaries (
cluster_stats) - Fit Metrics: TSS, WSS, BSS, and cluster quality ratios (
cluster_fit) - Stress Evaluation: Raw/normalized stress values (
stress_value) - Optimal Clusters: Elbow plot visualization for K-means (
elbow_plot) - Silhouette Analysis: Observation-level silhouette scores (
plot_silhouette)
Spatial Analysis Tools
- Validation Indices:
- Fragmentation (entropy/Simpson) (
cluster_fragmentation) - Spatial autocorrelation (Join Count Ratios) (
cluster_joincount) - Compactness & diameter metrics (
cluster_compactness,cluster_diameter)
- Fragmentation (entropy/Simpson) (
- Neighborhood Overlap: KNN coverage comparison (
common_coverage)
Visualization
- Cluster Maps: Geographic cluster visualization (
cluster_map) - Dendrograms: Hierarchical clustering trees (
plot_dendrogram) - Scatter Plots: 2D cluster visualization (
plot_scatter)
Utilities
- Cluster Centers: Mean/median descriptors (
cluster_center) - Data Management: Automated example datasets handling (
ensure_datasets)
🚀 Installation
You can install the package from pypi:
pip install spatial-cluster-helper
🗂️ Usage
You can check several usage examples in the lab materials developed for the Spatial Cluster Analysis course taught at the University of Chicago in the Winter of 2025 here.
📄 License
This project is licensed under the MIT License.
Developed at The Center for Spatial Data Science at the University of Chicago by Luc Anselin and Pedro Amaral
Release files for spatial-cluster-helper 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spatial_cluster_helper-0.1.4.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spatial_cluster_helper-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.4 kB
Release files / spatial_cluster_helper-0.1.4.tar.gz
| Download URL | spatial_cluster_helper-0.1.4.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4918b1d7460aa2974f2934b4df2f404b07869d3ec217d790967a5ed3a1ad9dcf
|
|
BLAKE2b-256 checksum How to use checksums |
669645eea220bb7554b7f21bbbbd9dfc39148c249bf2d6f329a5608273ded41e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / spatial_cluster_helper-0.1.4-py3-none-any.whl
| Download URL | spatial_cluster_helper-0.1.4-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7dd54c27caf5a34afabeea1a3894011944a2677b5df2028ee2a5eddd87a41479
|
|
BLAKE2b-256 checksum How to use checksums |
0047f3ef6c1ebbd8e7816d7e56cba965392e00bf23265acddb5d315f5a007096
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|