Published
Edited
May 15, 2020
Insert cell
Insert cell
Insert cell
function recursiveUnmap(d) {
return d.length
? [d[0], Array.from(d[1], recursiveUnmap)]
: d;
}
Insert cell
elegantlyUnmapped = Array.from(mapped, recursiveUnmap)
Insert cell
inelegantlyUnmapped = Array.from(mapped, d => [d[0], Array.from(d[1], e => [e[0], Array.from(e[1])])])
Insert cell
mapped = d3.group(data, d => d.Origin, d => d.Name.split(' ')[0], d => d.Year)
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