Published
Edited
Apr 24, 2021
1 star
Insert cell
Insert cell
Insert cell
data1 = FileAttachment("s390x.json").json()
Insert cell
stratify = d3.stratify()
.id(d => d["name"])
.parentId(d => d["parent"])
Insert cell
data = stratify(data1)
Insert cell
tree = data => {
const root = d3.hierarchy(data);
root.dx = 10;
root.dy = width / (root.height + 1);
return d3.tree().nodeSize([root.dx, root.dy])(root);
}
Insert cell
width = 954
Insert cell
d3 = require("d3@5")
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