mario.parse_emerging
- mario.parse_emerging(
- path: str,
- table: str = 'IOT',
- year: int | None = None,
- regions=None,
- load_co2: bool = True,
- co2_path: str | None = None,
- labels_path: str | None = None,
- variant: str = 'standard',
- model: str = 'Database',
- name: str | None = None,
- calc_all: bool = False,
- **kwargs,
Parse one EMERGING MATLAB bundle from the supported Zenodo releases.
- This parser supports the EMERGING bundles associated with these official
Zenodo version records:
https://doi.org/10.5281/zenodo.10956623for the olderv1.0release with files likeglobal_mrio_2017.matandEMERGING_CO2_2017.mat;https://doi.org/10.5281/zenodo.17557778forv2.0;https://doi.org/10.5281/zenodo.18518911forv2.1;https://doi.org/10.5281/zenodo.19461860forv2.2; andhttps://doi.org/10.5281/zenodo.18303090for the EMERGING-EEvariant.In practice, MARIO accepts these local naming conventions:
global_mrio_<year>.matforv1.0bundles,EMERGING_V2_<year>_m.matforv2.xbundles,EMERGING_V2_<year>.matfor older localv2.xcopies when they expose the same internal MATLAB structure, andEMERGING_E_<year>.matfor the EMERGING-E power-disaggregated variant.
For local
v2.xfiles, the parser does not try to infer the exact sub-version2.0versus2.1versus2.2from the filename alone, because the public naming convention is shared across those releases.The associated paper is:
Huo, J., Chen, P., Hubacek, K., Zheng, H., Meng, J., & Guan, D. (2022). Full-scale, near real-time multi-regional input-output table for the global emerging economies (EMERGING). Journal of Industrial Ecology, 26, 1218-1232. https://doi.org/10.1111/jiec.13264
MARIO currently supports only the multiregional IOT bundle, not any future alternative table layouts.
variant='E'selects the local EMERGING-E bundle. That variant currently parses the economic blocks directly fromEMERGING_E_<year>.mat. MARIO first tries to auto-detect a compatible sibling.xlsxworkbook with oneSector/Label/Namecolumn exposing the full EMERGING-E sector list; uselabels_path=to override that detection explicitly. If no compatible workbook is found, MARIO falls back to a built-in EMERGING-E sector classification (146 sectors: the standard EMERGING sectors with the electricity sector disaggregated into 14 power sub-sectors) whenever the bundle dimensions match, and only otherwise to generic sector labels. The EMERGING-E Zenodo record itself ships no sector-name file, so this built-in classification is what provides explicit sector names by default.MATLAB v7.3 stored axes are normalized to MARIO’s row/column convention during sparse loading, avoiding a dense transpose of the full matrix.
Full EMERGING readings have about 32,600–35,800 production nodes. Install the optional sparse solver with
conda install -c conda-forge scikit-umfpackor usepip install 'mariopy[umfpack]'after installing SuiteSparse. Successful imports select session defaultssolve,directandsingular_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. Keepcalc_all=Falseto calculate only the matrices requested later.- Parameters:
path (str) – path to one local EMERGING main
.matfile or to a directory containing one or more EMERGING yearly bundles.table (str, optional) – EMERGING parsing currently supports only
IOTtables.year (int, optional) – reference year to select when
pathpoints to a directory that contains more than one EMERGING main MATLAB file.regions (sequence[str] or str, optional) – optional ISO3 subset. When omitted, parse all regions in the bundle. This is useful because the full EMERGING matrix is very large.
load_co2 (bool, optional) – when
True, auto-detect and parse the companionEMERGING_CO2_<year>.matorEMERGING_CO2_<year>_IEA.matfile if it is present next to the main bundle. WhenFalse, keep satellite accounts as placeholders.co2_path (str, optional) – explicit path to the companion CO2 MATLAB file. When provided it overrides sibling auto-detection. For
variant="E", MARIO accepts either an EMERGING-E-specific CO2 companion already aligned to the 146-sector layout or one standard EMERGINGEMERGING_CO2_<year>companion. In the latter case, MARIO projects the 7 fuel rows of the original aggregatedelectricitysector onto the EMERGING-E power generation sub-sectors using a fixed fuel-to-technology mapping.labels_path (str, optional) – explicit path to one Excel workbook containing sector labels. For
variant="E"this overrides the automatic search among sibling.xlsxworkbooks next to the main MATLAB file.variant (str, optional) – parser variant. Use
"standard"for the original EMERGING bundles and"E"for the EMERGING-E power-disaggregated local bundle.model (str, optional) – public MARIO model class to instantiate.
Databaseis 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.