$ ⌘K
// playbooks / global-supply-chain-risk · spatial_contagion_analysis

Spatial Contagion & Geographic Risk Analysis

step_count: 5· runtime: —

Full spatial analysis pipeline: test for spatial autocorrelation in supply chain risk indicators using Moran's I and LISA, fit spatial econometric models to quantify geographic spillover effects, and map risk hotspots.

// pipeline
5 steps· DAG
01

Spatial Data Quality Gate

action data_quality_gateon fail: abort
config (4 keys)
{
  "constructs": [
    "trade_flow_volume",
    "geographic_concentration_risk",
    "supply_chain_disruption_binary"
  ],
  "max_missing_pct": 0.15,
  "min_spatial_units": 20,
  "require_spatial": true
}
02

Global Moran's I Test

engine morans_i
config (3 keys)
{
  "permutations": 999,
  "spatial_weights": "queen_contiguity",
  "variable": "trade_flow_volume"
}
expected results (1 key)
{
  "morans_i": {
    "direction": "positive",
    "min_value": 0.1
  }
}
03

LISA Local Cluster Analysis

engine morans_iglobal_morans_i
config (4 keys)
{
  "local": true,
  "significance_level": 0.05,
  "spatial_weights": "queen_contiguity",
  "variable": "trade_flow_volume"
}
expected results (1 key)
{
  "hot_spots_identified": true
}
04

Spatial Lag Model — Trade Disruption Spillovers

engine spatial_lag_modellisa_clusterscompare_to_kb
config (3 keys)
{
  "outcome": "supply_chain_disruption_binary",
  "predictors": [
    "geographic_concentration_risk",
    "geopolitical_risk_index",
    "climate_exposure_score",
    "port_congestion_index"
  ],
  "spatial_weights": "queen_contiguity"
}
expected results (2 keys)
{
  "geographic_concentration_risk": {
    "direction": "positive"
  },
  "spatial_autocorrelation_parameter_rho": {
    "direction": "positive"
  }
}
05

Direct vs Indirect Impacts Decomposition

action analyzespatial_lag_regression
config (2 keys)
{
  "decomposition": "lesage_pace",
  "report_indirect_impacts": true
}
// from pax
Global Supply Chain Risk
// engines
engine.morans_iengine.spatial_lag_model
// note
step bodies extracted from the .pax archive at build time. download the parent pax for the full yaml.
[ download global-supply-chain-risk.pax.tar.gz ]