EU Parliament Monitor — API Documentation - v0.8.30
    Preparing search index...

    Module Utils/WorldBankData

    Utility functions for World Bank economic data integration.

    Provides EU member state → World Bank country code mapping, CSV parsing for MCP responses, indicator formatting, and economic context building for EU Parliament article enrichment.

    Functions in this module are designed to be stateless and avoid observable side effects, with the exception of explicitly recording metadata such as data timestamps in returned objects.

    The constants below (POLICY_INDICATORS, EU_COUNTRY_CODES, COMPARISON_COUNTRIES) are a convenience subset used by TypeScript code for formatting and parsing. They do NOT represent the full World Bank indicator inventory.

    For indicator selection in articles and analysis:

    1. Read analysis/worldbank/indicator-catalog.md200+ indicators by EP policy domain
    2. Use search-indicators MCP tool to discover indicators on demand by keyword
    3. Read analysis/worldbank/eu-country-mapping.md for country codes + comparison groups
    4. Read analysis/worldbank/chart-integration-guide.md for Chart.js + Mermaid templates

    The World Bank MCP server has thousands of indicators beyond the ones listed here. Use search-indicators to find the best match for any policy topic.

    Functions

    parseWorldBankCSV
    formatIndicatorValue
    getMostRecentValue
    buildEconomicContext
    getWorldBankCountryCode
    isEUMemberState
    buildEconomicContextHTML

    Variables

    EU_COUNTRY_CODES
    EU_AGGREGATE_CODE
    COMPARISON_COUNTRIES
    WB_AGGREGATE_LABELS
    POLICY_INDICATORS