lca_algebraic is a layer above Brightway designed for the definition of parametric inventories with fast computation of LCA impacts, suitable for monte-carlo / global sensitivity analysis
It integrates the magic of Sympy in order to write parametric formulas as regular Python expressions.
lca-algebraic provides a set of helper functions for :
- compact & human readable definition of activities :
- search background (tech and biosphere) activities
- create new foreground activities with parametrized amounts
- parametrize / update existing background activities (extending the class Activity)
- Definition of parameters
- Fast computation of LCAs
- Computation of monte carlo method and global sensitivity analysis (Sobol indices)
- Support for automatic check of homogeneity of physical units
⚙ Installation
We support both Brightway 2.4 (legacy) and Brightway 2.5 via two separate branches / libraries :
- lca_algebraic (for Brightway 2.4)
- lca_algebraic_bw25 (for Brightway 2.5)
1) Setup separate environment
First create a python environment, with Python [>=3.10, <3.13] :
With Conda (or mamba)
conda create -n lca python==3.10
conda activate lca
With virtual env
python3.10 -m venv .venv
source .venv/bin/activate
2) Install lca_algebraic
pip install lca_algebraic
Or, for brightway 25 :
pip install lca_algebraic_bw25
3) [Optional] Install Jupyter & Activity Browser
You may also install Jupyter and Activity Browser on the same environment.
Jupyter :
pip install jupyter
Activity Browser can only be installed via conda/mamba. Note that it can also be installed on a separate Python env and will still be able to access and browse the projects created programmatically with lca_algebraic / Brightway.
conda install activity-browser
NOTE While the inventories created in lca_algebraic are stored in the Brightway project, the formulas and parameters are not compatible with Activity Browser Before computing impacts with vanilla Brightway2 or Activity Browser, you may use the function freezeParams() to update the amounts in your database for a given scenario / set of parameter values.
📚 Documentation & resources
Full documentation is hosted on readthedocs
We provide some notebooks :
- Example notebook : Basic functionalities
- Handbook : More examples, also showing the usage of the Brightway functions.
- Workshop : A "real life" exercise used as a short training on lca_algebraic
📧 Mailing list
Please register to this dedicated mailing list to discuss the evolutions of this library and be informed of future releases :
lca_algebraic@groupes.mines-paristech.fr
© Licence & Copyright
This library has been developed by MinesParis - PSL - O.I.E team, for the project INCER-ACV, lead by ADEME.
It is distributed under the BSD License
Logo
Please use the following logo to advertise about this librairy.
Metadata
Release files for lca-algebraic 1.4.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_algebraic-1.4.1.tar.gz | 64.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lca_algebraic-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 128.8 kB
Release files / lca_algebraic-1.4.1.tar.gz
| Download URL | lca_algebraic-1.4.1.tar.gz |
|---|---|
| Size | 64.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4028e8f115beb11f7f74cd1124f81efd82a775be19d66315b43b722fc44bbe3
|
|
BLAKE2b-256 checksum How to use checksums |
318d41a606aa1982257116464d554faa5ce96dc04bad6c7cc0e2b23468e25c0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / lca_algebraic-1.4.1-py3-none-any.whl
| Download URL | lca_algebraic-1.4.1-py3-none-any.whl |
|---|---|
| Size | 64.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57cfe4501a3cf3a5a5c8fac6f0e1471ae70988733fdd2023c598c1294b9f6478
|
|
BLAKE2b-256 checksum How to use checksums |
4cb59320ad33b81c0e36a5ce5a72cbba4bfa6ffe09c401d4126675f2d1a4c720
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|