Public
Edited
Dec 13, 2023
Insert cell
Insert cell
Insert cell
data = d3.csvParse(await FileAttachment("2022 GitHub trending history JavaScript _ TypeScript - Topics.csv").text(), ({name, percentage, ...rest}) => ({name: name, title: name, group: name, value: percentage}))
Insert cell
pack = data => d3.pack()
.size([width - 2, height - 2])
.padding(3)
(d3.hierarchy({children: data})
.sum(d => d.value))
Insert cell
width = 932
Insert cell
height = width
Insert cell
format = d3.format(",d")
Insert cell
color = d3.scaleOrdinal(data.map(d => d.group), d3.schemeCategory10)
Insert cell
d3 = require("d3@6")
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