Public
Edited
Dec 2, 2022
1 fork
1 star
Insert cell
Insert cell
Plot.plot({
marks: [Plot.barX(elves, { x: (d) => d3.sum(d), fill: (d, i) => i, stroke: "white" })],
width
})
Insert cell
Plot.plot({
marks: [Plot.dot(elves, { x: (d, i) => i, y: (d) => d3.sum(d) })],
marginLeft: 50
})
Insert cell
Insert cell
Insert cell
Insert cell
part2 = d3.sum(elves.map(d => d3.sum(d)).sort(d3.descending).slice(0, 3))
Insert cell
part1 = elves.map(d => d3.sum(d)).sort(d3.descending)[0]
Insert cell
elves = data.trim().split("\n\n").map(p => p.split("\n").map(Number))
Insert cell
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