{
const svg = d3.create("svg").attr("width", width).attr("height", height);
svg
.append("rect")
.attr("width", width)
.attr("height", height)
.attr("fill", "#555b6e");
const g = svg
.append("g")
.attr("transform", "rotate(-90," + width / 2 + "," + height / 2 + ")");
const path = d3.geoPath().projection(projection);
g.selectAll("path")
.data(world.features)
.enter()
.append("path")
.attr("d", path)
.attr("stroke", "#bee3db")
.attr("stroke-width", 1)
.attr("fill", "#89b0ae");
g.selectAll(".arcs")
.data(countryData)
.enter()
.append("path")
.attr("d", (d) => path(d.trail))
.attr("fill", "none")
.attr("stroke-width", 3)
.attr("stroke", (d) => d3.interpolateMagma(popScale(d.pop_est)))
.style("stroke-dasharray", "2 20")
.style(
"animation",
(d) => "dash " + durationScale(d.pop_est) + "s linear infinite"
);
return svg.node();
}