Start with a traded item. IOTs use a sector; SUTs use a commodity.

import mario

db = mario.load_test("IOT")
trade = db.calc_trades(item="Agriculture")
carbon = db.calc_trades_content(
    indicator="CO2", item="Agriculture", method="total",
)

Result · Two region-by-region DataFrames: traded output in the item’s unit, and embodied CO2 in the indicator’s unit. Rows are origins; columns are destinations. Domestic flows are included.

Methods and indicators#

Question

Method

How much is traded?

calc_trades

What impacts are embodied in that trade?

calc_trades_content

Which producers contribute to those impacts?

calc_trades_content(..., breakdown=True)

How concentrated are impact contributors?

calc_trades_concentration

What share depends on selected regions?

calc_trades_exposure

Concentration is an HHI of absolute contributor-region shares. Exposure is the share of absolute content attributable to selected contributor regions. Both require an indicator; they summarize the embodied-content breakdown.

Direct

method="direct"

Impacts at the traded item’s producer.

Total

method="total"

Direct and upstream impacts together.

Upstream

method="upstream"

The indirect part of the total.

Embodied trade is not a consumption footprint. Summing intermediate and final trade across supply-chain stages can count the same upstream impact multiple times. Use the returned tables to describe the selected transactions.

Separate final and intermediate transactions
components = db.calc_trades(item="Agriculture", aggregate=False)
final_only = db.calc_trades(item="Agriculture", intermediate=False)

aggregate=False retains separate Intermediate and Final column groups. total=True adds a Total row and column. Omit item only when the combined items have homogeneous units.

Inspect the contributing producers
contributors = db.calc_trades_content(
    indicator="CO2", item="Agriculture",
    method="total", breakdown=True,
)

Rows retain the origin and contributor levels. breakdown=True cannot be combined with total=True.

Structural linkages
linkages = db.calc_linkages(scenario="baseline")

db.calc_linkages() measures forward and backward relationships in the production structure. It answers a different question from the quantities crossing a trade link.

Follow the multi-year EXIOBASE case or trace individual structural paths.