Published
Edited
Aug 6, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = FileAttachment("ray_gender_actor_05_26_20_mod@1.json").json()
Insert cell
circle = d3.arc()
.innerRadius(0)
.outerRadius(d => d)
.startAngle(-Math.PI)
.endAngle(Math.PI)
Insert cell
pack = data => d3.pack()
.size([width, height])
.padding(d => d.height === 1 ? 3 : 20)
(d3.hierarchy(data)
.sum(d => d.value)
.sort((a, b) => b.value - a.value))
Insert cell
function autoBox() {
document.body.appendChild(this);
const {x, y, width, height} = this.getBBox();
document.body.removeChild(this);
return [x, y, width, height];
}
Insert cell
width = 1100
Insert cell
height = width
Insert cell
d3 = require("d3@5")
Insert cell
format = d3.format(",d")
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