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
Prerequisite: a Brightway25 environment with an imported technosphere 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_supplymatholding 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
Methodper 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 thecheck_impactsstep (default0.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
Authors
Organisation : OIE | Mines Paris | PSL
Metadata
Release files for lca_supplymat 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lca_supplymat-0.1.1.tar.gz | 191.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lca_supplymat-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 204.8 kB
Release files / lca_supplymat-0.1.1.tar.gz
| Download URL | lca_supplymat-0.1.1.tar.gz |
|---|---|
| Size | 191.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24331e60cccd300b06c114bb66d814e466b3d51da50e807465ebb21d3ed04e70
|
|
BLAKE2b-256 checksum How to use checksums |
62a7caf11398614ca75e38553935dcbeb8afff2e057d824ed4df39c76c285411
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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.1-py3-none-any.whl
| Download URL | lca_supplymat-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29efa9b690400623aad58efd878f6a7521f4076d991bb60989831d48470d8acd
|
|
BLAKE2b-256 checksum How to use checksums |
da53c7a6bf88745293f8eaad6679b2a9e8f1a43fd956e3be3940ee8255216dde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.29 {"installer":{"name":"uv","version":"0.9.29","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}
|