anomaly_reduced = Plot.plot({
width: chart_width,
height: height,
marginTop: 70,
marginLeft: 0,
marginRight: 0,
marginBottom: 40,
y: {
axis: null
},
x: {
axis: null
},
marks: [
Plot.barY(global_monthly_filtered, {
y: "Anomalie",
x: "Jahr",
strokeWidth: 0,
fill: (d) =>
(d.Jahr == 2025) | (d.Jahr == start) ? "#e84f1c" : grey_color,
fillOpacity: (d) => (d.Jahr == start ? 0.2 : 1)
}),
Plot.text(anomaly_text, {
x: (d) => d.year,
y: "max_anomaly",
text: (d) => d.month + " " + d.year,
textAnchor: "end",
fill: "#e84f1c",
fontSize: 12,
fontFamily: "InterRegular",
dy: -60,
dx: 0
}),
Plot.text(anomaly_text, {
x: "year",
y: "max_anomaly",
text: (d) =>
"+" +
d.text.toLocaleString("de", {
minimumFractionDigits: "2",
maximumFractionDigits: "2"
}) +
"°C",
textAnchor: "end",
fill: "#e84f1c",
fontSize: 22,
fontWeight: 600,
fontFamily: "DIN Next LT Pro",
dy: -40,
dx: 0
}),
Plot.text(anomaly_text, {
x: "year",
y: "max_anomaly",
text: (d) => `globale Durchschnittstemperatur\nAbweichung von 1991-2000`,
textAnchor: "end",
fontFamily: "InterRegular",
dy: -15,
dx: 0
}),
Plot.text(anomaly_text_2, {
x: "year",
y: "min_anomaly",
text: (d) =>
d.text.toLocaleString("de", {
minimumFractionDigits: "1",
maximumFractionDigits: "1"
}) +
"°C im " +
d.month +
" " +
d.year,
textAnchor: "start",
fill: "#e84f1c",
fillOpacity: 0.8,
fontSize: 12,
fontWeight: 600,
fontFamily: "InterRegular",
dy: 10,
dx: 0
}),
Plot.text(anomaly_text, {
x: "year",
y: "min_anomaly",
text: (d) => `Quelle: Copernicus Climate Change Service`,
textAnchor: "end",
fill: "#99AFC2",
fontFamily: "InterRegular",
dy: 30,
dx: 0
})
]
})