mario.parse_eora#

mario.parse_eora(path: str, multi_region: bool, table: str | None = None, indeces: str = None, name_convention: str = 'full_name', aggregate_trade: bool = True, year: int = None, name: str = None, calc_all: bool = False, model: str = 'Database', country: str | None = None, price: str | None = None, **kwargs) object#

Parse EORA data into a Database instance.

Note

  • for multi_region database, only eora26 is acceptable

  • multi_region database has some inconsistencies that are modified when parsed.

  • to see the modifications after parsing call ‘meta_history’

Parameters:
  • path (str) – path to one EORA file or dataset directory

  • multi_region (bool) – True for eora26 else False

  • table (str, Optional) – for multi-region datasets only IOT is supported. Single-region parsing can infer the table type automatically when omitted.

  • indeces (str) – optional path to the Eora26 label files. If omitted, the parser looks for labels_*.txt files in path itself.

  • name_convension (str) – will take the full names of countries if full_name otherwise, takes the abbreviations

  • aggregate_trade (boolean) – if True, will aggregated all the trades into total imports and exports in single region database

  • country (str, Optional) – when multi_region=False and path points to a directory, selects the country file to parse.

  • price (str, Optional) – optional price filter for single-region folder parsing.

  • year (int, Optional) – for recording on the metadata

  • name (str, Optional) – for recording on the metadata

  • calc_all (boolean) – if True, will calculate the main missing matrices

Return type:

mario.Database