mario.parse_oecd#

mario.parse_oecd(path: str | None = None, *, dataset: str = 'ICIO', year: int | None = None, country: str | None = None, timeout: int = 60, model: str = 'Database', name: str | None = None, calc_all: bool = False, **kwargs) object#

Parse OECD ICIO, OECD national IOT, or OECD SUT datasets.

The parser exposes three OECD families behind one entry point:

  • dataset="ICIO": local OECD ICIO csv bundles from the official OECD inter-country input-output tables page. Both <year>.csv and regular <year>_SML.csv naming conventions are supported. MARIO aggregates the split-country labels CN1/CN2 into CHN and MX1/MX2 into MEX.

  • dataset="IOT": local OECD national Input-Output total tables such as CZE2014ttl.csv from the official OECD IOT release page.

  • dataset="SUT": annual OECD Supply and Use Tables pulled directly from the official OECD SDMX API. This mode does not require path but does require country and year.

Parameters:
  • path (str, optional) – local OECD file or directory when dataset is "ICIO" or "IOT". Ignored for dataset="SUT".

  • dataset (str, optional) – one of "ICIO", "IOT", or "SUT".

  • year (int, optional) – reference year to select when path points to a directory, or the SDMX year when dataset="SUT".

  • country (str, optional) – ISO3 country code used to disambiguate OECD national IOT files and required for dataset="SUT".

  • timeout (int, optional) – Request timeout in seconds for the OECD SDMX API used by dataset="SUT".

  • model (str, optional) – public MARIO model class to instantiate. Database is the default and the only supported value.

  • name (str, optional) – dataset name stored in MARIO metadata. Defaults to the inferred OECD dataset label.

  • calc_all (bool, optional) – whether to materialize derived blocks immediately after parsing.

Notes

MARIO currently parses the economic OECD tables only. The OECD parser does not yet attach environmental extensions, so the resulting databases should not be interpreted as environmentally extended tables.