Public
Edited
May 9, 2023
3 forks
3 stars
Insert cell
Insert cell
Plot.plot({
x: { label: "Daily low temperature (°F) →", nice: true },
y: { label: "↑ Daily temperature variation (Δ°F)", zero: true },
aspectRatio: 1,
color: {
type: "cyclical",
legend: true,
tickFormat: Plot.formatMonth()
},
marks: [
Plot.ruleY([0]),
Plot.dot(temps, {
fill: (d) => d.date.getUTCMonth(),
x: "temp_min",
y: delta
}),
Plot.dot(temps, Plot.selectMaxY({ x: "temp_min", y: delta, r: 5 })),
Plot.text(
temps,
Plot.selectMaxY({
x: "temp_min",
y: delta,
text: "date",
lineAnchor: "bottom",
dy: -10
})
)
]
})
Insert cell
delta = (d) => d.temp_max - d.temp_min
Insert cell
temps = FileAttachment("seattle-weather.csv").csv({ typed: true })
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