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

    Module Utils/IMFData

    Utility functions for IMF economic data integration.

    Provides EU member state → IMF country code mapping (mostly the same ISO-3166-1 alpha-3 codes as the World Bank, with a few diffs flagged in IMF_COUNTRY_CODE_OVERRIDES), SDMX-JSON response parsing, indicator formatting with forecast awareness, and the IMFEconomicContext builder for EU Parliament article enrichment.

    Functions in this module are designed to be stateless and avoid observable side effects, matching the pattern established by world-bank-data.ts. A raw IMF SDMX response may include attribute flags (OBS_STATUS=F for forecast), multi-dimensional keyed observations, and partial data — see parseSDMXJSON for the normalisation rules.

    The constants below (IMF_POLICY_INDICATORS, IMF_EU_COUNTRY_CODES) are a convenience subset used by TypeScript code for formatting and parsing. They do NOT represent the full IMF database inventory. For indicator selection in articles and analysis:

    1. Read analysis/methodologies/imf-indicator-mapping.md — canonical committee → IMF indicator mapping enforced by the validator.
    2. Read analysis/imf/indicator-catalog.md — IMF WEO/IFS/FM/BOP/ER indicators by EP policy domain.
    3. Use imf-search-databases / imf-get-parameter-codes to discover additional series on demand.

    Functions

    getIMFCountryCode
    isIMFEUMemberState
    parseSDMXJSON
    getMostRecentObservation
    getForecastPoints
    formatIMFValue
    buildIMFEconomicContext
    buildIMFEconomicContextHTML

    Interfaces

    IMFEconomicContext → IMFEconomicContext
    IMFEconomicIndicatorSummary → IMFEconomicIndicatorSummary
    IMFForecastPoint → IMFForecastPoint
    IMFObservation → IMFObservation
    IMFPolicyIndicatorMapping → IMFPolicyIndicatorMapping
    IMFSeries → IMFSeries

    Type Aliases

    IMFDatabaseId → IMFDatabaseId
    IMFFrequency → IMFFrequency
    IMFMacroIndicatorKey → IMFMacroIndicatorKey

    Variables

    IMF_EU_COUNTRY_CODES
    IMF_COUNTRY_CODE_OVERRIDES
    IMF_EURO_AREA_CODE
    IMF_AGGREGATE_LABELS
    IMF_POLICY_INDICATORS
    IMF_INDICATOR_SDMX_CODES