Public
Edited
Nov 4, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
tree = treemap(hierarchicalData)
Insert cell
treemap = d3
.treemap()
.tile(d3.treemapBinary)
.size([width * devicePixelRatio, height * devicePixelRatio])
.padding(devicePixelRatio)
.round(true)
Insert cell
hierarchicalData = d3
.hierarchy(data)
.sum((d) => d.value)
.sort((a, b) => b.value - a.value)
Insert cell
hierarchicalData2 = d3
.hierarchy(data)
.sum((d) => d.value)
.sort((a, b) => b.value - a.value)
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