Back to skills
SKILL.md
GEO INFER SPM
ASecurityStatistical 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.
- 17 stars
- 0 votes
- 0 copies
- 4 views
- Added September 1, 2026
Security analysis
100/100Pro scans all 20 files and shows the line behind each finding
npx -y skills add ActiveInferenceInstitute/GEO-INFER --skill GEO-INFER-SPM --agent claude-codeAre you the author of GEO INFER SPM?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/activeinferenceinstitute-geo-infer-spm)---
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
Files in this skill
- AGENTS.md
- README.md
- SKILL.md
- config/AGENTS.md
- config/README.md
- config/example.yaml
- docs/AGENTS.md
- docs/README.md
- docs/api_schema.yaml
- examples/AGENTS.md
- examples/README.md
- examples/advanced_analysis/AGENTS.md
- examples/advanced_analysis/README.md
- examples/advanced_analysis/spatiotemporal_climate_analysis.py
- examples/basic_usage/AGENTS.md
- examples/basic_usage/README.md
- examples/basic_usage/spatial_trend_analysis.py
- pyproject.toml
- requirements.txt
- setup.py
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.