Statistical Parametric Mapping for geospatial data. Use when performing GLM-based spatial analysis, random field theory corrections, cluster-level inference, or neuroimaging-style statistical mapping on geographic datasets.
Scanned 9/1/2026
Install to Claude Code
npx -y skills add ActiveInferenceInstitute/GEO-INFER --skill GEO-INFER-SPM --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of GEO INFER SPM?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/activeinferenceinstitute-geo-infer-spm)More formats (shields.io, HTML) on the badges page.
---
name: geo-infer-spm
description: Statistical Parametric Mapping for geospatial data. Use when performing GLM-based spatial analysis, random field theory corrections, cluster-level inference, or neuroimaging-style statistical mapping on geographic datasets.
prerequisites:
required:
- geo-infer-act
- geo-infer-bayes
recommended:
- geo-infer-space
- geo-infer-time
difficulty: advanced
estimated_time: 60min
examples_dir: ../GEO-INFER-EXAMPLES/examples/
---
# GEO-INFER-SPM
## Instructions
### Core Capabilities
- **GLM fitting**: General linear models with spatial design matrices
- **Random field theory**: Multiple comparison correction for spatial data
- **Cluster inference**: Cluster-level and peak-level statistics
- **Contrast testing**: T-contrasts and F-contrasts on spatial maps
- **Visualization**: Interactive time series explorer (mean±SD + residuals)
### Key Imports
```python
from geo_infer_spm.core.glm import GeneralLinearModel
from geo_infer_spm.core.rft import RandomFieldTheory
from geo_infer_spm.models.data_models import SPMData, SPMResult
from geo_infer_spm.visualization.interactive import create_time_series_explorer
```
### Random Field Theory Inference
```python
import numpy as np
from geo_infer_spm.core.rft import RandomFieldTheory
rft = RandomFieldTheory(
field_shape=(64, 64),
smoothness=np.array([4.5, 4.5]),
)
rft.compute_resel_counts()
peak_height = rft.peak_threshold(0.05, stat_type="Z", two_sided=True)
cluster_p = rft.cluster_extent_p_value(
extent=1.25,
cluster_forming_threshold=3.09,
stat_type="Z",
two_sided=True,
)
```
## Examples
```python
from geo_infer_spm.models.data_models import SPMData
import numpy as np
data = SPMData(
data=np.random.randn(100, 50),
coordinates=np.column_stack([
np.random.uniform(-90, 90, 100), # latitudes
np.random.uniform(-180, 180, 100) # longitudes
])
)
```
## Guidelines
- Coordinates must be valid: latitude ∈ [-90, 90], longitude ∈ [-180, 180]
- GLM implementation is Alpha status — spatial design matrices in progress
- Time series explorer uses Plotly for interactive mean±SD visualization
- Test: `uv run python -m pytest GEO-INFER-SPM/tests/ -v`
### Integrations
- **MATH** → Spatial statistics and topology input
- **BAYES** → Bayesian GLM parameter estimation
- **SPACE** → Spatial residual fields from H3 grids
- **AI** → Feature engineering for statistical maps
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!