Public
Edited
Apr 13, 2023
5 stars
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.frame(),
Plot.dot(olympians, {x: "height", y: "weight"})
]
})
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.frame(),
Plot.dot(olympians, {x: "height", y: "weight", fy: "sex"})
]
})
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.frame(),
Plot.dot(olympians, {x: "height", y: "weight", fy: "nationality"})
]
})
Insert cell
Insert cell
htl.html`<div style="display: flex; flex-wrap: wrap; gap: 1em; max-height: 700px; overflow: scroll;">
${d3.groups(olympians, (d) => d.nationality)
.sort((a, b) => d3.descending(a[1].length, b[1].length))
.map(([caption, data]) =>
htl.html`<figure>
${Plot.plot({
width: 260,
height: 200,
marks: [Plot.frame(), Plot.dot(data, { x: "height", y: "weight" })]
})}
<figcaption style="text-align: center;">${caption}</figcaption>
</figure>`
)}
</div>`
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