{
const context = DOM.context2d(width, height),
path = d3.geoPath(projection, context);
context.beginPath();
path({ type: "Sphere" });
context.lineWidth = 3;
context.stroke();
context.clip();
context.lineWidth = .25;
for (const c of voronoi.polygons().features) {
context.strokeStyle = context.fillStyle = color(c.properties.site.id);
context.beginPath();
path(c);
context.fill();
context.stroke();
}
for (const c of geo.features) {
context.beginPath();
path(c);
context.fillStyle = d3
.lab(color(c.properties.sovereignt || c.id))
.darker(2);
context.fill();
}
context.beginPath();
path(geo);
path({ type: "Sphere" });
context.strokeStyle = "black";
context.stroke();
return context.canvas;
}