Published
Edited
Feb 4, 2022
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof topN = Inputs.range([1, 50], {label: "Top n?", value: 10, step: 1})
Insert cell
Plot.plot({
marginLeft: 90,
color: {scheme: hot ? "reds" : "purples"},
marks: [
Plot.barX(extremeTage, {
y: "Datum",
fill: hot ? "Temperatur Max" : "Temperatur Min",
x: hot ? "Temperatur Max" : "Temperatur Min",
sort: {y: "x", reverse: hot, limit: topN}
})
]
})
Insert cell
extremeTage = T.tidy(
dc,
T.arrange(hot ? "Temperatur Max" : "Temperatur Min"),
hot ? T.sliceTail(100) : T.sliceHead(100)
)
Insert cell
dc = T.tidy(
dailyCombined,
T.filter(x => x.Datum !== "2022/02/03")
)
Insert cell
dailyCombined
Insert cell
monatsDaten = T.tidy(
dailyCombined,
T.filter(
x => x.Zeit.getFullYear() === jahr && x.Zeit.getMonth() === 11
)
)
Insert cell
viewof jahr = Inputs.range([2000, 2021], {label: "Jahr", value: 2021, step: 1})
Insert cell
chart = {
const w = 1024, h = 650;
const svg = d3.create("svg")
.attr("cursor", "default")
.attr("viewBox", [0, 0, w, h]);
new WeatherChart(svg)
.size(w, h)
.icon(weatherIcons)
.column({
low: "Temperatur Min",
high: "Temperatur Max",
date: "Datum",
condition: "Kategorie"
})
.unit("°C")
//.sort(+options.sort)
.render(monatsDaten);
return svg.node();
}
Insert cell
monat = T.tidy(
dailyCombined,
T.filter(
x => x.Zeit.getFullYear()>1945 && x.Zeit.getMonth() === mon
),
T.mutate({jahr: x=>x.Zeit.getFullYear()}),
T.groupBy("jahr", [T.summarize({jahr: T.first("jahr"), sonne: x=>(T.sum("Sonnenscheindauer")(x)/60)})]),
//T.mutate({sonne: x=>x.sonne/60
)
Insert cell
viewof mon = Inputs.range([0, 11], {label: "Monat-1", step: 1, value: 0})
Insert cell
Insert cell
Plot.plot({
x: {tickRotation: 45},
y: {domain: [0,320]},
marks: [
Plot.barY(monat, {x: "jahr", y: "sonne"}),
Plot.text(monat, {x: "jahr", y: "sonne", text: x=>"🌞", fontSize: 20})
]
})
Insert cell
import {WeatherChart, weatherIcons} from "@analyzer2004/sunny-day-rainy-day-in-seattle"
Insert cell
import { T } from "@pbeshai/tidyjs"
Insert cell
import { dailyCombined } from "@iimog/wetter-daten-aufbereitung"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more