gap <- data.frame(
year = 2024:2035,
ssab_bf_gas = c(80,78,75,70,60,40, 0, 0, 0, 0, 0, 0),
ssab_eaf_waste = c( 0, 0, 0, 0, 0, 0,20,25,30,30,30,30),
new_industrial = c( 5, 6,10,12,15,18,22,28,32,35,38,40),
own_production = c(10,10,10,10,10,12,15,18,18,18,18,18),
gap_unconfirmed = c( 0, 0, 0, 3,10,25,38,24,15,12, 9, 7)
)
gap_long <- gap |>
pivot_longer(-year, names_to = "source", values_to = "pct") |>
mutate(source = factor(source,
levels = c("ssab_bf_gas","ssab_eaf_waste","new_industrial",
"own_production","gap_unconfirmed"),
labels = c("SSAB BF gas (phasing out)",
"SSAB EAF waste heat (est.)",
"New industrial sources",
"Own production (backup)",
"Gap — unconfirmed supply")
))
p_gap <- ggplot(gap_long,
aes(x = factor(year), y = pct, fill = source,
text = paste0(source, " (", year, "): ", pct, "%"))) +
geom_bar(stat = "identity", width = 0.75) +
geom_vline(xintercept = 6.5, linetype = "dashed",
color = "#A32D2D", linewidth = 0.9) +
annotate("text", x = 6.6, y = 95,
label = "SSAB EAF\nonline ~2030",
hjust = 0, size = 3, color = "#A32D2D") +
scale_fill_manual(values = c(
"SSAB BF gas (phasing out)" = "#A32D2D",
"SSAB EAF waste heat (est.)" = "#BA7517",
"New industrial sources" = "#1D9E75",
"Own production (backup)" = "#185FA5",
"Gap — unconfirmed supply" = "#B4B2A9"
)) +
labs(x = "Year", y = "Share of total heat demand (%)", fill = NULL) +
theme_minimal(base_size = 13) +
theme(legend.position = "bottom",
panel.grid.major.x = element_blank(),
axis.text.x = element_text(angle = 30, hjust = 1))
ggplotly(p_gap, tooltip = "text") |>
layout(legend = list(orientation = "h", y = -0.25))