choropleth = {
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height]);
svg.append("g")
.attr("transform", "translate(360,20)")
.append(() =>
legend({
color: color,
title: "Diversity of Amenities per Census Block",
width: 260,
tickFormat: "0.01"
})
);
svg.append("g")
.selectAll("path")
.data(new_counties_features.features)
.join("path")
.attr("stroke", "black")
.attr("stroke-linejoin", "round")
.attr("stroke-width", .5)
.attr("fill", d => color(new_data.get(d.properties.GEOID20)))
.attr("d", path)
.append("title")
.text(d => "Ammenity Diversity Score: " + new_data.get(d.properties.GEOID20));
return svg.node();
}