Plot.plot({
projection: "albers-usa",
length: {type: "sqrt", transform: Math.abs},
marks: [
Plot.geo(statemesh, {strokeWidth: 0.5}),
Plot.geo(nation),
Plot.vector(
counties,
Plot.centroid({
anchor: "start",
length: (d) => d.properties.margin2020 * d.properties.votes,
stroke: (d) => d.properties.margin2020 > 0 ? "red" : "blue",
rotate: (d) => d.properties.margin2020 > 0 ? 60 : -60
})
)
]
})