chart = {
const svg = d3.create("svg")
.attr("viewBox", [10, 10, width, height]);
svg.append(legend)
.attr("transform", "translate(690,90)");
svg.append("g")
.selectAll("path")
.data(topojson.feature(tracts, tracts.objects.ia_covid19_county).features)
.join("path")
.attr("fill", d => color(data.get(d.properties.FIPS)))
.attr("d", path)
.append("title")
.text(d => `${d.properties.FIPS}, ${format(data.get(d.properties.FIPS))}`)
.attr("fill", d => color(data.get(d.properties.NAME)))
.attr("d", path)
.append("title")
.text(d => " Yield: " + data.get(d.properties.NAME));
svg.selectAll(".subunit-label")
.data(ctracts.features)
.enter().append("text")
.attr("class", function(d) { return "subunit-label " + d.NAME; })
.attr("transform", function(d) { return "translate(" + path.centroid(d) + ")"; })
.attr("fill", function(d){
var value = data.get(d.properties.NAME);
})
.attr("fill-opacity", "1")
.attr("font-size", "10px")
.attr("font-weight", "300")
.attr("text-anchor", "middle")
.text(function(d) {
return d.properties.NAME;
})
return svg.node();
}