powerPlantsHighlighted = Plot.plot({
title: "US Power Plants",
projection: "albers-usa",
marks: [
Plot.geo(states, { strokeWidth: 4, stroke: "grey" }),
Plot.geo(states, { fill: "white", strokeWidth: 2, stroke: "#e2e2e2" }),
Plot.dot(us_power_plants, {
x: "longitude",
y: "latitude",
r: "Total_MW",
fill: "PrimSource",
opacity: 0.7
}),
Plot.dot(us_power_plants, {
x: "longitude",
y: "latitude",
r: "Total_MW",
fill: "PrimSource",
stroke: "black",
filter: d => d.Total_MW > 3500
}),
Plot.text(us_power_plants, {
x: "longitude",
y: "latitude",
text: "Plant_Name",
filter: (d) => d.Total_MW > 3500,
fontSize: 12,
fontWeight: 600,
stroke: "white",
fill: "black",
textAnchor: "start",
dx: 15
})
],
r: { range: [1, 15] },
color: { legend: true },
height: 500,
width: 800,
margin: 10,
marginRight: 80
})