Published
Edited
May 13, 2021
3 forks
3 stars
Insert cell
Insert cell
Plot.line(data, {
x: "x",
y: "y",
fill: "i",
stroke: "white",
strokeWidth: 5
}).plot({
width,
height,
x: { axis: null },
y: { axis: null }
})
Insert cell
data = [...voronoi.cellPolygons()].flatMap((cell) =>
cell.map(([x, y]) => ({ x, y, i: cell.index }))
)
Insert cell
voronoi = d3.Delaunay.from(
points.map(([x, y], i) => [
x + 4.5 * Math.sin(t + i * i),
y + 3.0 * Math.cos(t + i * i)
])
).voronoi([0, 0, width, height])
Insert cell
Insert cell
Insert cell
t = now * 0.005
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