Published
Edited
May 24, 2020
1 star
Insert cell
Insert cell
Insert cell
swatches({
color: d3.scaleOrdinal(locations2, colors)
})
Insert cell
Insert cell
function entity(character) {
return `&#${character.charCodeAt(0).toString()};`;
}
Insert cell
Insert cell
diagonal = d3.linkHorizontal().x(d => d.y).y(d => d.x)
Insert cell
tree = nod2 => {
const root = nod2;
root.dx = dx;
root.dy = dy - (root.depth * 5);
let t = d3.tree().nodeSize([root.dx, root.dy])(root)
return t;
}
Insert cell
tree2 = FileAttachment("harvard - Sheet1 (3).csv").text()
Insert cell
ns = d3.csvParse(tree2)
Insert cell
Insert cell
Insert cell
nod = d3.nest()
.key(function(d) { return d.parent; })
.entries(ns);
Insert cell
Insert cell
Insert cell
dx = 15
Insert cell
dy = width / 4
Insert cell
margin = ({top: 10, right: 80, bottom: 10, left: 130})
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