-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add plotting script for FE KPIs #37
base: form_energy_storage_dev
Are you sure you want to change the base?
Conversation
…PIs. All focused on DE
…nergy-transition/pypsa-eur into Form-feature/kpi-cost-curtailment
…urate electricity demand (from other sector).
…table in cost_max and cost_threshold
…nergy-transition/pypsa-eur into Form-feature/kpi-cost-curtailment
…t' into Form-feature/kpi-cost-curtailment
…ost-curtailment Form KPI visualization script and functions
…of figures based on the configuration for KPIs.
Currently I have a problem in creating a snakemake output so that the output can expand based on the KPI list. The exception is "Not all output, log and benchmark files of rule plot_KPIs contain the same wildcards. This is crucial though, in order to avoid that two or more jobs write to the same file." This is referring to def create_kpi_path(w):
return {
kpi_fn: RESULTS
+ "maps/base_s_{clusters}_l{ll}_{opts}_{sector_opts}-"
+ kpi_fn
+ "_{planning_horizons}.pdf"
for kpi_fn in list(config_provider("kpi").keys())
}
rule plot_KPIs:
params:
plotting=config_provider("plotting"),
kpi=config_provider("plotting"),
input:
network=RESULTS
+ "postnetworks/base_s_{clusters}_l{ll}_{opts}_{sector_opts}_{planning_horizons}.nc",
regions=resources("regions_onshore_base_s_{clusters}.geojson"),
nodal_costs=RESULTS + "csvs/nodal_costs.csv",
nodal_capacity=RESULTS + "csvs/nodal_capacities.csv",
output:
unpack(create_kpi_path),
... |
@daniel-rdt there is a simple workaround: The plots is created without going through the snakefile. I can extract the path from the still functioning |
Hm, for the workflow to function that could be a valid plan B in my opinion. Let's have a quick chat about the snakemake issue and try to solve it. |
…add rule that can be called to only plot KPIs in collect.smk
…e run, add 10% margin to all bar plots
scripts/plot_KPIs.py
Outdated
for i in range(len(df.columns)): | ||
if i == 0: | ||
continue | ||
df.iloc[:,i] = df.iloc[:,i] + df.iloc[:,i-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: This needs to be recalculated because it disregards the impact of the time resolution. Also don't forget to change the unit to GWh
…ch plots and some syntax
Closes #34
New Features
The time series and the bar are created based on the config file, for example
automaticly creates this plot and save the file based on the name
country_system_cost
. The documentation is under construction.Other example:
Checklist
config/config.default.yaml
.doc/configtables/*.csv
.doc/data_sources.rst
.doc/release_notes.rst
is added.