Published
Edited
Mar 30, 2022
Insert cell
Insert cell
Insert cell
pack = data => d3.pack()
.size([width, height])
.padding(d => d.height === 1 ? 1:1)
(d3.hierarchy(data)
.sum(d => d.value)
//.sort((a, b) => b.value - a.value)
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
width = 1024
Insert cell
height = width
Insert cell
Insert cell
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