historysaid-global-economic / METHODOLOGY.md
kavelaltd's picture
Upload folder using huggingface_hub
642a243 verified
|
Raw
History Blame Contribute Delete
3.53 kB

Methodology

Data Sources

Source URL Retrieved Format
World Bank WDI https://data.worldbank.org/ Loaded from historysaid.db CSV (originally), SQLite
World Bank WGI https://info.worldbank.org/governance/wgi/ Loaded from historysaid.db CSV (originally), SQLite
IMF WEO https://www.imf.org/en/Publications/WEO Loaded from historysaid.db CSV (originally), SQLite
BIS https://www.bis.org/statistics/eer.htm Loaded from historysaid.db CSV (originally), SQLite

All data was extracted from the HistorySaid SQLite database (historysaid.db), which is built by a Python pipeline that downloads and processes raw CSV files from each source.

Normalization Pipeline

Country Codes

We use ISO 3166-1 alpha-3 as the canonical standard. The source database already stores countries with ISO alpha-3 codes. We validated all codes against the pycountry library (ISO 3166-1 reference).

Kosovo (XKX) is included as a widely recognized territory despite not having an official ISO 3166-1 assignment. See _mappings/country_codes.json for the full list.

Regional Aggregates

We excluded regional and income-group aggregates (e.g., "East Asia & Pacific", "High income") from country-level files. Aggregates are identified by missing region or income_group fields in the source database. Aggregate data is available in data/aggregates/regional_aggregates.csv.

Indicator Identification

Each indicator is namespaced by source to prevent code collisions:

  • wb. for World Bank WDI (92 indicators)
  • wgi. for World Bank WGI (6 indicators)
  • imf. for IMF WEO (3 indicators)
  • bis. for BIS (1 indicator)

Overlapping concepts from different sources are kept as separate records. This preserves source fidelity and lets users choose which source to trust.

Missing Data

  • No interpolation.
  • No imputation.
  • No gap-filling.
  • Null means the source does not have a value for this country-year-indicator combination.

Value Cleaning

All values in the source database are already stored as REAL (float) type. During extraction, we cast each value to Python float. Any value that fails conversion is set to null (none encountered in practice).

Unit and Scale

Units are preserved as defined by each source (e.g., "USD", "%", "index", "per 1,000"). The scale column is set to "units" for all rows. Values are in their original scale (e.g., GDP in current US dollars, not millions or billions).

IMF Projections

The source database stores IMF WEO projections in a separate projections table. This dataset exports only historical/observed values from the country_data table. The is_estimate column is false for all rows.

BIS Index Data

The BIS Real Effective Exchange Rate (REER) is an index-based indicator. The base year convention from the original BIS data is preserved.

Known Limitations

  • FRED and ECB data exist in the source database as exchange rates and asset prices, but are not included in this release (country-level economic indicators only).
  • Some World Bank indicators have sparse coverage for small states and territories.
  • WGI indicators are available only from 1996 onward and are updated less frequently.
  • IMF WEO covers only 3 fiscal indicators (government debt, budget deficit, government revenue).
  • BIS REER coverage varies by country.
  • The European Union (EUU) is classified as an aggregate and excluded from country-level files.