Skip to content
Back to skills

GEO INFER MATH

ASecurity

Spatial statistics, topology, and graph theory for geospatial analysis. Use when computing Moran's I, spatial autocorrelation, geodesic distances, graph connectivity, kernel density estimation, or any mathematical operation on geographic data.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 1, 2026
datapythongo

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add ActiveInferenceInstitute/GEO-INFER --skill GEO-INFER-MATH --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of GEO INFER MATH?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for GEO INFER MATH
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/activeinferenceinstitute-geo-infer-math/badge)](https://www.skillsdirectory.com/skills/activeinferenceinstitute-geo-infer-math)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: geo-infer-math
description: Spatial statistics, topology, and graph theory for geospatial analysis. Use when computing Moran's I, spatial autocorrelation, geodesic distances, graph connectivity, kernel density estimation, or any mathematical operation on geographic data.
prerequisites:
  required: []
  recommended: []
difficulty: beginner
estimated_time: 30min
examples_dir: ../GEO-INFER-EXAMPLES/examples/
---

# GEO-INFER-MATH

## Instructions

Foundation module with zero internal dependencies. Provides mathematical primitives consumed by all other modules.

### Core Capabilities

- **Spatial statistics**: Moran's I, Geary's C, Getis-Ord G*, LISA, semivariograms
- **Interpolation**: IDW, kriging, RBF spatial interpolation
- **Graph theory**: Network analysis, shortest paths, centrality measures
- **Kernel density**: Gaussian KDE (scipy) for distribution comparison and divergence measures
- **Distance metrics**: Haversine, Vincenty, geodesic on WGS84 ellipsoid

### Key Imports

```python
# Spatial statistics
from geo_infer_math.core.spatial_statistics import (
    MoranI, SpatialDescriptiveStats,
    getis_ord_g, ripley_k, semivariogram,
    spatial_descriptive_statistics, spatial_entropy,
    local_indicators_spatial_association,
)
# Interpolation
from geo_infer_math.core.interpolation import (
    InterpolationConfig, SpatialInterpolator,
    IDWInterpolator, KrigingInterpolator, RBFInterpolator,
    InterpolationManager, create_interpolation_manager,
    interpolate_spatial_data, create_interpolation_grid,
)
# Optimization
from geo_infer_math.core.optimization import (
    OptimizationConfig, Optimizer,
    GradientDescentOptimizer, GeneticAlgorithmOptimizer,
    ScipyOptimizer, MultiObjectiveOptimizer,
    OptimizationManager, create_optimization_manager,
    optimize_function, compare_optimization_methods,
)
# Geometry / distance
from geo_infer_math.core.geometry import (
    Point, LineString, Polygon,
    haversine_distance, vincenty_distance,
    bearing, destination_point,
    point_in_polygon, buffer_point,
    line_intersection, polygon_area_spherical,
)
```

## Examples

```python
import numpy as np
from geo_infer_math.core.spatial_statistics import (
    MoranI, getis_ord_g, ripley_k, semivariogram,
    spatial_descriptive_statistics,
)

# Moran's I spatial autocorrelation
values = np.random.randn(100)
weights = np.random.rand(100, 100)
moran = MoranI(weights)
result = moran.compute(values)
print(f"Moran's I: {result['I']}, p-value: {result['p_value']}")

# Getis-Ord G* hot-spot statistic
g_stat = getis_ord_g(values, weights)
print(f"Getis-Ord G: {g_stat}")

# Ripley's K function
coords = np.random.rand(50, 2)
k_values = ripley_k(coords, distances=np.linspace(0.01, 1.0, 20))
print(f"Ripley K at first distance: {k_values[0]:.4f}")

# Semivariogram
semivar = semivariogram(values, coords)
print(f"Semivariogram computed: {len(semivar)} lag bins")

# Descriptive spatial statistics
stats = spatial_descriptive_statistics(values, coords)
print(stats)
```

## Guidelines

- All distance calculations default to WGS84 ellipsoid
- Weight matrices should be row-standardized for spatial statistics
- Core deps are numpy/scipy/pandas/psutil/scikit-learn/sympy (see pyproject.toml); no external geo-dependencies (no GDAL/h3/shapely required). Optional: z3-solver for theorem proving, matplotlib for examples (`examples` extra).
- Test: `uv run python GEO-INFER-TEST/run_unified_tests.py --module MATH`

### Integrations

- **BAYES** → Spatial statistics feeding Bayesian priors
- **SPACE** → H3 spatial weights for autocorrelation
- **SPM** → Statistical parametric map computation
- **AI** → Spatial feature engineering for ML
- **EDU** → Spatial statistics teaching exercises

Files in this skill

  • AGENTS.md1.4 KB
  • CHANGELOG.md2.8 KB
  • IMPROVEMENTS.md3.8 KB
  • README.md1017 B
  • SKILL.md3.5 KB
  • docs/AGENTS.md1.3 KB
  • docs/INTEGRATION_GUIDE.md2.2 KB
  • docs/QUICK_START.md4.2 KB
  • docs/README.md913 B
  • docs/api_schema.yaml25.5 KB
  • docs/mathematical_foundations.md11.7 KB
  • docs/module_architecture.md5.3 KB
  • docs/tutorials/AGENTS.md1.2 KB
  • docs/tutorials/README.md813 B
  • docs/tutorials/getting_started.md7.1 KB
  • examples/AGENTS.md1.3 KB
  • examples/README.md2.3 KB
  • examples/advanced_geospatial_analysis.py13.7 KB
  • examples/convenience_api_examples.py1.3 KB
  • examples/information_theory_examples.py1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.