mario.parse_gloria(
path: str,
table: str = 'SUT',
valuation: str | int = 'basic',
year: int | None = None,
regions: str | list[str] | tuple[str, ...] | None = None,
satellites: str | list[str] | tuple[str, ...] | None = 'all',
dtype: str = 'float32',
cache: bool | str | Path = False,
model: str = 'Database',
name: str | None = None,
calc_all: bool = False,
**kwargs,
) → object#

Parse a locally downloaded GLORIA release.

The current GLORIA backend targets the monetary multi-regional SUT bundles shipped as raw T, Y and V csv files together with the GLORIA ReadMe workbook. GLORIA IOT parsing is intentionally left for a later step.

For full-region calculations, install the optional sparse solver with conda install -c conda-forge scikit-umfpack or use pip install 'mariopy[umfpack]' after installing SuiteSparse. A full v060 reading has 19,680 activities and 19,680 commodities. Successful imports select session defaults solve, direct and singular_policy='raise', preferring UMFPACK and falling back to SciPy if the optional backend cannot be imported. Defaults also affect other databases in this Python session and do not change the saved profile. Keep calc_all=False to calculate only the matrices requested later.

Parameters:
  • path (str) – path to the GLORIA release root, to a Google Drive part_I economic-account folder, or directly to the GLORIA_MRIOs_* directory containing the raw csv files.

  • table (str, optional) – currently only SUT is supported.

  • valuation (str or int, optional) – one of basic, trade, transport, taxes or subsidies (or the corresponding markup number 1-5).

  • year (int, optional) – reference year when the selected folder contains more than one yearly GLORIA bundle.

  • regions (sequence of str, optional) – optional subset of GLORIA region acronyms to keep.

  • satellites (str or sequence of str, optional) – satellite filter. Use "all" for the full satellite account payload, pass one full label such as "Emissions | CO2", or one group name from the GLORIA ReadMe such as "Emissions".

  • dtype (str, optional) – numeric dtype used for dense GLORIA blocks. float32 is the default because GLORIA use matrices are large.

  • cache (bool or path-like, optional) – if True, cache the parsed result as parquet under the GLORIA root and reuse it on subsequent calls when the raw file signature matches. A custom directory can also be provided.