Public
Edited
Jan 23, 2023
Importers
Comments locked
Insert cell
Insert cell
{
const domain = d3
.groupSort(
data,
(g) => {
const h1 = d3.median(g.slice(0, 7), (d) => d.change);
const h2 = d3.median(g.slice(7), (d) => d.change);
return h1 - h2;
},
(d) => d.label
)
.slice(0, 30);
return chart(data, domain);
}
Insert cell
Insert cell
{
const domain = d3
.groupSort(
data,
(g) => g.at(-1).change,
(d) => d.label
)
.slice(0, 20);
return chart(data, domain);
}
Insert cell
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