Published
Edited
Apr 8, 2021
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
points = prepare(data.map(v => Item(v.id, ...project(v), v.n, v)), items =>
Math.max(
items.reduce((acc, i) => acc + (i.n ?? 1), 0) / (original ? 1 : 5e4),
1
)
)
Insert cell
Insert cell
flat = prepare(data.map(v => Item(v.id, ...project(v), v.n, v)), () => 1)
Insert cell
Insert cell
data = d3
.tsv(
"https://media.githubusercontent.com/media/Caster/growing-glyphs/master/input/csv/trove-grouped.tsv",
(p, id) => ({
...p,
id,
lat: parseFloat(p.latitude),
lng: parseFloat(p.longitude),
n: parseInt(p.n)
})
)
.then(d => d.filter(p => !(isNaN(p.lat) || isNaN(p.lng))))
Insert cell
Insert cell
import { preview } with { points, scale } from "@stardisblue/view-points"
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