buildvis = {
const width = 960
const height = 600
const svg = d3.select(DOM.svg(width, height))
let path = d3.geoPath()
svg.append("g")
.attr("class", "counties")
.selectAll("path")
.data(topojson.feature(us, us.objects.counties).features)
.enter().append("path")
.attr("fill", d => colorScale(rateById.get(d.id)))
.attr("d", path)
.on("mouseover", function(d){
d3.select(this)
.style("cursor", "pointer")
.attr("stroke-width", 3)
.attr("stroke","#FFF5B1");
const rect = this.getBoundingClientRect();
showTooltip(d.id, rect.x, rect.y);
})
.on("mouseout", function(d){
d3.select(this)
.style("cursor", "default")
.attr("stroke-width", 0)
.attr("stroke","none");
hideTooltip();
})
svg.append("path")
.datum(topojson.mesh(us, us.objects.states, function(a, b) { return a !== b; }))
.attr("class", "states")
.attr("d", path)
return svg.node()
}