Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 fix key_error in validation plots #878

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Release Notes
Upcoming Release
================

* Bugfix: Correct technology keys for the electricity production plotting to work out the box.

* New configuration option ``everywhere_powerplants`` to build conventional powerplants everywhere, irrespective of existing powerplants locations, in the network (https://github.com/PyPSA/pypsa-eur/pull/850).

* Remove option for wave energy as technology data is not maintained.
Expand Down
6 changes: 6 additions & 0 deletions scripts/plot_validation_electricity_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
header=[0, 1],
parse_dates=True,
)
subset_technologies = ["Geothermal", "Nuclear", "Biomass", "Lignite", "Oil", "Coal"]
lowercase_technologies = [
technology.lower() if technology in subset_technologies else technology
for technology in historic.columns.levels[1]
]
historic.columns = historic.columns.set_levels(lowercase_technologies, level=1)

colors = n.carriers.set_index("nice_name").color.where(
lambda s: s != "", "lightgrey"
Expand Down