Skip to content

Commit 9e73e20

Browse files
committed
Styling updates + wiki page on contributions and sankey
1 parent e52e67d commit 9e73e20

7 files changed

Lines changed: 147 additions & 24 deletions

File tree

activity_browser/docs/wiki/LCA-Results.md

Lines changed: 126 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,132 @@
44
> Please help us improve the wiki by reading our
55
> [contributing guidelines](https://github.com/LCA-ActivityBrowser/activity-browser/blob/main/CONTRIBUTING.md#wiki).
66
7-
# Overview
7+
## Overview
88

9-
# Contribution Analysis
9+
### Inventory
1010

11-
# Sankey
11+
### LCA overview results
1212

13-
# Scenarios
13+
### Score matrix
14+
15+
## Contribution Analysis
16+
### Differences between approaches
17+
Activity Browser has two contribution analysis approaches available to assess results,
18+
`Elementary Flow (EF) Contributions` and `Process contributions`.
19+
20+
Before we discuss the different approaches, we introduce a small example for the production of _'steel'_:
21+
22+
![steel production example](./assets/steel_production_example.svg)
23+
24+
The amounts we use are:
25+
26+
| activity | product | technosphere exchanges | biosphere exchanges |
27+
|------------------------|--------------------|---------------------------------|--------------------------|
28+
| coal production | 10 kg coal | | 0.02 kg CH<sub>4</sub> |
29+
| electricity production | 10 kWh electricity | 10 kg coal | 10.808 kg CO<sub>2</sub> |
30+
| steel production | 10 kg steel | 5 kWh electricity<br/>5 kg coal | 10 kg CO<sub>2</sub> |
31+
32+
<sub>
33+
<b>Note:</b> These numbers are used for ease of understanding, not for realism.
34+
</sub>
35+
36+
To produce 1 kg of steel, we get a climate change impact of 1.6 kg CO2 eq with the _'IPCC 2021'_ impact category.
37+
In the way Brightway (and thus Activity Browser) calculate results, a _contribution matrix_ is calculated with
38+
all impacts _from_ all EFs and all activities.
39+
For the system and functional unit above, this would be:
40+
41+
| | coal prod. | elec. prod. | steel prod. |
42+
|-----------------------|------------|-------------|-------------|
43+
| <b>CO<sub>2</sub></b> | - | 0.5404... | 1 |
44+
| <b>CH<sub>4</sub></b> | 0.0596... | - | - |
45+
46+
The _contribution matrix_ show the dis-aggregated results for each individual biosphere flow for each activity.
47+
48+
#### EF contributions
49+
If we take sum the _rows_ to one row, we get the EF contributions
50+
(the contribution of all CO<sub>2</sub> and CH<sub>4</sub> impacts together).
51+
In the case above, the EF contributions are:
52+
- CO<sub>2</sub>: 1.5404... (96.3%)
53+
- CH<sub>4</sub>: 0.0596... (3.7%)
54+
55+
#### Process contributions
56+
If we take the sum of the _columns_ to one column, we get the process contributions
57+
(the contribution of all coal, electricity and steel production impacts together).
58+
In the case above, the process contributions are:
59+
- coal production: 0.0596... (3.7%)
60+
- electricity production: 0.5404... (62.5%)
61+
- steel production: 1 (33.8%)
62+
63+
To summarize, the difference between EF and process contributions is the direction the contribution matrix is summed.
64+
65+
### Manipulating results
66+
In this section we generalize a little bit for the different contribution approaches,
67+
we call the _from_ part of the contributions (the EFs or activities above) _entities_.
68+
69+
There are several ways Activity Browser manipulates your results by default.
70+
- The results are **sorted** so that the largest (absolute) values are shown first
71+
- A `cut-off` of 5% is applied to group all entities with an impact below that value.
72+
- The contributions are _normalized_ to the impact of that reference flow, meaning they are show as a percentage,
73+
counting up to 100%
74+
75+
These actions are taken to show you the most relevant results.
76+
77+
You can manually manipulate the contribution results in the next menu, which we explain bit by bit below.
78+
![contributions cutoff](./assets/contribution_manipulation.png)
79+
80+
#### Cut-off
81+
You can manually change the `cut-off` of the results in two ways, `Relative` or `Top #`.
82+
The `Relative` option shows contributions _from_ entities of _x_% or higher.
83+
The `Top #` options shows contributions from the _x_ entities that contribute the most (as absolute).
84+
85+
You can change the value of the cut-off in the menu shown below.
86+
87+
#### Compare
88+
The `Compare` menu allows you to compare different dimensions of results.
89+
You can compare between:
90+
- _Reference flows_
91+
- _Impact categories_
92+
- _Scenarios_ (only available in scenario LCA, see [scenarios](#scenarios))
93+
94+
The compare mode defines what is shown in the figure.
95+
96+
#### Aggregation
97+
The `Aggregate by` menu can be used to _group_ results based on field names.
98+
As an example, EF contributions can be grouped on the name,
99+
for example to group all flows with the same name.
100+
Another example for process contributions can be grouped based on their reference product name.
101+
102+
#### Plot and Table
103+
By default, Activity Browser shows a plot and a table.
104+
You can disable one of them if you want to focus on one of them.
105+
106+
#### Relative and Absolute
107+
Finally, you can choose between `Relative` and `Absolute` results.
108+
The `Relative` results will sum to 100%, the `Absolute` results will sum to the impact score.
109+
110+
## Sankey
111+
The `Sankey` tab shows results from [graph traversal](https://docs.brightway.dev/projects/graphtools/en/latest/index.html).
112+
Graph traversal calculates results step-by-step for _nodes_ (activites) in the _graph_ (supply chain/product system).
113+
114+
### Sankey configuration
115+
In the `Sankey` tab, you can configure, you can set the
116+
Reference flow, Impact category and Scenario (only available in scenario LCA, see [scenarios](#scenarios)) to be shown.
117+
you can also set a `cutoff` and `calculation depth` setting.
118+
119+
The `cutoff` setting will stop traversing the supply chain once the impact is below the percentage specified.
120+
The `calculation depth` will stop traversing the supply chain once that number of calculations have been performed.
121+
122+
### Sankey results
123+
In the Sankey, the red arrows show the _cumulative_ impact of the _product_ flow
124+
(_direct_ from that process and _indirect_ from all upstream processes involved in producing that product),
125+
the boxes show the _direct_ (process contribution) impact of that process.
126+
127+
Using the example above in the [contribution analysis](#contribution-analysis) section, we show the sankey below.
128+
The [process contribution](#process-contributions) results are also shown in the boxes below.
129+
130+
![sankey example](./assets/sankey_example.png)
131+
132+
## Other Results tabs
133+
The Monte Carlo and Senstivity Analysis tabs are explained on the [Uncertainty](Uncertainty) page.
134+
135+
## Scenarios

activity_browser/docs/wiki/Parameters.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
> Please help us improve the wiki by reading our
55
> [contributing guidelines](https://github.com/LCA-ActivityBrowser/activity-browser/blob/main/CONTRIBUTING.md#wiki).
66
7-
# General concepts
7+
## General concepts
88

9-
# Creating parameters
9+
## Creating parameters
1010

1111
Parameters are
1212
[special objects in Brightway](https://docs.brightway.dev/en/latest/content/api/bw2data/parameters/index.html)
@@ -27,7 +27,7 @@ The reason for this uniqueness is that a parameter _name_ can be used in
2727
_formulas_ to insert the _value_ of that parameter at that specific place
2828
in the _formula_.
2929

30-
## Project parameters
30+
### Project parameters
3131

3232
A new project parameter can be created by clicking the `New` button next
3333
to the 'Project' label. A default name is assigned to this parameter which
@@ -44,7 +44,7 @@ menu. Do note however that a parameter can __only__ be deleted if it is
4444
not being used in any other _formula_ field, if the Activity Browser finds
4545
that this __is__ the case, the `Delete` option will be grayed out.
4646

47-
## Activity Parameters
47+
### Activity Parameters
4848

4949
Where project parameters can be used by any formula anywhere in the project,
5050
activity parameters are a lot more narrow in scope. These parameters are made
@@ -83,4 +83,4 @@ parameter, much the same as project parameters. Additionally, the Activity
8383
Detail tab can be opened for the parameterized activity by way of the
8484
`Open activities` option.
8585

86-
# Scenarios
86+
## Scenarios

activity_browser/docs/wiki/Plugins.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The plugin code has been designed and written by [Remy le Calloch](https://githu
55
(supported by [G-SCOP laboratories](https://g-scop.grenoble-inp.fr/en/laboratory/g-scop-laboratory))
66
with revisions from the Activity Browser.
77

8-
# Available plugins
8+
## Available plugins
99
> [!CAUTION]
1010
> Plugins are not always developed by Activity Browser maintainers.
1111
> Below are listed plugins from people we know but we do not verify plugins.
@@ -19,11 +19,11 @@ with revisions from the Activity Browser.
1919
| [Notebook](https://github.com/Pan6ora/ab-plugin-Notebook) | Use Jupyter notebooks from AB | [anaconda](https://anaconda.org/pan6ora/ab-plugin-template), [github](https://github.com/Pan6ora/ab-plugin-Notebook) | Rémy Le Calloch |
2020
| [template](https://github.com/Pan6ora/activity-browser-plugin-template) | An empty plugin to start from | [anaconda](https://anaconda.org/pan6ora/ab-plugin-template), [github](https://github.com/Pan6ora/activity-browser-plugin-template) | Rémy Le Calloch |
2121

22-
# Installation
23-
## Detailed instructions
22+
## Installation
23+
### Detailed instructions
2424
Every plugin's webpage (links are provided in the above table) should have a **Get this plugin** section with installation instructions.
2525

26-
## General instructions
26+
### General instructions
2727
Plugins are often conda packages (like the Activity Browser).
2828
To add a plugin, install it in your conda environment.
2929

@@ -35,26 +35,26 @@ To add a plugin, install it in your conda environment.
3535
> conda install -c pan6ora -c conda-forge ab-plugin-notebook
3636
> ```
3737
38-
# Usage
38+
## Usage
3939
Once a new plugin is installed restart the Activity Browser.
4040
4141
> [!IMPORTANT]
4242
> If you need help using a plugin or experience problems when using a plugin,
4343
> contact the developers of the plugin, the Activity Browser team cannot help you.
4444
45-
## Enabling a plugin
45+
### Enabling a plugin
4646
Plugins are enabled **per project**.
4747
Simply open the plugin manager in the `Tools > Plugins` menu.
4848
Select the plugins you want to use and close the plugin manager.
4949
New tabs should have appeared in Activity Browser for each plugin.
5050
51-
## Disabling a plugin
51+
### Disabling a plugin
5252
Disable a plugin the same way you activated it.
5353
5454
> [!WARNING]
5555
> Keep in mind that all data created by the plugin in a project could be erased when you disable it.
5656
57-
# Developing a plugin
57+
## Developing a plugin
5858
> [!IMPORTANT]
5959
> The plugin system is still in development so keep in mind that things may change at any point.
6060

activity_browser/docs/wiki/Uncertainty.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
> Please help us improve the wiki by reading our
55
> [contributing guidelines](https://github.com/LCA-ActivityBrowser/activity-browser/blob/main/CONTRIBUTING.md#wiki).
66
7-
# Uncertainty
7+
## Uncertainty
88

99
___
10-
# Monte Carlo simulation
10+
## Monte Carlo simulation
1111
[Monte Carlo Simulation](https://en.wikipedia.org/wiki/Monte_Carlo_method) is method that relies on repeated random sampling of data to produce numerical results for uncertain input data. In LCA, economic and environmental flows as well as other data such as characterization factors or parameters may include uncertainty information (e.g. mathematical distributions or pedigree scores). During Monte Carlo simulation, random samples of this data are generated to calculate LCA results.
1212

1313
In the Activity Browser, Monte Carlo Simulation can be used. The **steps **for this are:
@@ -26,22 +26,22 @@ An example for Monte Carlo Simulation results are shown below.
2626
![monte carlo results](./assets/monte_carlo_results.jpg)
2727

2828
___
29-
# Global Sensitivity Analysis
30-
## Overview
29+
## Global Sensitivity Analysis
30+
### Overview
3131
Global Sensitivity Analysis (GSA) is a family of methods that aim to determine which input variables are contributing the most to variations in the outcome of a stochastic model. In the context of Life Cycle Assessment (LCA), this means that GSA aims at identifying those variables (e.g. economic flows, environmental flows, characterization factors, or parameters) that due to their uncertainty distributions affect LCA results most. This provides the LCA practitioner with a shortlist of important variables for his model. For some of these variables, it may be possible to collect additional data to reduce uncertainties, which may then reduce the overall uncertainties of the LCA results.
3232

3333
The **AB implements the delta-moment independent method** to calculate the global sensitivities. The approach is described in detail in our [scientific paper](https://onlinelibrary.wiley.com/doi/10.1111/jiec.13194). Our implementation uses the Sensitivity Analysis Library [SALib](https://github.com/SALib/SALib).
3434

3535
Here we describe the basic steps for performing GSA with the Activity Browser.
3636

3737

38-
## Step 1: creating a calculation setup and calculating LCA results
38+
### Step 1: creating a calculation setup and calculating LCA results
3939
[How to create a calculation setup](https://github.com/LCA-ActivityBrowser/activity-browser/wiki#creating-a-calculation-setup)
4040

41-
## Step 2: performing Monte Carlo Simulation
41+
### Step 2: performing Monte Carlo Simulation
4242
Monte Carlo simulation needs to be performed in order to obtain sampled data for the LCA inputs (economic and environmental flows, characterization factors, and parameters) and the corresponding LCA results, which, together, form the required input data for the GSA. A description of how to perform Monte Carlo Simulation in the AB is provided [here](https://github.com/LCA-ActivityBrowser/activity-browser/wiki/Monte-Carlo-Simulation).
4343

44-
## Step 3: Global Sensitivity Analysis
44+
### Step 3: Global Sensitivity Analysis
4545
Now the user can go to the `Sensitivity Analysis` tab to perform GSA. The figure below shows the options the user has at this level.
4646
* While the Monte Carlo Simulation was performed for all reference flows and impact categories at once, the GSA is performed for one reference flow and impact category at a time. This means that the user needs to **select the reference flow and impact categories** that he is interested in. GSA can be repeated later for other reference flows or impact categories based on the same Monte Carlo Simulation results.
4747
* The user can specify the **cut-off values **used for flows in the A (technosphere) and B (biosphere) matrices.
63.4 KB
Loading
53.9 KB
Loading

activity_browser/docs/wiki/assets/steel_production_example.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)