map = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, 975, 610])
.attr("stroke-linejoin", "round");
svg.append("g")
.attr("fill", "#ccc")
.selectAll("path")
.data(features.features)
.join("path")
.attr("fill", d => color(distances.get(d.id)))
.attr("d", path)
.append("title")
.text(d => `${d.properties.name}, ${states.get(d.id.slice(0, 2)).name}
${d.id}
${distances.get(d.id)} hop${distances.get(d.id) === 1 ? "" : "s"}`);
svg.append("path")
.attr("fill", "none")
.attr("stroke", "black")
.attr("stroke-opacity", 0.5)
.attr("stroke-width", 0.5)
.attr("d", path(topojson.mesh(us, us.objects.counties, (a, b) => a !== b)));
svg.append("path")
.attr("fill", "none")
.attr("stroke", "black")
.attr("d", path(topojson.mesh(us, us.objects.states, (a, b) => a !== b)));
return svg.node();
}