Skip to main content
geoai2analytics logo

geoai2analytics-sdk

CI PyPI version Python version support Documentation License: MIT Code style: Ruff Test Coverage

Pure-Python Spatial Statistics, Econometrics, and Explainable GeoAI Engine.

📖 Open Interactive Web Manual (GitHub Pages)📦 PyPI Package🐛 Issue Tracker


🌟 Overview

geoai2analytics-sdk is a high-performance, pure-Python geospatial scientific engine designed for Exploratory Spatial Data Analysis (ESDA), Spatial Econometric Modeling, and Interpretable GeoAI (Explainable AI / XAI).

Built entirely with standard scientific foundations (NumPy, SciPy), it executes advanced spatial autocorrelation, multiscale local regressions, and spatial machine learning attributions completely headless—ideal for Jupyter Notebooks, automated pipelines, GeoPandas workflows, and cloud-native spatial analytics.


🚀 Key Features & Capabilities

1. Spatial Autocorrelation & Clustering (ESDA)

  • Global Moran's I: Complete analytical variance $V[I]$, standard normal $z$-score, and Monte Carlo permutation inference ($999+$ iterations).
  • Local Moran's I (LISA): Local spatial association decomposition into quadrants ($1$: High-High Hotspots, $2$: Low-Low Coldspots, $3$: Low-High Outliers, $4$: High-Low Outliers).
  • Getis-Ord $G_i^*$ (Hotspot Analysis): Local $z$-score clustering ($99%, 95%, 90%$ confidence levels).
  • Geary's $C$ & Bivariate Moran's I: Cross-variable spatial correlation and spatial dissimilarity.
  • Spatial Gini Inequality: Rey's spatial concentration decomposition.

2. Spatial Econometrics & Local Regressions

  • Geographically Weighted Regression (GWR): Golden-section search bandwidth optimization, Gaussian/Bisquare/Exponential spatial kernels, local parameter estimates $\hat{\beta}_i$, local $t$-statistics, local $R_i^2$, and Hurvich AICc.
  • Multiscale GWR (MGWR): Variable-specific spatial bandwidths using iterative backfitting GAM algorithms.
  • Spatial Autoregressive Models (SAR / Spatial Lag): 2-Stage Least Squares (2SLS) estimation of spatial autoregressive parameter $\rho$.

3. Explainable GeoAI (XAI) & Spatial Machine Learning

  • Spatial SHAP (Shapley Additive Explanations): Model-agnostic Shapley feature attributions with continuous 2D geographic coordinate map decomposition.
  • Spatial Cross-Validation (Spatial CV): Spatial $K$-Fold coordinate clustering to eliminate spatial autocorrelation data leakage.
  • Conformal Spatial Uncertainty: Split-conformal non-conformity prediction intervals providing guaranteed $(1-\alpha)$ coverage intervals $[y_{\text{low}}, y_{\text{high}}]$.

💻 Installation

pip install geoai2analytics-sdk

⚡ Quickstart Example

import numpy as np
import geoai2analytics as geoai

# 1. Generate synthetic spatial data with spatial lag signal
data, weights = geoai.generate_synthetic_spatial_dataset(n=120)

# 2. Test Global Spatial Autocorrelation
moran = geoai.global_moran(data["y"], weights, permutations=999)
print(f"Moran's I: {moran.I:.4f} | z-score: {moran.z_score:.2f} | p-value: {moran.p_sim:.4f}")

# 3. Detect Local Hotspots (LISA)
lisa = geoai.local_moran(data["y"], weights)
print(f"High-High Hotspots: {lisa.high_high_count} | Low-Low Coldspots: {lisa.low_low_count}")

# 4. Geographically Weighted Regression (GWR)
coords = np.column_stack([data["x_coord"], data["y_coord"]])
X = np.column_stack([data["X1"], data["X2"]])

gwr = geoai.GWR(coords, data["y"], X, kernel="bisquare", adaptive=True)
res = gwr.fit()
print(f"Optimal Bandwidth: {res.bandwidth} | Global R²: {res.global_r2:.3f} | AICc: {res.aicc:.1f}")

📄 License & Academic Citation

Distributed under the MIT License.

@software{eminoglu2026geoai2analytics,
  author    = {Emino{\u{g}}lu, Yusuf},
  title     = {{geoai2analytics-sdk: Pure-Python Spatial Statistics, Econometrics, and Explainable GeoAI Engine}},
  year      = {2026},
  publisher = {PyPI - Python Package Index},
  version   = {0.1.0},
  url       = {https://github.com/YusufEminoglu/geoai2analytics-sdk}
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoai2analytics_sdk-0.1.0.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geoai2analytics_sdk-0.1.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file geoai2analytics_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: geoai2analytics_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for geoai2analytics_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 17c01f82c24676156c50085896793238d52a27f969c4c108b00fa47b7994325f
MD5 80dbd323efb366681228885925975a8d
BLAKE2b-256 696c9f067c31129f7f6fd106429076aa83629e1edbe2a27e8ce04f855f76a5c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoai2analytics_sdk-0.1.0.tar.gz:

Publisher: publish.yml on YusufEminoglu/geoai2analytics-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geoai2analytics_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for geoai2analytics_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0fbec13d075871e66cf9ed5b63c6732722fb6f9a5d8b55c67b6e63cb4513690d
MD5 d517ecf5b06b37e5bd58271aee4cc4ad
BLAKE2b-256 cff360c8c941f6c5a920b1a00b7762fbf30c06bdde4f3b3edb48952646aabafa

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoai2analytics_sdk-0.1.0-py3-none-any.whl:

Publisher: publish.yml on YusufEminoglu/geoai2analytics-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.12.1

2 files

0.12.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page