mario.parse_statcan#

mario.parse_statcan(year: int, table: str = 'SUT', level: str = 'summary', geo: str = 'Canada', valuation: str = 'basic', satellite_account: str | None = None, path: str | None = None, download: bool = False, overwrite_download: bool = False, model: str = 'Database', name: str | None = None, calc_all: bool = False, timeout: int = 60, **kwargs) object#

Parse Statistics Canada supply-use or symmetric I-O tables via WDS.

Parameters:
  • year (int) – reference year to download.

  • table (str, optional) – table family, either SUT or IOT.

  • level (str, optional) –

    StatCan table level. Supported values are:

    • summary for both SUT and IOT

    • detail for both SUT and IOT

    • link1997 only for SUT

  • geo (str, optional) – geography label as published by Statistics Canada. Canada is the default. SUT tables expose provinces and territories as well.

  • valuation (str, optional) – price system for IOT tables. Supported values are basic and purchaser. SUT parsing currently supports only basic because supply rows are published at basic prices.

  • satellite_account (str, optional) – optional external satellite-account bundle. The currently supported value is "openio_canada", which uses the OpenIO-Canada emission factors published on Zenodo at 10.5281/zenodo.18304088. This path is currently supported only for table="SUT", level="detail", reference year 2022, and provincial/territorial geographies. When download=True, MARIO downloads the same fixed 2022 workbook into path and reuses it on later parses.

  • path (str, optional) – optional directory for locally stored StatCan raw CSV files.

  • download (bool, optional) – when True, download the raw full-table CSV into path and then parse it locally.

  • overwrite_download (bool, optional) – when download=True, overwrite already downloaded raw files.

  • 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.

  • timeout (int, optional) – request timeout in seconds used for each WDS call.