{
const svg = d3
.create("svg")
.attr("viewBox", [0, 0, width, height])
.style("background", "beige");
const projection = d3
.geoMercator()
.translate([width / 2, height / 1.71])
.scale(width / 6.356)
.rotate([-100, 0])
.clipExtent([
[4, 4],
[width - 4, height - 4]
]);
const path = d3.geoPath(projection);
svg
.append("g")
.selectAll("path")
.data(world.features)
.join("path")
.attr("d", path)
.style("fill", (d) =>
["USSR", "Far Eastern SSR", "Mongolia"].includes(d.properties.NAME)
? "#CD543C"
: "white"
)
.style("fill-opacity", 0.75)
.style("stroke", "black")
.style("stroke-width", 1.3)
.append("title")
.text((d) => d.properties.NAME);
svg
.append("g")
.append("path")
.datum({ type: "Sphere" })
.attr("d", path)
.attr("stroke", "black")
.attr("stroke-width", 8)
.attr("fill", "none");
svg
.append("g")
.append("path")
.datum({ type: "Sphere" })
.attr("d", path)
.attr("stroke", "white")
.attr("stroke-width", 3)
.attr("fill", "none");
return svg.node();
}