Published
Edited
Jul 6, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dataSet = d3.tsvParse(rawData.replace(/,/g, ""), d3.autoType)
Insert cell
Insert cell
numberByIndustryClass = d3.rollup(
dataSet,
v => d3.sum(v, d => d.value),
d => d.class
)
Insert cell
Insert cell
pie = d3
.pie()
.sort((a, b) => b[1] - a[1])
.value((d) => d[1])
Insert cell
Insert cell
arcs = pie(numberByIndustryClass)
Insert cell
Insert cell
Insert cell
arc = d3
.arc()
.padAngle(0.02)
.innerRadius((height - margin.top - margin.bottom) / 4)
.outerRadius((height - margin.top - margin.bottom) / 2)
.cornerRadius(3)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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