Plot.plot({
width: 900,
projection: {
type: "orthographic",
domain: states
},
caption: "Composing two different geo datasets for state and local government regions and a text mark for each state",
marks: [
Plot.text(
states.features.map((f) => ({centroid: d3.geoCentroid(f), name: f.properties.admin1Name})),
{
x: (d) => d.centroid[0],
y: (d) => d.centroid[1],
text: "name",
textAnchor: "middle",
stroke: "white",
fill: "black"
}
),
Plot.geo(states, { strokeWidth: 2}),
Plot.geo(lgas, { strokeOpacity: 0.3, strokeWidth: 0.5})
]
})