map = {
const svg = d3.select(DOM.svg(width, height))
.attr("pointer-events", "none");
svg.append("style").text(`
.features path { fill: #ddd; pointer-events: all; }
.features path:hover { fill: #f00; }
`);
svg.append("path")
.attr("fill", "none")
.attr("stroke", "#ccc")
.attr("d", path(graticule));
svg.append("g")
.attr("class", "features")
.selectAll("path")
.data(features)
.join("path")
.attr("d", path)
.append("title")
.text(d => d.properties.name);
svg.append("path")
.attr("fill", "none")
.attr("stroke", "#fff")
.attr("d", path(borders));
svg.append("path")
.attr("fill", "none")
.attr("stroke", "#000")
.attr("stroke-linejoin", "round")
.attr("d", path({
type: "MultiLineString",
coordinates: d3.merge(neighbors.map((n, i) => n.map(j => [centroids[j], centroids[i]])))
}));
svg.append("path")
.attr("d", path({
type: "MultiPoint",
coordinates: centroids
}));
svg.append("path")
.attr("fill", "none")
.attr("stroke", "black")
.attr("stroke-width", 1.5)
.attr("d", path(sphere));
return svg.node();
}