Published
Edited
Feb 9, 2021
Fork of Hierarchies
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
grouped = d3.group(csv, d => d.Genre)
Insert cell
hierarchy = d3.hierarchy(grouped)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
formatted_data = ({ name: "video_games", children: nest(nested_map) })
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { chart as tree_diagram } with {
formatted_data as data
} from '@d3/tidy-tree'
Insert cell
tree_diagram
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
arc = d3
.arc()
.startAngle(d => d.x0)
.endAngle(d => d.x1)
.padAngle(d => Math.min((d.x1 - d.x0) / 2, 0.005))
.padRadius(radius / 2)
.innerRadius(d => d.y0)
.outerRadius(d => d.y1 - 1)
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