README.md

April 12, 2026 Β· View on GitHub

Hack23 Logo

🌍 World Bank Indicators β€” Political Intelligence Inventory

SINGLE SOURCE OF TRUTH for all World Bank indicator mappings
πŸ“Š Economic Β· πŸ‘₯ Social Β· πŸŽ“ Education Β· πŸ₯ Health Β· πŸ›οΈ Governance

Owner Version Classification


🎯 Purpose

This directory contains the single source of truth for all 144 World Bank indicators used in Riksdagsmonitor political intelligence. The JSON inventory (indicators-inventory.json) is the canonical machine-readable reference consumed by:

  • AI agents (agentic workflows) β€” read via view analysis/worldbank/indicators-inventory.json
  • TypeScript modules β€” world-bank-context.ts loads indicators from this JSON automatically
  • Analysis documents β€” reference for economic context in markdown analysis files

Every indicator includes:

  • id β€” World Bank indicator code (e.g., NY.GDP.MKTP.KD.ZG)
  • name β€” Human-readable name
  • description β€” Context-rich description for articles
  • policyAreas β€” Swedish policy areas this indicator relates to
  • committees β€” Relevant Riksdag committees (utskott)
  • unit β€” Measurement unit
  • mcpTool / mcpParam β€” MCP tool access (19 indicators)

πŸ” AI Agent Discovery Protocol

For agentic workflows: To find relevant indicators for any article topic:

  1. view analysis/worldbank/indicators-inventory.json
  2. Search for indicators where policyAreas or committees match the article's subject
  3. Use MCP tools for indicators with mcpTool field
  4. Reference other indicators by name/ID β€” build-time scripts handle REST API fetching

πŸ“ Contents

FileDescription
README.mdThis overview
indicators-inventory.jsonMachine-readable inventory of all indicators
indicator-policy-mapping.mdHuman-readable mapping to political entities
use-cases.mdBest use cases per article type and policy domain

πŸ”— Integration Points

JSON Inventory (Single Source of Truth)

analysis/worldbank/indicators-inventory.json
  • AI agents: Read with view tool to discover indicators on-demand
  • TypeScript modules: world-bank-context.ts loads from this JSON at import time
  • To add indicators: Edit this JSON file ONLY β€” TypeScript picks up changes automatically

MCP Server (Agentic Workflows)

world-bank:
  command: npx
  args: ["-y", "worldbank-mcp@1.0.1"]

Available MCP Tools:

ToolPurposeKey Parameters
get-economic-dataGDP, growth, inflation, unemployment, trade, FDIcountryCode, indicator, years
get-social-dataPopulation, life expectancy, birth/death ratescountryCode, indicator, years
get-education-dataSchool enrollment, education spending, literacycountryCode, indicator, years
get-health-dataHealth spending, physicians, hospital bedscountryCode, indicator, years
get-country-infoRegion, income level, capital, coordinatescountryCode
search-indicatorsSearch indicators by keyword (limited coverage)keyword

Note: search-indicators has limited coverage. Always prefer reading indicators-inventory.json for comprehensive discovery.

TypeScript Modules (Build-Time)

ModulePurpose
scripts/world-bank-client.tsREST client with INDICATOR_IDS and COUNTRY_CODES
scripts/world-bank-context.tsLoads from JSON inventory, provides localized headings (14 languages) and policy area matching
scripts/data-transformers/content-generators/economic-dashboard-section.tsChart.js dashboard generation
scripts/populate-analysis-data.tsAutomated data fetch to analysis/data/worldbank/

Chart.js Integration

Economic indicators are visualized using these canonical chart types:

  • economic-comparison β€” Nordic bar chart comparing countries
  • economic-trend β€” Sweden time series line chart
  • nordic-radar β€” Multi-indicator radar comparison
  • policy-radar β€” Policy area impact radar

πŸ“Š Quick Reference: 144 Indicators Across 17 Domains

DomainCountKey IndicatorsPrimary CommitteesAccess
National Accounts17GDP, GNI, PPP, Consumption, Savings, Capital FormationFiUMCP + REST
Government Finance9Tax Revenue, Expenditure, Revenue, Cash Balance, Net LendingSkU, FiUREST
Trade & Payments11Exports, Imports, FDI, Current Account, High-Tech ExportsNU, UUMCP + REST
Labor Market20Unemployment (total/M/F/youth), Participation, Employment, ProductivityAUMCP + REST
Inflation & Prices3CPI Inflation, GDP Deflator, Consumer Price IndexFiUMCP + REST
Financial Sector4Bank Credit, Interest Rates (real/lending/deposit)FiUREST
Demographics22Population, Life Expectancy, Migration, Fertility, Age DependencySoUMCP + REST
Health14Health Exp., Physicians, Beds, Nurses, Suicide, Tobacco, Alcohol, ImmunizationSoUMCP + REST
Education6Education Exp., Enrollment (primary/secondary/tertiary)UbUMCP + REST
Environment10COβ‚‚, Renewable Energy, Forest, PM2.5, Nuclear/Hydro PowerMJUREST
Infrastructure6Broadband, Mobile, Servers, Air Travel, PatentsTUMCP + REST
Innovation4R&D Expenditure, Researchers, Scientific Articles, ICT ExportsUbUREST
Military5Military Exp. (% GDP / USD / % Govt), Armed Forces, Labor ShareFΓΆUREST
Governance (WGI)6Rule of Law, Voice, Effectiveness, Regulatory, Corruption, StabilityKU, JuUREST source=75
Inequality5GINI, Income Top/Bottom 10%, Income Top/Bottom 20%SoU, AUREST
Gender1Women in Parliament (%)KU, AUREST
Energy1Electric Power ConsumptionMJU, NUREST

πŸ“ Note on WGI Governance Indicators: The 6 WGI indicators require source=75 in World Bank REST API calls. The WorldBankClient handles this automatically via the WGI_INDICATOR_IDS set.

MCP-Accessible Indicators (19)

MCP ToolIndicatorCodeMCP Param
get-economic-dataGDP GrowthNY.GDP.MKTP.KD.ZGGDP_GROWTH
get-economic-dataGDP per CapitaNY.GDP.PCAP.CDGDP_PER_CAPITA
get-economic-dataUnemploymentSL.UEM.TOTL.ZSUNEMPLOYMENT
get-economic-dataInflationFP.CPI.TOTL.ZGINFLATION
get-economic-dataExports (% GDP)NE.EXP.GNFS.ZSEXPORTS_GDP
get-economic-dataFDI Net InflowsBN.KLT.DINV.CDFDI_NET
get-economic-dataGNINY.GNP.MKTP.CDGNI
get-economic-dataGNI per CapitaNY.GNP.PCAP.CDGNI_PER_CAPITA
get-social-dataPopulationSP.POP.TOTLPOPULATION
get-social-dataLife ExpectancySP.DYN.LE00.INLIFE_EXPECTANCY
get-social-dataBirth RateSP.DYN.CBRT.INBIRTH_RATE
get-social-dataDeath RateSP.DYN.CDRT.INDEATH_RATE
get-social-dataInternet UsersIT.NET.USER.ZSINTERNET_USERS
get-education-dataEducation ExpenditureSE.XPD.TOTL.GD.ZSEDUCATION_EXPENDITURE
get-education-dataSchool EnrollmentSE.PRM.ENRRSCHOOL_ENROLLMENT
get-health-dataHealth ExpenditureSH.XPD.CHEX.GD.ZSHEALTH_EXPENDITURE
get-health-dataPhysiciansSH.MED.PHYS.ZSPHYSICIANS
get-health-dataHospital BedsSH.MED.BEDS.ZSHOSPITAL_BEDS
get-health-dataImmunization (Measles)SH.IMM.MEASIMMUNIZATION


Document Control: