Hybrid EXIOBASE walkthrough#
This notebook is the practical walkthrough for parsing the hybrid EXIOBASE bundle in MARIO.
It focuses on:
hybrid HSUT;
hybrid HIOT;
extension selection.
What this notebook covers#
which parser entry points to use for hybrid EXIOBASE;
what local bundle MARIO expects;
how to parse the hybrid SUT;
how to parse the hybrid IOT;
how to limit the parsed extensions when needed.
Relevant Zenodo releases#
newer consequential release not yet covered by the current MARIO hybrid parser:
Important limitation: the current hybrid parser targets the 3.3.18 bundle. It does not yet include the later consequential developments released separately on Zenodo.
Main entry points#
For normal user workflows, the public entry points are:
mario.parse_exiobase(...)
Key arguments and local layout#
The hybrid workflow uses the same mario.parse_exiobase(...) entry point with these main selectors:
table: choose"IOT"or"SUT";unit: use"Hybrid";path: extracted3.3.18release root;extensions:None,[],"all", or one explicit list of extension groups.
Typical extracted layout:
EXIOBASE/3.3.18/
├── MR_HSUT_*.txt
├── MR_HIOT_*.txt
├── Land_*.txt
├── Emiss_*.txt
├── waste_sup_*.txt
└── waste_use_*.txt
Supported extension groups are resource, Land, Emiss, Emis_unreg_w, waste_sup, waste_use, pack_sup_waste, pack_use_waste, mach_sup_waste, mach_use_waste, stock_addition, and crop_res. Unreg_w is available for HSUT only.
[1]:
import mario
Optional download step#
If you do not already have the bundle locally, MARIO exposes a helper for the hybrid release it supports.
[ ]:
info = mario.download_hybrid_exiobase(
path="/path/to/3.3.18",
)
info
Parse the hybrid SUT#
This is the standard starting point for the hybrid supply-use table.
[ ]:
db_sut = mario.parse_exiobase(
path="/path/to/3.3.18",
table="SUT",
unit="Hybrid",
extensions="all",
)
INFO Parser: reading EXIOBASE hybrid HSUT from /Users/lorenzorinaldi/Library/CloudStorage/OneDrive-SharedLibraries-PolitecnicodiMilano/DENG-SESAM - Documenti/c-Research/a-Datasets/_Input Output Databases/EXIOBASE/3.3.18.
INFO Parser: EXIOBASE hybrid HSUT parsed with 164 activities, 200 commodities, 7 factor rows and 350 extension rows.
INFO Metadata: initialized.
Parse the hybrid IOT#
Use this when you need the hybrid input-output representation instead of the HSUT.
[4]:
db_iot = mario.parse_exiobase(
path="/path/to/3.3.18",
table="IOT",
unit="Hybrid",
extensions=["resource", "Emiss"],
)
INFO Parser: reading EXIOBASE hybrid HIOT from /Users/lorenzorinaldi/Library/CloudStorage/OneDrive-SharedLibraries-PolitecnicodiMilano/DENG-SESAM - Documenti/c-Research/a-Datasets/_Input Output Databases/EXIOBASE/3.3.18.
INFO Parser: EXIOBASE hybrid HIOT parsed with 164 sectors, 7 factor rows and 119 extension rows.
INFO Metadata: initialized.
Inspect the parsed database#
Once parsed, the result is a standard MARIO database. From here the normal exploration methods apply.
db_iot or db_sut).[9]:
db_sut
[9]:
name = None
table = SUT
tech_assumption = industry-based
scenarios = ['baseline']
Activity = 164
Commodity = 200
Factor of production = 7
Satellite account = 350
Consumption category = 6
Region = 48
When dealing with hybrid tables, it’s fundamental to have clear view of the unit of measures. Units are stored in a dictionary, as shown below
[10]:
db_sut.units["Commodity"].head()
[10]:
| unit | |
|---|---|
| Paddy rice | tonnes |
| Wheat | tonnes |
| Cereal grains nec | tonnes |
| Vegetables; fruit; nuts | tonnes |
| Oil seeds | tonnes |
The same exploration, can be done for IOTs
[11]:
db_iot.units["Satellite account"]
[11]:
| unit | |
|---|---|
| Employment: Low-skilled male | 1000 persons |
| Employment: Low-skilled female | 1000 persons |
| Employment: Medium-skilled male | 1000 persons |
| Employment: Medium-skilled female | 1000 persons |
| Employment: High-skilled male | 1000 persons |
| ... | ... |
| Ni (soil - Emiss) | tonnes |
| C (air - Emiss) | tonnes |
| other emissions (undef - Emiss) | tonnes |
| Carbon dioxide, biogenic (air - Emiss) | tonnes |
| Other emissions nec (air - Emiss) | tonnes |
119 rows × 1 columns
Notes#
hybrid parsing is more dataset-specific than the monetary case, so the direct hybrid entry points are often acceptable in documentation examples;
keep extension selection explicit if you want lighter parse results;
use the standard MARIO inspection workflow after parsing, exactly as for other databases;
if you need the newer consequential developments, the current hybrid parser is not there yet.