Skip to content
Back to skills

GEO INFER SPM

ASecurity

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.

  • 18 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 1, 2026
datapythontestinggitapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

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

Scanned November 9, 2026

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

Installs 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 with every re-scan.

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

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-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.
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
    ])
)
```

### Agent interfaces

Use `uv run --frozen geo-infer catalog SPM` to discover public source
APIs, then `geo-infer describe` before calling a selected target. Scripts use
`geo_infer_api.agent_runtime.AgentSession`; the optional stdio MCP server is
`geo-infer-mcp`. See [requests, native objects and composition](../GEO-INFER-INTRA/docs/integration/agent_interfaces.md).
The adapter retains this module's dependencies and authorization requirements.

## 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 from the workspace root:
  `uv run python GEO-INFER-TEST/run_unified_tests.py --module SPM`
- Native Bayesian fitting uses two chains and one sampling process by default;
  set `chains` and `cores` explicitly when allocating parallel CPU work.
- On macOS 27 with Apple Clang, use the explicit native compiler profile in
  [native sampling profiles](docs/native_sampling_profiles.md). Linux uses the
  standard compiler profile; both profiles run actual PyMC and CLinker tests.

### Integrations

- None required: SPM is fully self-contained (no `geo_infer_*` imports in src/)
  and consumes plain numpy arrays / GeoDataFrames.
- Optional extras: `bayesian` (pymc + arviz enable the full MCMC path in
  `BayesianSPM`; without them it falls back to a logged empirical-Bayes
  approximation).

Files in this skill

  • AGENTS.md1.9 KB
  • README.md1.7 KB
  • SKILL.md2.4 KB
  • config/AGENTS.md1.1 KB
  • config/README.md871 B
  • config/example.yaml4 KB
  • docs/AGENTS.md1.1 KB
  • docs/README.md870 B
  • docs/api_schema.yaml10.9 KB
  • examples/AGENTS.md1.2 KB
  • examples/README.md898 B
  • examples/advanced_analysis/AGENTS.md1.2 KB
  • examples/advanced_analysis/README.md984 B
  • examples/advanced_analysis/spatiotemporal_climate_analysis.py14 KB
  • examples/basic_usage/AGENTS.md1.2 KB
  • examples/basic_usage/README.md882 B
  • examples/basic_usage/spatial_trend_analysis.py6.6 KB
  • pyproject.toml3.4 KB
  • requirements.txt488 B
  • setup.py2.4 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.

View all in data →

Comments

Loading comments…

Newsletter

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