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.
⚠️ For AI Agents / Agentic Workflows
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:
Read analysis/methodologies/imf-indicator-mapping.md — canonical
committee → IMF indicator mapping enforced by the validator.
Read analysis/imf/indicator-catalog.md — IMF WEO/IFS/FM/BOP/ER
indicators by EP policy domain.
Use imf-search-databases / imf-get-parameter-codes to discover
additional series on demand.
Description
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 theIMFEconomicContextbuilder 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=Ffor forecast), multi-dimensional keyed observations, and partial data — see parseSDMXJSON for the normalisation rules.⚠️ For AI Agents / Agentic Workflows
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:
analysis/methodologies/imf-indicator-mapping.md— canonical committee → IMF indicator mapping enforced by the validator.analysis/imf/indicator-catalog.md— IMF WEO/IFS/FM/BOP/ER indicators by EP policy domain.imf-search-databases/imf-get-parameter-codesto discover additional series on demand.