Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

44 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI Trajectory Index

Live: ai-index.ankitmishra.ca

An interactive index scoring 186 countries on their current AI readiness and 3โ€“5 year trajectory โ€” built for investors, policymakers, and researchers who need to understand which nations are winning the AI race and why.


Key Findings (2026 Edition)

Finding Detail
๐Ÿ‡บ๐Ÿ‡ธ US leads overall 91/100 โ€” highest score across all 186 economies
๐Ÿ‡ฎ๐Ÿ‡ณ India has the strongest trajectory Current score 65 โ†’ projected 73 by 2028 (trajectory +8)
๐Ÿ‡ฆ๐Ÿ‡ช UAE fastest-rising advanced economy 73 โ†’ 79 projected by 2028 (trajectory +6)
๐Ÿ‡ท๐Ÿ‡บ Russia: biggest governance gap Average pillar 12.8 โ€” governance score 8/20, gap of 4.8 pts
๐ŸŒ Africa trailing in infrastructure Median infrastructure score 6.2/20 vs global median 11.4
๐Ÿ‡ช๐Ÿ‡บ Europe leads on governance EU avg 10.2/20 governance vs 9.2/20 investment โ€” policy ahead of capital

What It Does

  • Scores 186 economies across 5 pillars: Infrastructure, Talent, Governance, Investment, Economic Readiness (each 0โ€“20, total 0โ€“100)
  • Shows forward trajectory โ€” which countries are accelerating, plateauing, or falling behind, with projected 2028 scores
  • Generates AI-powered country narratives explaining the drivers behind each score (via OpenRouter, free tier)
  • Interactive world map with country selection and AI-powered comparison chat
  • Country comparison tool โ€” side-by-side radar charts and pillar breakdowns (up to 4 countries)
  • Region deep-dives โ€” Americas, Europe, Asia-Pacific, Middle East, Africa with sub-regional analysis
  • Live news feeds per country via GDELT, with AI signal analysis
  • What-If simulator โ€” adjust any pillar score and see rank impact
  • Policy gap analyser โ€” shows which pillars fall below regional average, with governance flags
  • Shareable URLs โ€” all filter state and pillar weights encoded in query params
  • Embeddable widget โ€” <iframe src="/widget/[country]"> for any site
  • Export to CSV or JSON (with custom weighted scores when weights are non-default)

Screenshots

Homepage 186 countries scored across 5 AI readiness pillars

Map View Interactive world map with country selection and AI-powered chat

Country Detail Individual country profiles with pillar breakdown, trajectory, and live news signal


Tech Stack

Layer Technology
Framework Next.js 14 (App Router) + TypeScript
Styling Tailwind CSS + CSS custom properties
Charts Recharts (radar, bar, scatter) + react-simple-maps
AI Narratives OpenRouter API (Gemini 2.0 Flash โ€” free tier)
Live News GDELT 2.0 Document API (free, no key)
World Data World Bank Open Data API (17 indicators, free)
Policy Data OECD AI Policy Observatory (static dataset)
Governance World Governance Indicators โ€” WGI (via World Bank API)
Cron Vercel Cron (news cache warming, nightly)
Deployment Vercel

Getting Started

Prerequisites

Installation

# Clone the repo
git clone https://github.com/ankitmishra01/ai-trajectory-index.git
cd ai-trajectory-index

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env.local
# Edit .env.local and add your OPENROUTER_API_KEY

# Run locally
npm run dev

Open http://localhost:3000.

Environment Variables

Variable Required Description
OPENROUTER_API_KEY Yes AI narrative generation + map chat
NEXT_PUBLIC_SITE_URL No Canonical URL for OG meta tags
CRON_SECRET No Protects /api/news-cron from unauthorised calls

Deployment

One-click Vercel deployment:

  1. Fork this repo
  2. Import to Vercel
  3. Add OPENROUTER_API_KEY as an environment variable
  4. Deploy โ€” World Bank data fetches automatically, no other setup needed

Scoring Methodology

Five equally-weighted pillars, each scored 0โ€“20:

Pillar What it measures Key live indicators
Infrastructure Digital and physical foundations Fixed broadband/100 (IT.NET.BBN.P2), internet users %, electricity access %
Talent Human capital pipeline and deployment Tertiary enrollment (SE.TER.ENRR), labor productivity (SL.GDP.PCAP.EM.KD)
Governance Institutional quality + AI policy Rule of Law WGI (RL.EST), Govt Effectiveness (GE.EST), Regulatory Quality (RQ.EST), national AI strategy
Investment Capital environment R&D spend % GDP (GB.XPD.RSDV.GD.ZS), FDI net inflows (BX.KLT.DINV.WD.GD.ZS)
Economic Readiness Market conditions GDP per capita PPP (NY.GDP.PCAP.PP.KD), private credit % GDP, trade openness, services share

Full methodology: ai-index.ankitmishra.ca/methodology

Design Principles

  • No double-counting: R&D spend only in Investment; GDP only in Economic Readiness; electricity/internet only in Infrastructure
  • Continuous > binary: Governance uses continuous WGI z-scores, normalised as ((estimate + 2.5) / 5.0) ร— maxPts
  • PPP-adjusted: Economic Readiness uses constant 2017 PPP$ GDP to remove currency/price-level bias
  • Quality over access: Infrastructure weights fixed broadband (quality signal) over internet user % (saturated for OECD)
  • Forward signals in trajectory: High-tech exports trend (20%) and broadband growth (10%) replace binary AI strategy flag

Tiers

Score Tier Description
75โ€“100 ๐ŸŸข Leading Frontier AI readiness
55โ€“74 ๐Ÿ”ต Advanced Strong foundations
40โ€“54 ๐ŸŸก Developing Building blocks in place
0โ€“39 ๐Ÿ”ด Nascent Early stage

Trajectory

Label Points Meaning
โ†‘โ†‘ Strong Positive +6 to +10 Structural acceleration
โ†‘ Positive +2 to +5 Measurable momentum
โ†’ Neutral -1 to +1 Steady state
โ†“ Negative -5 to -2 Structural headwinds
โ†“โ†“ Strong Negative -10 to -6 Falling behind

Projected 2028 score = clamp(total + trajectory ร— 1.5, 0, 100)


Data Sources

Source What it provides Update frequency
World Bank Open Data API 17 macro indicators (infrastructure, labour, economics, governance) Daily fetch, 24h cache
World Governance Indicators Rule of Law, Govt Effectiveness, Regulatory Quality Via World Bank API
OECD AI Policy Observatory National AI strategies, regulation status Static dataset
GDELT 2.0 Country-level AI news headlines On-demand, 1h cache
OpenRouter AI country narratives, news signal analysis On-demand, 7d/24h cache

World Bank indicators typically lag 1โ€“2 years โ€” most recent data is from 2023โ€“2024.


Project Structure

/app
  page.tsx                  โ€” Main country index
  /map/page.tsx             โ€” Interactive world map + AI chat
  /africa|americas|europe|asia-pacific|middle-east/page.tsx โ€” Region deep-dives
  /country/[slug]/page.tsx  โ€” Individual country profiles
  /compare/[a]/page.tsx     โ€” Side-by-side country comparison
  /explore/page.tsx         โ€” Scatter plot explorer
  /methodology/page.tsx     โ€” Full scoring methodology
  /widget/[slug]/page.tsx   โ€” Embeddable iframe widget (no client JS)
  /api/
    scores/route.ts         โ€” Live scoring endpoint (24h cache)
    narrative/[country]/    โ€” OpenRouter narrative generation (7d cache)
    news/[slug]/            โ€” GDELT news feed (1h cache)
    news-signal/[slug]/     โ€” AI signal analysis (24h cache)
    news-cron/route.ts      โ€” Vercel Cron: warms top-50 news cache nightly

/components
  CountryCard.tsx           โ€” Card with mini dimension bars + trajectory badge
  CountryPageClient.tsx     โ€” Country detail page (client component)
  CountryNewsFeed.tsx       โ€” Live news + AI signal panel
  ComparisonPanel.tsx       โ€” Radar chart comparison (up to 4 countries)
  FilterBar.tsx             โ€” Search + consolidated filter + sort (slide-out panel)
  FastestMovers.tsx         โ€” Top 5 trajectory countries (compact tiles)
  KeyInsights.tsx           โ€” Auto-generated insights from live data
  GovernanceGapPanel.tsx    โ€” Top 10 countries where capabilities outpace governance
  PolicyGapAnalyser.tsx     โ€” Pillar gaps vs regional average + governance flags
  WhatIfSimulator.tsx       โ€” Interactive pillar adjustment + rank impact
  RegionDeepDive.tsx        โ€” Shared region deep-dive layout (bar charts)
  WorldMap.tsx              โ€” react-simple-maps SVG world map
  ScoreGauge.tsx            โ€” SVG semicircle gauge
  RankingsTable.tsx         โ€” Sortable tabular view
  ExportButton.tsx          โ€” CSV/JSON export (includes weighted score column)
  PillarWeights.tsx         โ€” Custom pillar weight sliders with URL encoding

/lib
  worldbank.ts              โ€” WB API client (17 indicators, parallel fetch, 24h cache)
  scoring.ts                โ€” Score calculation engine (5 pillars + trajectory)
  openrouter.ts             โ€” OpenRouter client (narratives + news signal analysis)
  gdelt.ts                  โ€” GDELT news client (1h in-memory cache, disambiguation)
  slugToIso.ts              โ€” 186 slug โ†’ ISO2 mappings
  regionConfigs.ts          โ€” Region deep-dive configuration
  types.ts                  โ€” Country, ScoredCountry, ScoresResponse

/data
  countries.json            โ€” 186 countries: static baseline scores + evidence
  ai-policies.json          โ€” Policy metadata keyed by slug
  narratives/.gitkeep       โ€” Cached narratives directory (files are gitignored)

Contributing

Issues and pull requests are welcome. If you spot a data error, have a methodology suggestion, or want to add a feature, please open an issue first.

Areas where contributions are especially welcome:

  • Additional governance data sources (Freedom House, V-Dem)
  • Improved trajectory modelling (patent filings, AI publication growth)
  • Better data for smaller economies where World Bank coverage is thin
  • Translation and localisation

Citing This Index

If you reference this tool in research or journalism:

Mishra, A. (2026). AI Trajectory Index: Scoring 186 Economies on AI Readiness and 3โ€“5 Year Trajectory. Retrieved from https://ai-index.ankitmishra.ca


About

Built by Ankit Mishra as an independent research tool at the intersection of AI governance, emerging markets, and technology policy.

LinkedIn ยท ankitmishra.ca


License

MIT License โ€” free to use, modify, and distribute with attribution.

About

Live index scoring 186 countries on AI readiness and 3-5 year trajectory. World Bank data + WGI governance + OECD policy + AI narratives

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages