Skip to main content

lca_supplymat

A Brightway Life Cycle Impact Assessment (LCIA) method that computes the amount of manufactured materials (copper, concrete, steel, aluminium, …) directly from Life Cycle Inventory (LCI) data.

Intro

Impact indicators related to material depletion, criticality or circularity are notoriously complex to interpret. lca-supplymat exposes a simpler, physical metric: the quantity of manufactured material required by an inventory. Instead of weighing environmental impact, it counts how much of a given material (e.g. copper or steel) is embedded in the activities of a life cycle.

This library implements this as a standard Brightway LCIA method, so it benefits from the full range of Brightway functionalities (MultiLCA, Monte-Carlo, parameterization, etc.). For each material, a pseudo-biosphere flow is added to the activities that produce it, and the method computes the net production of the material — the difference between what an activity outputs and what it consumes of the same material upstream. This avoids double counting between the production and market stages. One LCIA method is registered per material.

The approach was tested with ecoinvent 3.11 (cutoff and attributional system models). It is comparable in spirit to the Edges library, but implemented natively within the Brightway framework.

Installation

pip install lca_supplymat

Prerequisites :

  • A Python>3.12 environement
  • Brightway 25 (will be installed if not found)
  • A Brightway project with ecoinvent background database

Usage

Setup of the methods

from lca_supplymat import setup_lca_supply_mat, cleanup

setup_lca_supply_mat(
    target_db="ecoinvent-3.11-cutoff",
    yaml_file="path.yaml",      # optionnal: load 23 definition from the package by default 
    subset=["concrete"],        # optional: install only these definitions
    out_folder="data/out",      # optional: write a CSV report per material
    check_impacts=True,         # optional: verify impact scores are ~1
    cleanup_before=True,        # optional: reset existing material methods first
)

What it does:

  • creates a dedicated Brightway database lca_supplymat holding the pseudo-biosphere "counting" flows;
  • computes the net production of each requested material for every matching activity and adds the corresponding exchanges;
  • registers one Brightway Method per material, keyed as ("lca_supplymat", "total", "<material>").

Once the setup is done, you can use the new methods as regular LCIA methods in Brightway / Activity Browser.

To tear the material methods down again:

cleanup("ecoinvent-3.11-cutoff")

Material definitions

By default, the 23 definitions of material methods are installed : See materials_methods.yaml

Writing your own definitions

You can provide your own definitions by passing the yaml_file parameter.

The file maps a definition key to a set of matching rules:

copper:
  matchings: ["copper, cathode*", "copper, anode*"]
  excludes: ["*scrap*"]      # optional: patterns that veto a match
  unit: kilogram
  tolerance: 0.05            # optional: allowed deviation for the impact check (default 0.05)
  • matchings (required): a list of patterns used to select activities.
  • excludes (optional): a list of patterns; if any matches, the activity is rejected.
  • unit (required): the unit the matching activities must be in.
  • tolerance (optional): allowed deviation of the impact score from 1 during the check_impacts step (default 0.05).

Matching semantics. Matching is performed against an activity's reference product name (act["reference product"]), and the activity's unit must equal the definition's unit. A pattern containing * acts as a prefix wildcard ("steel*" matches any reference product starting with steel); a pattern without * must be an exact match. excludes follows the same wildcard rules and overrides any matchings hit.

Then pass your file to the setup:

setup_lca_supply_mat(
    target_db="ecoinvent-3.11-cutoff",
    yaml_file="path/to/my_definitions.yaml")

Example

See the demo notebook for a complete, runnable example.

License

MIT

Authors

Organisation : OIE | Mines Paris | PSL

Metadata

Release files for lca_supplymat 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lca_supplymat 0.1.3
File Size Uploaded
lca_supplymat-0.1.3.tar.gz 192.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lca_supplymat 0.1.3
File Interpreter ABI Platform
lca_supplymat-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 206.0 kB

Release files / lca_supplymat-0.1.3.tar.gz

Download URL lca_supplymat-0.1.3.tar.gz
Size 192.2 kB
Tags Source
SHA-256 checksum
How to use checksums
89c3c5f5c7bae1829a766eaf38a34b2a21238e8f8eadd22636b7a94dff3bda71
BLAKE2b-256 checksum
How to use checksums
5e16c5593a3e38421d80ff8489848e26992aee4ee690b167d7a75113515f6e1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"LMDE","version":"7","id":"gigi","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / lca_supplymat-0.1.3-py3-none-any.whl

Download URL lca_supplymat-0.1.3-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d98d6095e51bbfbda675ca73fc479f0f6cb523d3d9807c3434d039add520ffbc
BLAKE2b-256 checksum
How to use checksums
34cac2c8de318eec2bcbb8fa35221812ebfbc14a03bc792dc7b3f8ffe5922bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"LMDE","version":"7","id":"gigi","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page