Skip to content

Commit e6cd38c

Browse files
committed
New spatialization approach + works with BACI datanow + new mapping with HS + many other things
1 parent 9554747 commit e6cd38c

13 files changed

+3196
-829
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"_X ": "RoW", "A59": "WL", "A79": "WL", "ABW": "WL", "AFG": "WA", "AGO": "WF", "AIA": "WL", "ALB": "WE", "AND": "WE", "ANT": "WA", "ARE": "WM", "ARG": "WL", "ARM": "WA", "ASM": "WA", "ATA": "WA", "ATB": "WA", "ATF": "WF", "ATG": "WL", "AUS": "AU", "AUT": "AT", "AZE": "WA", "BDI": "WF", "BEL": "BE", "BEN": "WF", "BES": "WL", "BFA": "WF", "BGD": "WA", "BGR": "BG", "BHR": "WM", "BHS": "WL", "BIH": "WE", "BLM": "WL", "BLR": "WE", "BLZ": "WL", "BMU": "WL", "BOL": "WL", "BRA": "BR", "BRB": "WL", "BRN": "WA", "BTN": "WA", "BVT": "WF", "BWA": "WF", "CAF": "WF", "CAN": "CA", "CCK": "WA", "CHE": "CH", "CHL": "WL", "CHN": "CN", "CIV": "WF", "CMR": "WF", "COD": "WF", "COG": "WF", "COK": "WA", "COL": "WL", "COM": "WF", "CPV": "WF", "CRI": "WL", "CUB": "WL", "CUW": "WL", "CXR": "WA","CYM": "WL", "CYP": "CY", "CZE": "CZ", "DEU": "DE", "DJI": "WF", "DMA": "WL", "DNK": "DK", "DOM": "WL", "DZA": "WF", "E19": "WE", "ECU": "WL", "EGY": "WM", "ERI": "WF", "ESH": "WF", "ESP": "ES", "EST": "EE", "ETH": "WF", "F19": "WF", "FIN": "FI", "FJI": "WA", "FLK": "WL", "FRA": "FR", "FRO": "WE", "FSM": "WA", "GAB": "WF", "GBR": "GB", "GEO": "WA", "GHA": "WF", "GIB": "WE", "GIN": "WF", "GMB": "WF", "GNB": "WF", "GNQ": "WF", "GRC": "GR", "GRD": "WL", "GRL": "WL", "GTM": "WL", "GUM": "WA", "GUY": "WL", "HKG": "WA", "HMD": "WA", "HND": "WL", "HRV": "HR", "HTI": "WL", "HUN": "HU", "IDN": "ID", "IND": "IN", "IOT": "WA", "IRL": "IE", "IRN": "WM", "IRQ": "WM", "ISL": "WE", "ISR": "WM", "ITA": "IT", "JAM": "WL", "JOR": "WM", "JPN": "JP", "KAZ": "WA", "KEN": "WF", "KGZ": "WA", "KHM": "WA", "KIR": "WA", "KNA": "WL", "KOR": "KR", "KWT": "WM", "LAO": "WA", "LBN": "WM", "LBR": "WF", "LBY": "WF", "LCA": "WL", "LKA": "WA", "LSO": "WF", "LTU": "LT", "LUX": "LU", "LVA": "LV", "MAC": "WA", "MAR": "WF", "MDA": "WE", "MDG": "WF", "MDV": "WA", "MEX": "MX", "MHL": "WA", "MKD": "WE", "MLI": "WF", "MLT": "MT", "MMR": "WA", "MNE": "WE", "MNG": "WA", "MNP": "WA", "MOZ": "WF", "MRT": "WF", "MSR": "WL", "MUS": "WF", "MWI": "WF", "MYS": "WA", "NAM": "WF", "NCL": "WA", "NER": "WF", "NGA": "WF", "NFK": "WA", "NIC": "WL", "NIU": "WA", "NLD": "NL", "NOR": "NO", "NPL": "WA", "NRU": "WA", "NZL": "WA", "O19": "WA", "OMN": "WM", "PAK": "WA", "PAN": "WL", "PCN": "WA", "PER": "WL", "PHL": "WA", "PLW": "WA", "PNG": "WA", "POL": "PL", "PRK": "WA", "PRT": "PT", "PRY": "WL", "PSE": "WM", "PYF": "WA", "QAT": "WM", "ROU": "RO", "RUS": "RU", "RWA": "WF", "S19": "WA", "SAU": "WM", "SDN": "WF", "SEN": "WF", "SGP": "WA", "SGS": "WL", "SHN": "WF", "SLB": "WA", "SLB": "WF", "SLV": "WL", "SMR": "WE", "SOM": "WF", "SPM": "WL", "SRB": "WE", "SSD": "WF", "STP": "WF", "SUR": "WL", "SVK": "SK", "SVN": "SI", "SWE": "SE", "SWZ": "WF", "SXM": "WL", "SYC": "WF", "SYR": "WF", "TCA": "WL", "TCD": "WF", "TGO": "WF", "THA": "WA", "TJK": "WA", "TKL": "WA", "TKM": "WA", "TLS": "WA", "TON": "WA", "TTO": "WL", "TUN": "WF", "TUR": "TR", "TUV": "WA", "TZA": "WF", "UGA": "WF", "UKR": "WE", "UMI": "WA", "URY": "WL", "USA": "US", "UZB": "WA", "VAT": "WE", "VCT": "WL", "VEN": "WL", "VGB": "WL", "VNM": "WA", "VUT": "WA", "WLF": "WA", "WSM": "WA", "X1 ": "RoW", "X2 ": "RoW", "XX ": "RoW", "YEM": "WM", "ZAF": "ZA", "ZMB": "WF", "ZWE": "WF"}
1+
{"_X ": "RoW", "A59": "WL", "A79": "WL", "ABW": "WL", "AFG": "WA", "AGO": "WF", "AIA": "WL", "ALB": "WE", "AND": "WE", "ANT": "WA", "ARE": "WM", "ARG": "WL", "ARM": "WA", "ASM": "WA", "ATA": "WA", "ATB": "WA", "ATF": "WF", "ATG": "WL", "AUS": "AU", "AUT": "AT", "AZE": "WA", "BDI": "WF", "BEL": "BE", "BEN": "WF", "BES": "WL", "BFA": "WF", "BGD": "WA", "BGR": "BG", "BHR": "WM", "BHS": "WL", "BIH": "WE", "BLM": "WL", "BLR": "WE", "BLZ": "WL", "BMU": "WL", "BOL": "WL", "BRA": "BR", "BRB": "WL", "BRN": "WA", "BTN": "WA", "BVT": "WF", "BWA": "WF", "CAF": "WF", "CAN": "CA", "CCK": "WA", "CHE": "CH", "CHL": "WL", "CHN": "CN", "CIV": "WF", "CMR": "WF", "COD": "WF", "COG": "WF", "COK": "WA", "COL": "WL", "COM": "WF", "CPV": "WF", "CRI": "WL", "CUB": "WL", "CUW": "WL", "CXR": "WA","CYM": "WL", "CYP": "CY", "CZE": "CZ", "DEU": "DE", "DJI": "WF", "DMA": "WL", "DNK": "DK", "DOM": "WL", "DZA": "WF", "E19": "WE", "ECU": "WL", "EGY": "WM", "ERI": "WF", "ESH": "WF", "ESP": "ES", "EST": "EE", "ETH": "WF", "F19": "WF", "FIN": "FI", "FJI": "WA", "FLK": "WL", "FRA": "FR", "FRO": "WE", "FSM": "WA", "GAB": "WF", "GBR": "GB", "GEO": "WA", "GHA": "WF", "GIB": "WE", "GIN": "WF", "GMB": "WF", "GNB": "WF", "GNQ": "WF", "GRC": "GR", "GRD": "WL", "GRL": "WL", "GTM": "WL", "GUM": "WA", "GUY": "WL", "HKG": "WA", "HMD": "WA", "HND": "WL", "HRV": "HR", "HTI": "WL", "HUN": "HU", "IDN": "ID", "IND": "IN", "IOT": "WA", "IRL": "IE", "IRN": "WM", "IRQ": "WM", "ISL": "WE", "ISR": "WM", "ITA": "IT", "JAM": "WL", "JOR": "WM", "JPN": "JP", "KAZ": "WA", "KEN": "WF", "KGZ": "WA", "KHM": "WA", "KIR": "WA", "KNA": "WL", "KOR": "KR", "KWT": "WM", "LAO": "WA", "LBN": "WM", "LBR": "WF", "LBY": "WF", "LCA": "WL", "LKA": "WA", "LSO": "WF", "LTU": "LT", "LUX": "LU", "LVA": "LV", "MAC": "WA", "MAR": "WF", "MDA": "WE", "MDG": "WF", "MDV": "WA", "MEX": "MX", "MHL": "WA", "MKD": "WE", "MLI": "WF", "MLT": "MT", "MMR": "WA", "MNE": "WE", "MNG": "WA", "MNP": "WA", "MOZ": "WF", "MRT": "WF", "MSR": "WL", "MUS": "WF", "MWI": "WF", "MYS": "WA", "NAM": "WF", "NCL": "WA", "NER": "WF", "NGA": "WF", "NFK": "WA", "NIC": "WL", "NIU": "WA", "NLD": "NL", "NOR": "NO", "NPL": "WA", "NRU": "WA", "NZL": "WA", "O19": "WA", "OMN": "WM", "PAK": "WA", "PAN": "WL", "PCN": "WA", "PER": "WL", "PHL": "WA", "PLW": "WA", "PNG": "WA", "POL": "PL", "PRK": "WA", "PRT": "PT", "PRY": "WL", "PSE": "WM", "PYF": "WA", "QAT": "WM", "ROU": "RO", "RUS": "RU", "RWA": "WF", "S19": "WA", "SAU": "WM", "SDN": "WF", "SEN": "WF", "SGP": "WA", "SGS": "WL", "SHN": "WF", "SLB": "WA", "SLE": "WF", "SLV": "WL", "SMR": "WE", "SOM": "WF", "SPM": "WL", "SRB": "WE", "SSD": "WF", "STP": "WF", "SUR": "WL", "SVK": "SK", "SVN": "SI", "SWE": "SE", "SWZ": "WF", "SXM": "WL", "SYC": "WF", "SYR": "WF", "TCA": "WL", "TCD": "WF", "TGO": "WF", "THA": "WA", "TJK": "WA", "TKL": "WA", "TKM": "WA", "TLS": "WA", "TON": "WA", "TTO": "WL", "TUN": "WF", "TUR": "TR", "TUV": "WA", "TZA": "WF", "UGA": "WF", "UKR": "WE", "UMI": "WA", "URY": "WL", "USA": "US", "UZB": "WA", "VAT": "WE", "VCT": "WL", "VEN": "WL", "VGB": "WL", "VNM": "WA", "VUT": "WA", "WLF": "WA", "WSM": "WA", "X1 ": "RoW", "X2 ": "RoW", "XX ": "RoW", "YEM": "WM", "ZAF": "ZA", "ZMB": "WF", "ZWE": "WF"}

Data/HS_to_exiobase_name.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

Data/Spatialization_of_elementary_flows/ei3.10/ecoinvent_plumbering.json

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.

Data/Spatialization_of_elementary_flows/ei3.9.1/ecoinvent_plumbering.json

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.

Data/ecoinvent_to_HS.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

README.md

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,56 @@
11
## _Regioinvent_
22

3-
```Regioinvent``` is a Python package for automatically regionalizing the ecoinvent database using trade data. Copies of
4-
ecoinvent processes are created and key inputs such as electricity, heat and municipal solid waste are adapted to the
5-
context of the country for which regionalization is being carried out. Elementary flows are also regionalized (water,
6-
land and acidification/eutrophication). To decide for which regions to create a regionalized copy of an ecoinvent process,
7-
export data from the UN COMTRADE database is being used. <br>
3+
```Regioinvent``` is a Python package for automatically connecting the _ecoinvent_ database to _BACI_, a trade database.
84

9-
Once these regionalized processes are available, consumption markets are also created based this time on the import data
10-
of the UN COMTRADE database and the domestic production levels derived from the EXIOBASE GMRIO database. These consumption
11-
markets are then reconnected to any regionalized process to deepen the regionalization of ecoinvent. <br>
5+
Connecting to a trade database enables a more realistic description of average supply chains within the ecoinvent database
6+
through the introduction of consumption markets, based on international import data and production data. The result is a
7+
version of ecoinvent which almost does not rely on non-national processes such as RER, RoW or GLO.
128

13-
## Illustration
9+
Furthermore, since the resulting regionalized version of ecoinvent relies much less on broad regions, the regionalization
10+
of impacts can show its full potential. Therefore, ```Regioinvent``` also fully spatializes all relevant elementary flows
11+
and connects these spatialized elementary flows to regionalized life cycle impact assessment methods. Currently, only
12+
the IMPACT World+ LCIA method is available. Later on, we plan on adding ReCiPe and EF as well.
1413

15-
#### Before
16-
Take the process of production of 1-butanol in Europe. It uses the European markets for electricity, medium voltage and
17-
for heat. It also purchases propylene from the European market:
14+
## Showcase
15+
To showcase what ```Regioinvent``` does, let's illustrate on an example: the production of diethanolamine in Sweden.
16+
The production of diethanolamine in ecoinvent is also available for RER and RoW.
1817

19-
<img src="images/not_regio.png" width="600"/>
18+
Screenshot below shows the starting point of this example: the diethanolamine production process for Europe.
2019

21-
#### After
22-
Once regionalized through Regioinvent, say for production in Belgium, the process now uses electricity and heat mixes
23-
adapted to the Belgian context. It also uses the consumption market of propylene specific to Belgium. Finally, the
24-
elementary flows are also regionalized to the Belgian context.
20+
<img src="images/diethanolamine_rer_production.png" width="600"/>
2521

26-
<img src="images/regio.png" width="600"/>
22+
23+
After running ```Regioinvent``` three types of processes are created.
24+
1. National production processes <br>
25+
26+
Below you can see the example for the Swedish production but the code also created such production processes for many countries.
27+
28+
<img src="images/diethanolamine_swedish_prod.png" width="600"/>
29+
30+
2. National consumption markets <br>
31+
32+
Below you can see the example for the Swedish consumption market but the code also created such consumption markets for many countries.
33+
34+
<img src="images/diethanolamine_swedish_consumption.png" width="600"/>
35+
36+
3. A global export market <br>
37+
38+
The global export market shows the biggest exporters of the commodity worldwide.
39+
40+
41+
<img src="images/diethanolamine_global_export_market.png" width="600"/>
42+
43+
44+
## ```Regioinvent``` in your LCAs
45+
Use the three types of processes generated with ```Regioinvent``` as follows:
46+
- If you know where the production of your commodity occurs, select the corresponding national production process. Either
47+
for the location exactly, or, if unavailable, the RoW version which is an aggregate of all the countries not being in the
48+
biggest producers.
49+
- If you don't know where the production of your commodity occurs, BUT you know where it was bought, rely on the consumption
50+
markets. These describe where the commodity should come from on average, given the trade of the region.
51+
- If you don't know anything about the process, you can either use the RoW or GLO process of ecoinvent, or rely on the
52+
global export process of ```Regioinvent``` as a proxy. Note however that it is an export market. It does not include the
53+
domestic production in the shares of that market.
2754

2855
## Get started
2956

@@ -32,22 +59,23 @@ To get started you can git clone this repository or simply download it.
3259

3360
You will need a few things to get started:
3461
- Have an ecoinvent license (obviously)
35-
- Download the UN COMTRADE database that was already extracted. Make sure to take the version that was "treated".
62+
- Download the BACI database that was already extracted.
3663
You can download it from [here](https://doi.org/10.5281/zenodo.13146833)
37-
- Install ```brightway2``` and have a brightway2 project with ecoinvent3.9.1 cut-off
64+
- Install ```brightway2``` and have a brightway2 project with either ecoinvent3.9.1 cut-off or ecoinvent3.10 cut-off
3865

39-
Note that regioinvent currently only supports the ecoinvent 3.9.1 cut-off version and operates solely on brightway2 (NOT
66+
Note that regioinvent currently only supports the ecoinvent 3.9.1/3.10 cut-off version and operates solely on brightway2 (NOT
4067
brightway2.5).
4168

4269
You can then follow the steps presented in the [demo.ipynb](https://github.com/CIRAIG/Regioinvent/tree/master/doc/demo.ipynb)
4370
Jupyter notebook.
4471

4572
Required python version: 3.11
4673

47-
## How to use?
48-
Once the regionalized version of ecoinvent is created, you can perform your LCAs either through brightway2 or its GUI
49-
activity-browser. <br> There are currently no support for other LCA software, as SimaPro and openLCA are not able to
50-
support such a massive database.
74+
## How to use after running the code?
75+
Once the regionalized version of ecoinvent is created on Python, you can export it to brightway2. You will then be able to
76+
perform your LCAs either through brightway2 or its GUI activity-browser as you would with the regular ecoinvent database. <br>
77+
Do note that calculations are longer with ```Regioinvent``` (~5 to 10 minutes calculation for the first run). <br>
78+
There are currently no support for other LCA software, as SimaPro and openLCA are not able to support the size of the database.
5179

5280
## Adaptations
5381
- ```Regiopremise``` (https://github.com/matthieu-str/Regiopremise) is an adaptation of regioinvent that can work with the

0 commit comments

Comments
 (0)