Plot.plot({
color: {
scheme: "blues",
label: "Demand",
legend: true
},
marks: [
Plot.geo(states, Plot.centroid({
fill: d => regionDataMap.get(d.properties.NAME_1),
tip: true,
channels: {
name: d => d.properties.NAME_1,
iso: d => d.properties.ISO_1
}
})),
Plot.text(states, Plot.centroid({
text: (d) => d.properties.name, fill: "currentColor", stroke: "white"
})),
]
})