Plotting and Summaries#

Rule make_summary#

Create summary CSV files for all scenario runs including costs, capacities, capacity factors, curtailment, energy balances, prices and other metrics.

Rule make_global_summary#

Create summary CSV files for all scenario runs including costs, capacities, capacity factors, curtailment, energy balances, prices and other metrics.

Rule make_cumulative_costs#

Calculate cumulative costs for myopic foresight scenarios.

Rule plot_summary#

Creates plots from summary CSV files.

Rule plot_base_network#

Plot base transmission network.

Rule plot_power_network_clustered#

Plot clustered electricity transmission network.

Rule plot_power_network#

Creates plots for optimised power network topologies and regional generation, storage and conversion capacities built.

Rule plot_power_network_perfect#

Creates plots for optimised power network topologies and regional generation, storage and conversion capacities built for the perfect foresight scenario.

Rule plot_hydrogen_network#

Creates map of optimised hydrogen network, storage and selected other infrastructure.

Rule plot_gas_network#

Creates map of optimised gas network, storage and selected other infrastructure.

Rule plot_balance_map#

Create energy balance maps for the defined carriers.

Rule plot_heat_source_map#

Create interactive maps for heat source temperature and energy data.

This script generates interactive Folium maps displaying heat source temperature and energy potential data across European regions. It visualizes spatial distributions of renewable heat sources like river water, sea water, and ambient air temperatures, along with their energy potentials for district heating applications.

The script creates two types of maps: - Temperature maps showing spatial temperature distributions (°C) - Energy maps showing total energy potential (TWh) where available

Maps include regional boundaries with aggregated values and detailed point data with interactive tooltips. Temperature data is averaged by region while energy data is summed by region to show total potential.

Relevant Settings#

plotting:
    heat_source_map:
        temperature_cmap: "Reds"  # Colormap for temperature data
        energy_cmap: "Oranges"    # Colormap for energy data

Inputs#

  • resources/<run_name>/regions_onshore_base_s_{clusters}.geojson: Regional boundaries

  • resources/<run_name>/temp_{carrier}_base_s_{clusters}_temporal_aggregate.nc: Temperature data

  • resources/<run_name>/heat_source_energy_{carrier}_base_s_{clusters}_temporal_aggregate.nc: Energy data (optional)

Outputs#

  • results/<run_name>/plots/heat_source_map_{carrier}_temperature.html: Interactive temperature map

  • results/<run_name>/plots/heat_source_map_{carrier}_energy.html: Interactive energy potential map

Notes

Uses Folium for interactive web-based mapping. Temperature values in °C, energy values converted from MWh to TWh for display. Handles missing energy data by creating empty placeholder maps.

Rule plot_balance_timeseries#

Plot balance time series.

Rule plot_heatmap_timeseries#

Plot heatmap time series of marginal prices, utilisation rates, state of charge profiles.

Rule plot_base_statistics#

Rule build_ambient_air_temperature_yearly_average#

Build yearly average ambient air temperature raster data.

This script processes the ambient air temperature from the cutout data and calculates the yearly average for each grid cell. It only keeps temperatures within onshore regions and stores them as a unary region with coordinates longitude, latitude, and name.

Rule plot_cop_profiles#

Rule plot_interactive_bus_balance#

Create interactive bus energy balance time series plots.

This script generates interactive HTML plots showing energy balance time series for buses in the final network. It calculates and visualizes the contribution of different carriers (generation, storage, loads, links) to the energy balance at specified buses, creating stacked area charts with positive/negative values.

The plots show generation as positive values and consumption as negative values to provide an energy balance at each bus over time. The scripts does not use n.statistics.energy_balance but calculates the balance directly from the time series data of generators, storage units, loads, and links connected to each bus.

Relevant Settings#

plotting:
    tech_colors: # Color mapping for different technologies/carriers
    balance_timeseries:
        bus_name_pattern: # Pattern to filter buses (e.g., 'DE*' for German buses)

Inputs#

  • resources/<run_name>/networks/base_s_{clusters}_{opts}_{sector_opts}_{planning_horizons}.nc: Solved PyPSA network

  • config/plotting/rc.mplstyle: Matplotlib style configuration

Outputs#

  • results/<run_name>/plots/balance_timeseries/: Directory containing HTML files with interactive plots - ts-balance-{bus_name}-native-{time}.html: Interactive time series plot for each bus

Notes

Uses Plotly for interactive visualization. Supports filtering buses by pattern (shell-style wildcards). Processes multiple buses in parallel for efficiency.