Hacker News new | ask | show | jobs
by cryptofistMonk 2055 days ago
I wonder how much difference it would make if vote "density" was used to determine the saturation, rather than total number of votes.

By my thinking, a geographically large county with 500,000 votes appears much more significant than a smaller county with the same number of votes in this map, and adjusting for density could potentially correct that?

6 comments

I was thinking the same thing. According to Wikipedia, the county areas vary by three orders of magnitude, from San Bernardino County, California (51,947 km^2) to Kalawao County, Hawaii (31 km^2), so it seems it can be very misleading.

For example, North Carolina and California have similiar population densities (80 people/km^2 versus 95 people/km^2), but on the "muddy" map North Carolina looks almost unpopulated while California is very emphasised---I guess this is because North Carolina is divided into smaller counties.

I guess in the case of San Bernardino it's a giant grey rectangle, so that particular one doesn't shift the red-blue impression very much, but still... :)

something like votes per square mile may address this. Looks like there are some follow-up maps to be made =)
I agree - this was my one minor nit-pick after reading the post as well.

I'd love to see muddy maps for other past presidential elections if you can get a hold of the data (and this one too, once all the votes have been counted).

Really cool work, and well-explained!

I experimented a bit with the source code at https://github.com/tuttlepower/VotingMap , you can add an area correction by changing the line

    fillOpacity: (us_votes[i].total_votes / 59828),
to something like

    fillOpacity: (us_votes[i].total_votes / (59828 * 50 * (feature.properties.AREALAND / 5.195e10))),
But I think in practice, this effect is swamped by the "upper fence" effect described in the original post. In other words, the scale is very far from linear anyway, by changing the magic number 59828 above you can make it look dramatically different. I should really calculate what the (Q3 + 1.5 * IQR) value is, but above I just put in a "* 50" to make the overall impression of the map similar.

The resulting image: https://imgur.com/3K8Wwan

yep the upper fence for the vertical scale is derived from the vote totals statistics. If the set of vote totals is now in votes per square mile, then there would likely be a different upper fence. Might be worth the number crunching to figure out what that number is.

BTW just to double-check, I'm assuming that in this given fillOpacity formula, that a fillOpacity > 1 just resolves to 1. So like fillOpacity : min(votesPerSquareMile/upperFence, 1).

Yeah, the Esri fillOpacity property just becomes an SVG property, and the SVG specification requires that it gets clamped to [0,1] before rendering.

In addition to computing the quartiles correctly, I also realized you should probably use (AREALAND+AREAWATER) rather than just AREALAND... in the above image the great lakes counties look suspiciously overemphasized. :)

let me know how it turns out! Do you have a link to your fork?
I've seen maps showing population rather than area in several places in recent British elections.

Here's a recent example: https://odileeds.org/projects/hexmaps/constituencies/

And here, where the first graphic is from 1895 and uses this approach: https://www.geog.ox.ac.uk/research/transformations/gis/paper... ... and Figure 31 (p28) has an American example.

Yeah, I'm on the same page. An idea for a follow-up map has been to do votes per thousand. I'm curious to find out what that resulting map would look like
My thoughts exactly. Giving the same color to the same population over different areas seems like a mistake, or at least a missed opportunity to provide more useful information.
EC-weighted, too.
That opens one hell of a can of worms though. Sure weighting by EC sounds reasonable, but frankly you'd really want to have it such that it looks mostly blue when the blue party wins and mostly red when the red party wins, which is nigh impossible because that's an incredibly nonlinear process.

Much better to optimize to make it look mostly red/blue when the red/blue party wins the popular vote, as that's actually a linear process.

> mostly blue when the blue party wins and mostly red when the red party wins, which is nigh impossible because that's an incredibly nonlinear process

The 2016 neutralizing map (right below the purple map) does this. I think it more closely matches people's perceptions about how their community aligns politically, too.

Literally white-washing (well, hue-desaturating) less populous areas out communicates something different. If you want to communicate impact on election outcome, then you just need to weight the vote per person based on people per elector instead of totaling the voting population in each area.

Technically white-wash is a more accurate term for it than desaturating, though personally I just view it as decreasing opacity against a white background.

Is people per elector the right measure for voting power though? There is an argument to be made (successfully in some cases [1]) that voting power is inversely proportional to the square root of the population. And of course the house seats are distributed in a different which minimizes the relative differences in voters per house seat between states [2].

Point being, voting power is a tricky thing to determine.

[1]: https://en.wikipedia.org/wiki/Penrose_method

[2]: https://en.wikipedia.org/wiki/Huntington%E2%80%93Hill_method

Yes, I was just thinking that, if you really wanted to control for the relative power of votes in a different counties.
I guess I'm really talking about the "lightness", not saturation