Published
Edited
Apr 8, 2021
Importers
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.localisation),1, v)), (items) => d3.sum(items, (i) => i.n ?? 1)/divider)
Insert cell
Insert cell
flat = prepare(data.map(v => Item(v.id, ...project(v.localisation),1, v)), (items) =>1)
Insert cell
data = FileAttachment("datold.json").json()
Insert cell
Insert cell
import { preview } with { points, scale } from "@stardisblue/view-points"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// prepare(datold.map(v => item(v.id, ...project(v.localisation), v)))
Insert cell
// datold = Object.entries(events.index)
// .flatMap(([, values]) =>
// values.map(({ id, localisation }) => ({ id, localisation }))
// )
// .filter(v => v.localisation !== null)
// .map(v => ({ ...v, localisation: localize(locs.index[v.localisation]) }))
// .filter(
// v =>
// v.localisation !== null &&
// v.localisation.lat !== null &&
// v.localisation.lng !== null
// )
Insert cell
// localize = l => {
// if (l.localisation === null) {
// return null;
// }
// if (l.localisation !== undefined) {
// return locs.index[l.localisation];
// }
// return l;
// }
Insert cell
// locs = FileAttachment("index-localisations@1.json").json()
Insert cell
// events = FileAttachment("index-events@1.json").json()
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