Plot.plot({
projection: {
type: "albers-usa",
domain: {type: "MultiPoint", coordinates: [[-125, 32], [-114, 32], [-125, 42], [-114, 42]]}
},
marks: [
Plot.geo(caCounties, { stroke: "grey", fill: "black" }),
Plot.dot(caDams, {
filter: (d) => d.YearCompleted <= yearCompleted,
x: "Longitude",
y: "Latitude",
fill: "grey",
opacity: 0.2
}),
Plot.dot(caDams, {
filter: (d) => d.YearCompleted <= yearCompleted && d.HazardPotentialClassification == hazardMap,
x: "Longitude",
y: "Latitude",
fill: "HazardPotentialClassification",
opacity: 0.6,
tip: true,
channels: {
"Dam Name": "DamName",
"Primary Purpose": "PrimaryPurpose",
"Year Completed": "YearCompleted"
}
})
]
})