mario.CoreModel.get_concordances
- CoreModel.get_concordances(
- set=None,
- classification=None,
- item=None,
- *,
- region=None,
- details=False,
Return classification codes for this database’s native items.
- Parameters:
set (str, optional) –
ActivityorCommodityfor SUTs;Sectorfor IOTs. Defaults to Activity for SUTs and Sector for IOTs. On IOTs, Activity/Commodity also select a compatible native projection. BONSAI HIOT has an explicit reference-product/process bridge.classification (str, optional) – Target edition, e.g.
"NACE Rev. 2.1","NACE Rev. 2","ISIC Rev. 4","CPA 2.2","CPC 2.1"or"HS 2007". Defaults to NACE 2.1 for activities and CPA 2.2 for commodities. Seeavailable_concordancesfor this native variant.item (str or iterable of str, optional) – One native label, or several labels. Omit to include the complete current set. Dictionary keys retain native labels and input order.
region (str, optional) – Restrict to items actually present in one region. Without a region, use the distinct union of the current regional memberships.
details (bool, default False) – Include descriptions, original source locations, route direction and qualifications instead of returning only code lists.
- Returns:
{native_item: [classification_codes]}, or detailed records. Unverified/unknown native identities have an empty code list. An item absent from the selected database set raises WrongInput.- Return type:
dict
Notes
Uses offline metadata compiled from the Database explorer sources. It neither computes IO matrices nor downloads data. Correspondences can be partial or many-to-many and do not provide allocation weights. Source parents do not establish detailed membership. Aggregated, renamed or newly added identities are unverified unless an explicit bundled identity matches. Standard aliases select NACE 2.1, CPA 2.2, ISIC 4, CPC 2.1 and HS 2007; other editions must be explicit.
Examples
On a GLORIA release 060 SUT:
>>> db.get_concordances(set="Activity", classification="NACE Rev. 2.1", item="Growing wheat") {'Growing wheat': ['01.11']}
On an EXIOBASE monetary SUT parsed as
exio:>>> exio.get_concordances(set="Commodity", classification="HS 2007", item="Wheat") {'Wheat': ['100110', '100190']}
See Classification concordances for native-set selection, all supported editions, regional lookups, output examples and interpretation of source qualifications.
Return contract#
details=False returns {native_item: [target_codes]}.
details=True returns {native_item: record}, where each record contains
codes, classification, native_code, native_name, status,
matches, sources, as_of, profile and note.
matches[code] holds a description and a list of routes. Each route records
its nodes, steps, status, mapping origin and note; source records are keyed
by the IDs referenced in the steps. A mapped result can retain partial overlaps.
An item absent from the current set raises WrongInput. A current item
without a verified link returns an empty code list. An unsupported database
variant or target edition also raises WrongInput; check
available_concordances and
database_profile for availability.
To prepare a model aggregation, use
get_aggregation(). Code lists alone provide no allocation
weights and cannot be used to divide a native item among several groups.