Inspiration

Sanctions are everywhere in the news, but the patterns are hidden in plain sight. I spent 20 working days implementing OFAC sanctions screening for insurance clients—manually reconciling data, hunting duplicates, and fighting false positives.
I thought: there has to be a better way to predict who gets sanctioned and why.
With 18,000+ active sanctions, I wanted to reveal the hidden logic behind one of geopolitics' most powerful yet opaque tools.

What it does

Global Sanctions Risk Analytics is an AI-powered intelligence system that predicts which countries are most likely to face sanctions by analyzing 60+ years of OFAC data (1960-2025) combined with economic and political stability metrics.
It generates risk scores (0-100) for 225 countries and territories through interactive visualizations and natural language queries via Hex's App Agent.

How we built it

Data Sources:

  • OFAC SDN (Specially Designated Nationals) & Consolidated Sanctions List:
    U.S. Treasury's official database of sanctioned individuals, entities, and countries subject to economic restrictions
    OFAC
  • GDP Data:
    World Bank GDP indicators providing economic size metrics for each country
    World Bank Open Data
  • Political Stability Percentile Ranks:
    Worldwide Governance Indicators measuring political stability and absence of violence/terrorism
    World Bank Open Data

Technical Implementation:

  1. Integrated OFAC sanctions with World Bank GDP and governance percentile ranks
  2. Trained ensemble Random Forest model (GB + RF weighted) on log-transformed sanction counts
  3. Built interactive risk maps and AI-powered queries in Hex

Hex's Role:
The App Agent enabled natural language exploration without code, while the notebook environment seamlessly integrated machine learning, visualizations, and data apps.
I was so enthusiastic; I exceeded my Notebook agent trial usage limit 😅 !

Challenges we ran into

  • Data chaos:
    60+ years of OFAC data with historical entities, dissolved countries, and inconsistent naming across jurisdictions required extensive cleaning
  • Extreme skew:
    Russia's 5,350 sanctions vs <10 for most countries necessitated log-transformation and percentile-based features

Accomplishments that we're proud of

Four counterintuitive findings that reveal how sanctions actually work:

  1. Economic size doesn't protect you — Five major economies ($31.4T GDP) face 7,853 sanctions
  2. Geographic inequality — Europe receives 6.5× more sanctions per risk point than Southeast Asia
  3. Small economies devastated — Marshall Islands: 389.5 sanctions per $1B GDP vs China: 0.06
  4. Corporate warfare — Modern sanctions target entities over individuals

The model's 99.7% accuracy proves these patterns are real and predictable.

What we learned

Sanctions aren't about objective threat assessment—they're about geopolitics, alliances, and power dynamics. Economic size and political stability matter far less than relationships with sanctioning powers.
Data reveals uncomfortable truths: the international order follows patterns that don't always align with stated principles.

Hex's integration of data exploration, machine learning, and AI agents dramatically accelerated development and made complex geopolitical analysis accessible through natural language.

What's next for Global Sanctions Risk Analytics

  • Economic impact modeling across sanction types
  • Multi-regime coverage (EU, UN, UK sanctions)
  • Alert system for businesses and policymakers
  • API for financial institution compliance screening

Happy Hexing ⚡💥!

Built With

Share this project:

Updates