mario.parse_bea#

mario.parse_bea(path: str, *, year: int, level: str = 'summary', table: str = 'SUT', model: str = 'Database', name: str | None = None, calc_all: bool = False, **kwargs) object#

Parse one local BEA Supply-Use release bundle.

Parameters:
  • path (str) – path to one extracted BEA Supply-Use directory, to one workbook inside that directory, or directly to the official SUPPLY-USE.zip bundle.

  • year (int) – yearly sheet to parse from the selected BEA release family.

  • level (str, optional) – BEA aggregation level. Supported values are summary, sector, and detail.

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

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

  • name (str, optional) – optional dataset name stored in metadata.

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

Notes

This parser targets only the official BEA SUPPLY-USE workbook family. It does not parse the separate MAKE-USE-IMPORTS (BEFORE REDEFINITIONS) or TOTAL AND DOMESTIC REQUIREMENTS bundles.

The verified yearly coverage in the official workbooks is:

  • summary and sector: 1997 onward in the current bundle;

  • detail: 2007, 2012, and 2017 in the current bundle.

No automatic download is implemented yet. Callers should point the parser to one local bundle or extracted directory.