Skip to content

robeertm/co2-strommix-gui

Repository files navigation

CO2 Mix Germany – SMARD + ENTSO-E (Tkinter)

A small desktop app (Tkinter) that calculates CO₂ intensity for Germany based on public electricity data.

It can calculate:

  • Generation intensity (production mix in Germany)
  • Consumption intensity (approx.) based on total load and a robust net import approximation

Data sources

SMARD (Bundesnetzagentur) – default

  • Uses SMARD time series (via the chart_data API endpoints).
  • Works without any API keys.

ENTSO-E Transparency Platform – optional

  • If you provide an ENTSO-E security token, the app can fetch:
    • Total Load (documentType=A65, realised)
    • Actual Generation per Type (documentType=A75, realised)

This is useful if you want to compare SMARD vs. ENTSO-E input data.
Note: The consumption calculation still uses a robust approximation for imports/exports because exact consumption-based accounting needs explicit border flow series.

Why this can differ from Electricity Maps

Electricity Maps often shows flow-traced, consumption-based carbon intensity and may use 15‑minute resolution plus its own data sources and methodology.
This app computes:

  • production-based intensity from the German mix (SMARD/ENTSO-E), and
  • consumption intensity via imports ≈ max(load − generation, 0) with a configurable import intensity.

Getting an ENTSO-E security token

  1. Create an account on the ENTSO‑E Transparency Platform.
  2. Request / generate a security token for API access.
  3. Paste the token into the app (field: ENTSO‑E token) and click Test token.

Run (macOS / Linux)

./start.command   # macOS Finder-friendly
# or
./start.sh

Run (Windows)

start.bat

Config

  • config.default.json is the template.
  • config.json is created automatically on first run (you can also click Save config).

Main settings:

  • data_source: smard or entsoe
  • entsoe_security_token: your token (only required for entsoe)
  • entsoe_area_eic: default is DE-LU (10Y1001A1001A83F)
  • import_intensity_g_per_kwh: import intensity used when load > generation

License

MIT

Emission factor presets (why "direct" can be higher)

This app offers two emission-factor modes:

  • Lifecycle (CO2e): "cradle-to-grave" values including infrastructure and supply chain.
  • Direct (operational): emissions released directly at the plant during operation.

The shipped defaults are based on IPCC AR5 WGIII Annex III (Table A.III.2) median values where available. For categories that do not map 1:1 to SMARD, the defaults are pragmatic placeholders.

Important: Direct does not have to be lower than lifecycle if the two presets are not aligned. In v1.3.1 we aligned the defaults so that for fossil technologies lifecycle ≥ direct (typical expectation).

About

co2-strommix-gui

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors