max = {
return group(data.filter((d) => +d.year < 2023))
.by((d) => d.day)
.orderBy((d) => d.key)
.run()
.map((grouped) => {
const temps = grouped.values.map((d) => d.temp);
const max = Math.max(...temps);
const min = Math.min(...temps);
return Object.assign({ min, max }, grouped);
});
}