states = topojson
.feature(us, us.objects.states)
.features.map((feature) => {
const properties = feature.properties;
const bounds = d3.geoPath().bounds(feature);
return {
fips: feature.id,
name: properties.name
.replace("Commonwealth of the ", "")
.replace("United States ", ""),
bounds
};
})
.sort((a, b) => d3.ascending(a.name, b.name))