Published
Edited
Jul 30, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
pairs = d3.pairs(al_mapping.steps)
Insert cell
Insert cell
pc_mapping = ({
"steps":["Class", "Survival", "Age group"],
"color":"Class"
})
Insert cell
pc_mapped = al_data.map(d=> {
const element = {}
pc_mapping.steps.forEach(step => {element[step] = d[step]})
return {color:d[pc_mapping.color], dimensions:element}
})
Insert cell
Insert cell
d3 = require("d3@5", "d3-array@^2.5")
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