# Introduction

The scripts and data provided in this GitHub are at the basis of the paper *"Representative Life Cycle Assessment modelling of prospective trajectories: A parametric approach applied to the French heating sector"* co-authored by Mélanie Douziech, Romain Besseau, Raphaël Jolivet, Bianka Shoai-Tehrani, Jean-Yves Bourmaud, Guillaume Busato, Mathilde Gresset-Bourgeois and Paula Pérez-López. 
This paper shows how parameterized foreground and background inventories can be combined using the lca_algebraic library to flexibly estimate the environmental impacts occurring over the life cycle of a system of interest. 
This methodology was illustrated by estimating the environmental impacts of the planned evolution of the French heating sector until 2050.

The setup and instructions provided below allow to generate the environmental impacts of the French heating sector as presented in the paper. 
The results can be found in the `data/out` folder. In addition, the script `electricity.ipynb` suggests ways to investigate the energy scenarios analysed. Input and output data of this script can be found under `data/scenarios`.

The scripts located in the lib folder define all parameterized models developed to represent, on the one hand, the energy production scenarios and, on the other hand, the heat production scenarios. 
They can be reused and adapted in other contexts if wished. The parameters used to feed into the energy models can be found in the `data/params` folder, the ones for the heat models in `data/heat`.


# Requirements

To run this code, you will need : 
* A setup of [Conda](https://www.anaconda.com/)
* A copy of [ecoinvent 3.6](https://www.ecoinvent.org/database/older-versions/ecoinvent-36/ecoinvent-36.html)

# Setup 

### Dependencies 

Create a new conda environment `energy2050` with all dependencies, by typing this command into a Conda console :
    
    > conda env create -f environment.yml

Alternatively, you may import the environement [via the user interface of Anaconda](https://docs.anaconda.com/anaconda/navigator/tutorials/manage-environments/) (for Windows)

### Ecoinvent 

Unzip Ecoinvent (ecospold 7z archive) within this project, into a folder named `ecoinvent3.6`. It should contain a sub folder `datasets`.

# Usage 

> ⚠️ The following commands should be executed at the root of this project.


The following commands require to use the conda environment created above.
Run this command once :

    > conda activate energy2050

First you should import ecoinvent and setup all parametric models & scenarios with :
    
    > python setup.py

Then, you can run the two independant Notebooks (command : `jupyter-notebook`)
* [electricity.ipynb](./electricity.ipynb)
* [heat.ipynb](./heat.ipynb)