Published
Edited
Sep 18, 2021
6 forks
11 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
w = Math.min(640, width)
Insert cell
r = w / 2 - 2
Insert cell
image = {
const context = DOM.context2d(r * 4, w);
const projection = d3.geoEquirectangular().scale(r * 2 / Math.PI).translate([r * 2, w / 2]);
const path = d3.geoPath(projection, context);
context.beginPath(), path(land), context.fill();
return {canvas: context.canvas};
}
Insert cell
land = topojson.feature(world, world.objects.land)
Insert cell
world = fetch("https://cdn.jsdelivr.net/npm/world-atlas@2/land-110m.json").then(response => response.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