Public
Edited
Mar 8, 2023
Insert cell
Insert cell
chart = Pack(data_grouped2, {
value: d => d.size,
fill: d => color_scale(d.white_male),
width: 1000,
height: 1000,
})
Insert cell
color_scale("y")
Insert cell
size_scale = d3.scaleOrdinal()
.domain([1, 2, 3, 4])
.range([])
Insert cell
color_scale = d3.scaleOrdinal()
.domain(["y", "n"])
.range(['#a9a9a9', '#ff4e1f'])
Insert cell
Insert cell
data_grouped = d3.group(marvelDirectorDiversitySheet21, d => d.phase)
Insert cell
data_grouped2 = d3.group(marvelDirectorDiversitySheet22, d => d.group)
Insert cell
Marvel Director Diversity - Sheet2 (3).csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
data_rollup = d3.rollup(marvelDirectorDiversitySheet1, v => v.length, d => d.director)
Insert cell
Insert cell
Marvel Director Diversity - Sheet2@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Marvel Director Diversity - Sheet2 (1).csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
import {Pack} from "@d3/pack"
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