Published unlisted
Edited
Feb 3, 2022
Insert cell
Insert cell
data = await FileAttachment("untitled.csv").csv({typed: true})
Insert cell
Insert cell
Plot.plot({
x: {
domain: [0, 24]
},
marks: [
Plot.rectY(
data,
Plot.binX(
{ y: "count" },
{
x: (d) => d.timestamp.getHours(),
thresholds: d3.range(1, 24)
}
)
)
]
})
Insert cell
Insert cell
Plot.plot({
x: {
domain: [0, 24]
},
marks: [
Plot.rectY(
data,
Plot.binX(
{ y: "count" },
{
x: (d) => d.timestamp.getHours(),
domain: [0, 24],
thresholds: 24
}
)
)
]
})
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