An in-depth study into the methodological aspects of grid emission factor calculations. This code is the computational engine under the hood of the study Towards Standardized Grid Emission Factors: Methodological Insights and Best Practices. Find a release version of the code here and of the data here.
If you want to run the notebook without installation, check out Jupyter. Otherwise, you will need to install Python 3.
All the required packages are listed in 5_env/environment.yml.
If you want to reproduce the results, just execute the cells in the notebook one after the other. I did not upload any intermediate results, as the files are too large. Also, I could not upload ENTSO-E data, as the data is not licensed in a way that allows sharing via Github (I placed dummy files instead). You can get ENTSO-E data from the ENTSO-E Transparency Portal.
- Download missing ENTSO-E data (AGPT and PF) into 1_data/1_raw/ENTSOE (see 'Steps').
- Run the notebook in 3_notebooks.
- Play around with it, change, add, have fun.
As time advances, advanced usage will be documented here.
The following refers to the file main.ipynb:
- The first part is mostly about wrangling with the input data, including mapping categories onto one another.
- The second part is mostly about calculating the various configurations of grid emission factors.
- The third part is mostly about creating plots from the data.
All the code you see here was written by me, Malte Schäfer. Generative AI has contributed in the code generation, including debugging.
1.0.0 is the release corresponding to the published research article.
This project is licensed under the MIT License - see LICENSE.md file for details.
You can contact me here via Github.
The research and code writing was funded by the Federal Ministry for Economic Affairs and Climate Action (BMWK) as part of the research project ’flexess’ under Grant No. 03EI4005A.
