{
"cells": [
{
"metadata": {},
"cell_type": "markdown",
"source": "# Quick Tutorial",
"id": "17c635dbd52f352e"
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"This notebook aims to show how to generate Life-Cycle Assessment (LCA) impact scores to be used in an Energy System Model (ESM). LCA impact scores can be used within modelling constraints, e.g., upper limit on life-cycle greenhouse gas emissions, or in the objective function, e.g., minimizing the total damage on human health. _mescal_ applies several transformations on LCA data to ensure the alignement between your ESM and LCA models. For instance, _mescal_ performs double-counting removal (to avoid the overestimation of flows that are already represented in your ESM, e.g., energy flows), technological parameters harmonization (e.g., lifetime, efficiency, capacity factors), and normalization (to ease the solving process in your ESM).\n",
"\n",
"In this notebook, we illustrate the use of _mescal_ with the core model of [EnergyScope](https://library.energyscope.net/main/). We employed the ecoinvent LCA database, but the overall methodology is agnostic to the used LCA database. To replicate this example for your ESM, you should adapt the input data files accordingly, following the example ones.\n",
"\n",
"We show how to:\n",
"- create the ESM database (i.e., the database containing the datasets corresponding to the technologies and resources of the model) in your brightway2 project\n",
"- perform life-cycle impact assessment and contribution analyses\n",
"- create the .mod and .dat files for your ESM\n",
"- visualise the results using _mescal_'s [embodied plots](https://github.com/matthieu-str/mescal/blob/master/dev/plot.ipynb)"
],
"id": "6b8e9663c810cbdd"
},
{
"metadata": {},
"cell_type": "code",
"source": "%pip install mescal==1.2.3",
"id": "6edf245978b5cb64",
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
"id": "2f11aaf838a61fdc",
"metadata": {},
"source": [
"## Project setup"
]
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:23.323391Z",
"start_time": "2026-02-16T16:58:04.691127Z"
}
},
"cell_type": "code",
"source": [
"# Import the required libraries\n",
"from mescal import *\n",
"import pandas as pd\n",
"import bw2data as bd"
],
"id": "b672d4148ca512fc",
"outputs": [],
"execution_count": 2
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:24.737115Z",
"start_time": "2026-02-16T16:58:24.728079Z"
}
},
"cell_type": "code",
"source": [
"location = 'BE' # Set the ecoinvent location code corresponding to your ESM here (e.g., 'BE' for Belgium)\n",
"year = 2020 # Set the year here (e.g., 2050)"
],
"id": "c281338ea70d41e3",
"outputs": [],
"execution_count": 3
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:24.757349Z",
"start_time": "2026-02-16T16:58:24.749987Z"
}
},
"cell_type": "code",
"source": [
"# Set the name of your main LCI database (e.g., ecoinvent or premise database) here:\n",
"lca_db_name = \"ecoinvent-3.10.1-cutoff\""
],
"id": "648565aa7139a842",
"outputs": [],
"execution_count": 4
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:24.774051Z",
"start_time": "2026-02-16T16:58:24.766278Z"
}
},
"cell_type": "code",
"source": [
"# Set the name of the new database with the ESM results\n",
"esm_db_name = f'EnergyScope_{location}_{year}'"
],
"id": "124cc2eab891c975",
"outputs": [],
"execution_count": 5
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:24.791049Z",
"start_time": "2026-02-16T16:58:24.783270Z"
}
},
"cell_type": "code",
"source": [
"# Set the list of LCIA methods for which you want indicators (they must be registered in your brightway project)\n",
"lcia_methods=['EF v3.1']"
],
"id": "a931b284b4979c98",
"outputs": [],
"execution_count": 6
},
{
"cell_type": "code",
"id": "d9880509ae8f22bd",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:25.162143Z",
"start_time": "2026-02-16T16:58:24.803684Z"
}
},
"source": [
"# Set up your Brightway project\n",
"bd.projects.set_current('ecoinvent3.10.1') # put the name of your brightway project here"
],
"outputs": [],
"execution_count": 7
},
{
"cell_type": "code",
"id": "dbac8775081f3bf8",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:31.105400Z",
"start_time": "2026-02-16T16:58:25.171058Z"
}
},
"source": [
"# Load the LCI database from your brightway project\n",
"lca_db = Database(lca_db_name, create_pickle=True)"
],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2026-02-16 11:58:31,095 - Database - INFO - Loaded ecoinvent-3.10.1-cutoff from pickle!\n"
]
}
],
"execution_count": 8
},
{
"cell_type": "markdown",
"id": "e4b8f57e51fb06c1",
"metadata": {},
"source": [
"## Input data"
]
},
{
"cell_type": "code",
"id": "4e5a3b74aa018cb9",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:31.166993Z",
"start_time": "2026-02-16T16:58:31.158666Z"
}
},
"source": "path_to_input_files = 'path/to/your/input/files/' # put here the path to the folder containing the input data files",
"outputs": [],
"execution_count": 9
},
{
"cell_type": "markdown",
"id": "e8dc550a85181349",
"metadata": {},
"source": [
"Input data files can be retrieved from [mescal GitHub repository](https://github.com/matthieu-str/mescal/tree/master/dev/energyscope_data/core)"
]
},
{
"cell_type": "code",
"id": "1d458ca99528d5a0",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:31.356467Z",
"start_time": "2026-02-16T16:58:31.196192Z"
}
},
"source": [
"mapping = pd.read_csv(path_to_input_files+'mapping.csv')\n",
"unit_conversion = pd.read_excel(path_to_input_files+'unit_conversion.xlsx')\n",
"mapping_esm_flows_to_CPC = pd.read_csv(path_to_input_files+'mapping_esm_flows_to_CPC.csv')\n",
"model = pd.read_csv(path_to_input_files+'model.csv')\n",
"technology_compositions = pd.read_csv(path_to_input_files+'technology_compositions.csv')\n",
"technology_specifics = pd.read_csv(path_to_input_files+'technology_specifics.csv')\n",
"lifetime = pd.read_csv(path_to_input_files+'lifetime.csv')\n",
"efficiency = pd.read_csv(path_to_input_files+'efficiency.csv')\n",
"impact_abbrev = pd.read_csv(path_to_input_files+'impact_abbrev.csv')"
],
"outputs": [],
"execution_count": 10
},
{
"cell_type": "code",
"id": "101fc41b7e28179a",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:31.429930Z",
"start_time": "2026-02-16T16:58:31.419921Z"
}
},
"source": [
"mapping.Database = lca_db_name # set the database name in the mapping file"
],
"outputs": [],
"execution_count": 11
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:31.481785Z",
"start_time": "2026-02-16T16:58:31.455272Z"
}
},
"cell_type": "code",
"source": [
"# For this example notebook, we consider a sample of available technologies and resources\n",
"example_technologies = [\n",
" 'GEOTHERMAL',\n",
" 'HYDRO_RIVER',\n",
" 'NUCLEAR',\n",
" 'WIND_ONSHORE', 'WIND_ONSHORE_CONNECTION', 'WIND_ONSHORE_TURBINE',\n",
" 'COAL',\n",
" 'GAS',\n",
" 'H2',\n",
" 'URANIUM',\n",
"]\n",
"mapping = mapping[mapping.Name.isin(example_technologies)].reset_index()\n",
"model = model[model.Name.isin(example_technologies)].reset_index()"
],
"id": "46c83282b8cf44a2",
"outputs": [],
"execution_count": 12
},
{
"cell_type": "markdown",
"id": "f8ebfaf69faab385",
"metadata": {},
"source": [
"## Initialize the ESM class"
]
},
{
"cell_type": "code",
"id": "bcd8ffd5d4feb008",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:31.541908Z",
"start_time": "2026-02-16T16:58:31.517513Z"
}
},
"source": [
"esm = ESM(\n",
" mapping=mapping,\n",
" unit_conversion=unit_conversion,\n",
" model=model,\n",
" mapping_esm_flows_to_CPC_cat=mapping_esm_flows_to_CPC,\n",
" main_database=lca_db,\n",
" esm_db_name=esm_db_name,\n",
" esm_location=location,\n",
" technology_compositions=technology_compositions,\n",
" tech_specifics=technology_specifics,\n",
" lifetime=lifetime,\n",
" efficiency=efficiency,\n",
" regionalize_foregrounds=['Operation', 'Resource'], # types of LCI datasets that will be regionalized\n",
" locations_ranking=['BE', 'RER', 'GLO', 'RoW'], # order of preference for locations when regionalizing\n",
" results_path_file='lca_results/',\n",
")"
],
"outputs": [],
"execution_count": 13
},
{
"cell_type": "code",
"id": "c65fffc9fc54f331",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:31.591913Z",
"start_time": "2026-02-16T16:58:31.572983Z"
}
},
"source": [
"esm.clean_inputs()"
],
"outputs": [],
"execution_count": 14
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:32.135371Z",
"start_time": "2026-02-16T16:58:31.622223Z"
}
},
"cell_type": "code",
"source": [
"# Update mapping dataframe with better locations\n",
"esm.change_location_mapping_file()"
],
"id": "66c9aa4f81a11331",
"outputs": [],
"execution_count": 15
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:32.254793Z",
"start_time": "2026-02-16T16:58:32.186106Z"
}
},
"cell_type": "code",
"source": "esm.main_database.test_mapping_file(esm.mapping) # test the mapping file",
"id": "9ea25487e86b9ae2",
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2026-02-16 11:58:32,236 - Database - INFO - Mapping successfully linked to the database\n"
]
},
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"execution_count": 16
},
{
"cell_type": "code",
"id": "d3d1853dc5aa35ba",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:32.331352Z",
"start_time": "2026-02-16T16:58:32.270649Z"
}
},
"source": [
"esm.check_inputs()"
],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2026-02-16 11:58:32,322 - Mescal - WARNING - Some technologies have no lifetime value for LCA in the lifetime file. Therefore, lifetime harmonization with the ESM will not be performed during the LCIA phase and capacity factor harmonization during the feedback of ESM results will not be performed either for those technologies: ['GEOTHERMAL']\n",
"2026-02-16 11:58:32,325 - Mescal - WARNING - List of technologies that are in the tech_specifics file but not in the mapping file (this will not be a problem in the workflow): ['ATM_CCS', 'BIOMETHANATION', 'BIO_HYDROLYSIS', 'DEC_DIRECT_ELEC', 'ELECTRICITY', 'ELEC_EXPORT', 'GASIFICATION_SNG', 'H2_ELECTROLYSIS', 'HABER_BOSCH', 'IND_DIRECT_ELEC', 'PV', 'PYROLYSIS_TO_FUELS', 'PYROLYSIS_TO_LFO', 'SYN_METHANATION']\n"
]
}
],
"execution_count": 17
},
{
"cell_type": "markdown",
"id": "c9db7257fddacfd5",
"metadata": {},
"source": [
"## Create the ESM database in your Brightway2 project"
]
},
{
"cell_type": "code",
"id": "75c756c5daab291b",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:35.874709Z",
"start_time": "2026-02-16T16:58:32.367292Z"
}
},
"source": [
"esm.create_esm_database()"
],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"2026-02-16 11:58:32,911 - Mescal - INFO - Starting to remove double-counted flows\n",
"100%|██████████| 4/4 [00:00<00:00, 8.13it/s]\n",
"2026-02-16 11:58:34,356 - Mescal - INFO - Double-counting removal done in 1.4 seconds\n",
"2026-02-16 11:58:34,378 - Mescal - INFO - Starting to correct efficiency differences\n",
"2026-02-16 11:58:34,626 - Mescal - INFO - Efficiency differences corrected in 0.2 seconds\n",
"2026-02-16 11:58:34,705 - Mescal - INFO - Starting to write database\n",
"2026-02-16 11:58:34,915 - Database - INFO - Previous EnergyScope_BE_2020 will be overwritten!\n",
"Writing activities to SQLite3 database:\n",
"0% [#############] 100% | ETA: 00:00:00\n",
"Total time elapsed: 00:00:00\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Title: Writing activities to SQLite3 database:\n",
" Started: 02/16/2026 11:58:35\n",
" Finished: 02/16/2026 11:58:35\n",
" Total time elapsed: 00:00:00\n",
" CPU %: 140.20\n",
" Memory %: 8.89\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2026-02-16 11:58:35,805 - Database - INFO - EnergyScope_BE_2020 written to Brightway!\n",
"2026-02-16 11:58:35,808 - Mescal - INFO - Database written in 1.1 seconds\n"
]
}
],
"execution_count": 18
},
{
"cell_type": "markdown",
"id": "58f3a7c6823168",
"metadata": {},
"source": [
"## Compute LCA impact scores and perform contribution analysis"
]
},
{
"cell_type": "code",
"id": "46bd90d6d592470",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:42.352354Z",
"start_time": "2026-02-16T16:58:35.914420Z"
}
},
"source": [
"impact_scores, contrib_analysis_res, _ = esm.compute_impact_scores(\n",
" methods=lcia_methods,\n",
" contribution_analysis='both',\n",
")"
],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Getting activity data\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 13/13 [00:00, ?it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Adding exchange data to activities\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 494/494 [00:00<00:00, 14108.58it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Filling out exchange data\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 13/13 [00:00<00:00, 19.86it/s]\n",
"2026-02-16 11:58:36,652 - Database - INFO - Loaded EnergyScope_BE_2020 from brightway!\n",
"13it [00:03, 3.61it/s]\n"
]
}
],
"execution_count": 19
},
{
"cell_type": "code",
"id": "11fc82929ce22a20",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:42.475996Z",
"start_time": "2026-02-16T16:58:42.421174Z"
}
},
"source": [
"impact_scores.to_csv(esm.results_path_file+'impact_scores.csv', index=False)\n",
"contrib_analysis_res.to_csv(esm.results_path_file+'contribution_analysis.csv', index=False)"
],
"outputs": [],
"execution_count": 20
},
{
"cell_type": "code",
"id": "fbd355fb914a1b6d",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:43.674182Z",
"start_time": "2026-02-16T16:58:42.504825Z"
}
},
"source": [
"impact_scores_direct_emissions, _, _ = esm.compute_impact_scores(\n",
" methods=lcia_methods,\n",
" assessment_type='direct emissions', # specific metrics for direct emissions during operation\n",
")"
],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Getting activity data\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 13/13 [00:00, ?it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Adding exchange data to activities\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 494/494 [00:00<00:00, 25933.22it/s]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Filling out exchange data\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"100%|██████████| 13/13 [00:00<00:00, 63.34it/s]\n",
"2026-02-16 11:58:42,760 - Database - INFO - Loaded EnergyScope_BE_2020 from brightway!\n",
"2026-02-16 11:58:42,823 - Database - INFO - Previous EnergyScope_BE_2020_direct_emissions will be overwritten!\n",
"Writing activities to SQLite3 database:\n",
"0% [####] 100% | ETA: 00:00:00\n",
"Total time elapsed: 00:00:00\n",
"2026-02-16 11:58:43,303 - Database - INFO - EnergyScope_BE_2020_direct_emissions written to Brightway!\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Title: Writing activities to SQLite3 database:\n",
" Started: 02/16/2026 11:58:43\n",
" Finished: 02/16/2026 11:58:43\n",
" Total time elapsed: 00:00:00\n",
" CPU %: 97.70\n",
" Memory %: 9.68\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"4it [00:00, 200.29it/s]\n"
]
}
],
"execution_count": 21
},
{
"cell_type": "code",
"id": "77f1c0457114ee15",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:43.726946Z",
"start_time": "2026-02-16T16:58:43.714974Z"
}
},
"source": [
"impact_scores_direct_emissions.to_csv(esm.results_path_file+'impact_scores_direct_emissions.csv', index=False)"
],
"outputs": [],
"execution_count": 22
},
{
"cell_type": "markdown",
"id": "6d03e7a9f1b123bc",
"metadata": {},
"source": [
"## Create .dat and .mod files for AMPL integration"
]
},
{
"cell_type": "markdown",
"id": "1fa880cab925175e",
"metadata": {},
"source": [
"By default, the resulting .dat and .mod files are saved in the result directory specified in the ESM class initialization (here 'lca_results/')."
]
},
{
"cell_type": "markdown",
"id": "a3b657694fdbdedb",
"metadata": {},
"source": [
"We can select a few impact categories that we want to integrate in the model. Here, we select only two categories: TTHH (Total human health) and TTEQ (Total ecosystem quality). The abbreviations are defined in the impact_abbrev.csv file."
]
},
{
"cell_type": "code",
"id": "3b0704db53479201",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:43.778143Z",
"start_time": "2026-02-16T16:58:43.772692Z"
}
},
"source": "specific_lca_abbrev = ['CC', 'MR', 'PMF', 'ETF']",
"outputs": [],
"execution_count": 23
},
{
"cell_type": "code",
"id": "aa368a78d038e1ac",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:43.872441Z",
"start_time": "2026-02-16T16:58:43.821661Z"
}
},
"source": [
"esm.normalize_lca_metrics(\n",
" R=impact_scores,\n",
" mip_gap=1e-6,\n",
" lcia_methods=lcia_methods,\n",
" specific_lcia_abbrev=specific_lca_abbrev,\n",
" impact_abbrev=impact_abbrev,\n",
" file_name='techs_lca',\n",
")"
],
"outputs": [],
"execution_count": 24
},
{
"cell_type": "code",
"id": "3102580ffc4b4b83",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:43.987883Z",
"start_time": "2026-02-16T16:58:43.926426Z"
}
},
"source": [
"# specific for direct emissions metrics\n",
"esm.normalize_lca_metrics(\n",
" R=impact_scores,\n",
" R_direct=impact_scores_direct_emissions, # thus we specify this\n",
" mip_gap=1e-6,\n",
" lcia_methods=lcia_methods,\n",
" specific_lcia_abbrev=specific_lca_abbrev,\n",
" assessment_type='direct emissions', # and this\n",
" impact_abbrev=impact_abbrev,\n",
" file_name='techs_lca_direct',\n",
")"
],
"outputs": [],
"execution_count": 25
},
{
"cell_type": "code",
"id": "a34e6131b95e82fa",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:44.061408Z",
"start_time": "2026-02-16T16:58:44.043821Z"
}
},
"source": [
"esm.generate_mod_file_ampl(\n",
" lcia_methods=lcia_methods,\n",
" impact_abbrev=impact_abbrev,\n",
" specific_lcia_abbrev=specific_lca_abbrev,\n",
" file_name='objectives_lca',\n",
" energyscope_version='core',\n",
")"
],
"outputs": [],
"execution_count": 26
},
{
"cell_type": "code",
"id": "306505769420cc0a",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:44.139467Z",
"start_time": "2026-02-16T16:58:44.127018Z"
}
},
"source": [
"# specific for direct emissions metrics\n",
"esm.generate_mod_file_ampl(\n",
" lcia_methods=lcia_methods,\n",
" specific_lcia_abbrev=specific_lca_abbrev,\n",
" assessment_type='direct emissions', # specify this\n",
" impact_abbrev=impact_abbrev,\n",
" file_name='objectives_lca_direct',\n",
" energyscope_version='core',\n",
")"
],
"outputs": [],
"execution_count": 27
},
{
"cell_type": "markdown",
"id": "ebc2d2e10668ac66",
"metadata": {},
"source": [
"## Visualize the LCA impact scores"
]
},
{
"cell_type": "code",
"id": "e5201366cd6d4326",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:44.191586Z",
"start_time": "2026-02-16T16:58:44.182626Z"
}
},
"source": [
"plot = Plot(\n",
" df_impact_scores=impact_scores,\n",
" lifetime=lifetime, # used to visualise infrastructure impacts per kW.year\n",
")"
],
"outputs": [],
"execution_count": 28
},
{
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:44.236492Z",
"start_time": "2026-02-16T16:58:44.229296Z"
}
},
"cell_type": "code",
"source": "visualise_technologies = [tec for tec in example_technologies if tec not in ['WIND_ONSHORE_TURBINE', 'WIND_ONSHORE_CONNECTION']]",
"id": "cc8f75dd44e4dad1",
"outputs": [],
"execution_count": 29
},
{
"cell_type": "code",
"id": "2f89d33b3744b531",
"metadata": {
"ExecuteTime": {
"end_time": "2026-02-16T16:58:53.080483Z",
"start_time": "2026-02-16T16:58:44.279836Z"
}
},
"source": [
"plot.plot_indicators_of_technologies_for_one_impact_category(\n",
" technologies_list=visualise_technologies,\n",
" impact_category=(\n",
" 'EF v3.1',\n",
" 'climate change',\n",
" 'global warming potential (GWP100)',\n",
" ),\n",
" metadata={\n",
" 'operation_unit': 'kWh',\n",
" 'construction_unit': 'kW',\n",
" 'technologies_type': 'electricity production',\n",
" },\n",
")"
],
"outputs": [
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.plotly.v1+json": {
"data": [
{
"hovertemplate": "
Technology: %{x}Value: %{y:.2e} kg CO2-Eq/kWh",
"name": "Operation",
"x": [
"GEOTHERMAL",
"HYDRO_RIVER",
"NUCLEAR",
"WIND_ONSHORE"
],
"y": [
6.608520257913948E-6,
2.96884873133466E-5,
0.0012415977491752332,
1.561894307589358E-4
],
"type": "bar",
"xaxis": "x",
"yaxis": "y"
},
{
"hovertemplate": "
Technology: %{x}Value: %{y:.2e} kg CO2-Eq/kW/year",
"name": "Infrastructure",
"x": [
"GEOTHERMAL",
"HYDRO_RIVER",
"NUCLEAR",
"WIND_ONSHORE"
],
"y": [
797.2956396396214,
19.85546286001049,
17.539901701808777,
32.82171634784321
],
"type": "bar",
"xaxis": "x2",
"yaxis": "y2"
}
],
"layout": {
"template": {
"data": {
"barpolar": [
{
"marker": {
"line": {
"color": "white",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "barpolar"
}
],
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "white",
"width": 0.5
},
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "bar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "#C8D4E3",
"linecolor": "#C8D4E3",
"minorgridcolor": "#C8D4E3",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "#C8D4E3",
"linecolor": "#C8D4E3",
"minorgridcolor": "#C8D4E3",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "contour"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "heatmap"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram": [
{
"marker": {
"pattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
}
},
"type": "histogram"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatter": [
{
"fillpattern": {
"fillmode": "overlay",
"size": 10,
"solidity": 0.2
},
"type": "scatter"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
],
"sequentialminus": [
[
0.0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1.0,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "white",
"showlakes": true,
"showland": true,
"subunitcolor": "#C8D4E3"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "white",
"polar": {
"angularaxis": {
"gridcolor": "#EBF0F8",
"linecolor": "#EBF0F8",
"ticks": ""
},
"bgcolor": "white",
"radialaxis": {
"gridcolor": "#EBF0F8",
"linecolor": "#EBF0F8",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "white",
"gridcolor": "#DFE8F3",
"gridwidth": 2,
"linecolor": "#EBF0F8",
"showbackground": true,
"ticks": "",
"zerolinecolor": "#EBF0F8"
},
"yaxis": {
"backgroundcolor": "white",
"gridcolor": "#DFE8F3",
"gridwidth": 2,
"linecolor": "#EBF0F8",
"showbackground": true,
"ticks": "",
"zerolinecolor": "#EBF0F8"
},
"zaxis": {
"backgroundcolor": "white",
"gridcolor": "#DFE8F3",
"gridwidth": 2,
"linecolor": "#EBF0F8",
"showbackground": true,
"ticks": "",
"zerolinecolor": "#EBF0F8"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "#DFE8F3",
"linecolor": "#A2B1C6",
"ticks": ""
},
"baxis": {
"gridcolor": "#DFE8F3",
"linecolor": "#A2B1C6",
"ticks": ""
},
"bgcolor": "white",
"caxis": {
"gridcolor": "#DFE8F3",
"linecolor": "#A2B1C6",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "#EBF0F8",
"linecolor": "#EBF0F8",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "#EBF0F8",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "#EBF0F8",
"linecolor": "#EBF0F8",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "#EBF0F8",
"zerolinewidth": 2
}
}
},
"xaxis": {
"anchor": "y",
"domain": [
0.0,
0.45
]
},
"yaxis": {
"anchor": "x",
"domain": [
0.0,
1.0
],
"title": {
"text": "global warming potential (GWP100) [kg CO2-Eq/kWh]"
}
},
"xaxis2": {
"anchor": "y2",
"domain": [
0.55,
1.0
]
},
"yaxis2": {
"anchor": "x2",
"domain": [
0.0,
1.0
],
"title": {
"text": "global warming potential (GWP100) [kg CO2-Eq/kW/year]"
}
},
"annotations": [
{
"font": {
"size": 16
},
"showarrow": false,
"text": "Operation",
"x": 0.225,
"xanchor": "center",
"xref": "paper",
"y": 1.0,
"yanchor": "bottom",
"yref": "paper"
},
{
"font": {
"size": 16
},
"showarrow": false,
"text": "Infrastructure",
"x": 0.775,
"xanchor": "center",
"xref": "paper",
"y": 1.0,
"yanchor": "bottom",
"yref": "paper"
}
],
"showlegend": false,
"title": {
"text": "LCA Indicators of electricity production technologies for global warming potential (GWP100)"
}
},
"config": {
"plotlyServerURL": "https://plot.ly"
}
},
"text/html": [
"