Hacker News new | past | comments | ask | show | jobs | submit login
How well does population density predict U.S. voting outcomes? (observablehq.com)
148 points by mbostock on Aug 31, 2018 | hide | past | favorite | 109 comments



The "difference" map (third one, green/pink) is one of the clearest, most intuitive and educational visualizations I've seen in a long time. The "Black belt" line is so clearly revealing.

I wish "difference from trend" maps were more popular, and more prevalent in the media -- this would be a tremendous asset in the classroom as well when teaching statistics.

Kudos!


Thank you! I'm flattered. I like that map too, and I'm definitely interested in making more "difference from trend" choropleth maps in the future.


If you want it to work in Safari or Edge (or other ES6 compliant browsers), you can use

    Object.assign(foo, {'a': 'b', etc.})
Instead of

    {...foo, 'a': 'b', etc.}
For example, https://beta.observablehq.com/d/64da99d0a15ecb6a


Object spreads work in Safari (I'm using 11).


Here is another 'difference from trend' map: https://imgur.com/a/4p0NgRn

Tennessee counties clearly stand out.


Is it all that different from the original votes map? The Delta, Black Belt, and southern Texas trends are pretty clear there too.

Not trying to be difficult, just curious what you see.


Interesting how there was a green (bias for Clinton) along the southern borderline. Do they not like The Wall?


It's not just Texans near the border: "Statewide, 61 percent of Texans oppose building a wall, while 35 percent support it and 4 percent don’t know or declined to answer, according to a poll conducted in April by Texas Lyceum, a nonprofit leadership organization." https://www.star-telegram.com/news/state/texas/article152402... (Link to study, sample size 1000: https://www.texaslyceum.org/page-18205 )


If you visit the Big Bend area and see the Rio Grande border area, you’ll see the insanity of the idea. There’s a river and steep banks on both sides. There’s also a symbiosis where Mexicans cross to sell trinkets (many bearing the words “no wall” en espanol) and tourists cross into Mexico to spend the day.


Hey, author here. Definitely didn't expect to see this on the front page when I woke up. A friend posed the question in the title to me last week after seeing the referenced NYT map, and I spent the last couple evenings making this notebook to try and answer it.

Let me know if you have any questions; I'll try my best to answer them.


Thank you so much for doing this. It has been a central political talking point for me for a long time, but I've never seen the data so well laid out.

Obviously, it's just one factor among many, but I think heavy social safety nets and regulations make a lot more sense to people in very populated locations and a lot of interactions and anonymity than they do out in the countryside, who would prefer to be left to themselves with no one else's hand in their wallet.

It looks like your data is by county. I wonder to what extent it would be clearer if it were down to the city level. A large, mostly empty county with a dense city in it is going to skew the data differently than a small county with city.


I think it would be interesting to see the results of regressing vote against population density + racial makeup.


I agree. The vote dataset doesn't have demographic breakdowns (I believe it was created by scraping post-election reports on _The Guardian_, not by relying on exit polls). But you compare the prediction errors to county-level data on race (the Census Bureau publishes these numbers) and pose the question "is the population-density model more wrong in areas of higher diversity?"



Very nice. I have often speculated that there's also a correlation between population density and people's stance on environmental issues but didn't see a straightforward way to test this using existing data.


So, people living in higher population density regions would care more about environmental issues? Or, vice versa?


Very nice. It might be worth worth weighting each data point in proportion to the population it represents.


Your first link goes nowhere, btw…


Fixed! Thanks for noticing.


:-) Nice graphs, and very nice analysis. It's cool to see how washing out the density leaves the geographic factors more clearly visible.


Of note is that graphing the logarithm of population density is really just the same as taking the difference between log(pop) and log(area). It might be worth tackling this as a linear model of those two separately rather than combining them together.



This is another analysis that proposes a more convincing model (IMO) for the voting patterns in the US based on colonial history & culture.

https://www.nytimes.com/2018/07/30/opinion/urban-rural-unite...


I think the data from Alaska should be excluded, all counties have the same ratio.


Thanks for pointing that out! It looks like every county in Alaska is just showing the state-level vote ratio. Might have to do with Alaska having boroughs instead of counties? I'll look into this later; I've added a disclaimer at the bottom of the notebook for now.


It looks like the data is being pulled from Townhall, which has the same issue [1]. Wikipedia has seems to have the data [2], though the percentages are a little different (51.3% for Trump rather than 52.9%). Perhaps it is wrong because not all land in Alaska is part of a borough, Eg: Nome is listed separately, but it is just a census area.

Interesting that it seems to have the reverse trend -- Anchorage and Fairbanks went for Trump while much of the unorganized borough went to Clinton.

[1] - https://townhall.com/election/2016/president/ak/county [2] - https://en.wikipedia.org/wiki/United_States_presidential_ele...


I'm the author of the GitHub repo that Jake references and the reason I stated Alaska totals at the state level is because elections there are administered at the precinct level, which have no county equivalent.

Alaska's "county equivalents", as the U.S. Census calls them, are known as Census Areas, Municipalities, and Boroughs. But again, there are no election data reported at those levels.

See here for more detail: https://github.com/tonmcg/US_County_Level_Election_Results_0...


You rock for looking into this. When I have a chance I'll merge the Wikipedia data into the dataset I'm using. Thanks!


Model looks like it would benefit from a quadratic term based on the scatter plot


I'd chose a logistic-like curve to fit (since extrapolating to infinite population the ratio should approach 1 and 0 population it should approach 0).


I'm actually wondering if the model was fixed to have an intercept at (0, 0). That line looks way off.


I wonder at the same thing. Allow the intercept to change and you'll get a massively better predictor. That will also stop moderately higher density counties from being green, and moderately lower density ones from being pink.


It seems like the takeaway here is that population density only predicts voting outcomes among white voters.


That's a good hypothesis that should be answerable if there is county-level race data.

Also, how good is "county-level" at correlating to population density? Some huge cities are their own counties, but are there many counties that have an urban seat and also outlying areas, with a significant split into two sections of similar population, but very different population density?


I would be willing to bet that there's not a single county in the US with a population density higher than the population density of its largest city. (obviously city-county mergers like NYC, Indianapolis, Jacksonville, etc would have a ratio of 1.) Indeed, most counties that have any town of > 20k people and that are not dominated by a huge city probably fit your criteria.


I'm having trouble finding data on this where all the populations are from the same time, but Forsyth and Gwinnett counties in Georgia might be counterexamples. (Their largest cities, Cumming and Peachtree Corners respectively, are hardly cities so much as just bits carved out of North Atlanta suburban sprawl.)


> county-level race data

Maybe you find a database of brain volumina to cross-correlate, too. Now that'd be real interesting, phrenology-wise.


I don't see much supporting evidence in the article for your claim. Aside from some conjecture about race included at the end of his analysis, the article doesn't show error based on racial breakdown of the analyzed regions. I'm not sure based on the article how you're arriving at this conclusion.


One similar hypothesis that comes to mind is that perhaps ethnic/cultural homogeneity predicts voting outcomes. That might synthesize the effects of population density (since denser areas might tend to be more diverse) as well as skin color (since homogenous areas might tend to be homogeneously white).


Not true. Tarrant county, specifically mentioned in the article, would be an example of higher density whites voting more Republican than might be expected.


Tarrant county (Fort Worth TX) is basically ground-zero for what I call the "McMansion White". I define them as:

A white, suburban dwelling American, typically married with kids, making about $33,000 per year per parent and spending every dime of it on housing, transport, food, clothes and entertainment. This person is not particularly securely employed and not particularly financially secure, thus harbors a great deal of resentment for people that don't have a similar lifestyle and consumption pattern.


I'm not sure how accurate this data is, but it seems to draw a similar conclusion:

https://overflow.solutions/special-projects/each-congression...


I've actually wondered if having a two-system form of government to deal with the urban-rural divide would be effective in governing. Basically, a government for urban-dwellers with one set of tax rates, services, and laws, and another government with another set of tax rates, services, and laws for rural-dwellers. There would be a common overarching government over the two for dealing with common interests e.g. military, international affairs, necessary infrastructure.

Something that I've wondered as part of this idea is why states after the original thirteen colonies became geographically larger in size. In hindsight, it seems much harder to have common interests across a numerically large group of people spread over a larger physical area.

Afterthought: I forgot to mention that the parts that are urban, and the parts that rural would have to be re-evaluated over time to see if that classification still holds or merits changing.


Hmm, you could call this type of government a federated system. Have it broken into different states and counties, maybe with local city governments. Enumerate some powers reserved for each while keeping a central authority to make sure everyone is assured at least a minimum of rights.

Naw, would never last.


It won't if you don't actually draw the lines between states accordingly.

(Counties don't mater, because they don't possess any sovereignty - they only have such political power as the legislature of the respective state gives them.)


It didn't last.


Actually, what happened is that the boundaries became immutable concrete while the population concentrations varied.

At this point, we should redraw all state lines, and raise the number of elected officials in the House and Senate.



How does population density affect the impact of an individual vote?


I'm curious about the answer to this! I don't have a good intuition for it.

The impact of individual votes is called "voter power," and in US presidential elections is mostly related to how evenly matched a state is -- which means it tends not to correlate to things you think it would, like small states vs. large states.

In simple terms, voters in swing states have more impact, which is why people try harder to win their votes. In mathematical terms, voter power is the probability that a given voter's vote will decide the election. You can measure a given state's voter power by asking, "what is the smallest coalition of voters, including voters from this state, who could have changed their minds to change the outcome of the election?" The smallest coalition that includes Texas voters is a lot bigger than the smallest coalition that includes Florida voters, so Florida voters have more voter power.

There are some measures of voter power based on polling from before the election, but I don't know if there's a post-election calculation around:

https://wallethub.com/edu/how-much-is-your-vote-worth/7932/ https://projects.fivethirtyeight.com/2016-election-forecast/...

It's not obvious that denser or less dense states would be more evenly matched, and thus have more voter power. But maybe there's some other effect involved that would create a correlation?


I think the left would respond that urban populations are diverse & educated. And the right would respond that it's hard to preach conservative values of individual liberty and personal responsibility (e.g., leave me alone, i'll leave you alone) when people are living on top of one another.


"individual liberty and personal responsibility (e.g., leave me alone, i'll leave you alone) "

Those are not conservative values, those are libertarian values, we might call them 'liberal' in the rest of the world (well, kind of, using that phraseology like 'leave me alone, i leave you alone' is kind of a American colloquial/populist or crude way of expressing it - in fact it doesn't describe classical Liberalism very well at all, but nevertheless someone with that ethos would definitely fall under this camp, and not Conservatism)

Classically Conservative 'values' (though not necessarily politics) are more: family, community, responsibility towards community, faith, tradition, duty etc..

Conservative and Libertarian values clash distinctly in the are of 'community' - one is individualist, one is instinctively though often not obviously community oriented.

'Duty' is generally a conservative concept you don't hear much in the Libertarian leaning crowd.

But it's moot as far as this article is concerned: The data in this article is highly problematic due to the fact that most newcomers move to the cities, and so it entirely skews the data.

It's not an argument of 'disperse vs. dense' - it's really just a proxy for ethnography.

From the link in the comment above [1]: "population density and percent black will do a lot to obliterate many a suggestively-patterned map of the United States. Those two variables aren’t explanations of anything in isolation, but if it turns out it’s more useful to know one or both of them instead of the thing you’re plotting, you probably want to reconsider your theory."

[1] https://kieranhealy.org/blog/archives/2015/06/12/americas-ur...


> those are libertarian values

As a libertarian voter, in the USA, I find this kind of position to be juvenile. They are conservative values, that happen to overlap with libertarian goals. Libertarian values are neither fundamental (old enough to be the basis for any other system) nor complete enough to be considered a value system at all. They are just rough applied values (eg limiting government is a general preference, not an ideology). Trying to exaggerate libertarian values to mean something absolute shows a deep misunderstanding of the movement.


" I find this kind of position to be juvenile. "

Americans often do not understand their own political ideologies, the basis for them, and use completely the wrong words in describing them.

Libertarianism is ultimately an American flavour of (Classical) Liberalism, which is quite an old political tradition.

'Freedom of expression' is absolutely not a conservative value, it's fundamentally Classicaly Liberal.

Capital 'C' Conservatives in the USA may be big on 1st amendment type things, but it's really not conservative at all.

Liberals would have wanted to abolish the relationship between Church and State, conservatives would generally not want that, historically.

Liberals pushed for centuries for certain people to be able to have certain rights, conservatives would have been generally opposed to such things on political grounds, less so on the basis of values. 'Values' based politics is a more modern thing.

Even free markets - this is not a conservative thing, it's a Classical Liberal / Libertarian thing, which is why the term 'neoliberalism' is sometimes used to describe super capitalist/free market types. None of that is conservative.

In terms of 'values' - 'freedom of choice/expression' is fundamentally at odds with communitarian values and it's more easily understood in issues like the draft: A conservative would believe that in the event of (legitimate) war, everyone should do their best, basically sign up to fight. The draft would be seen as the rational duty of citizens. A libertarian would never accept such a transgression of their rights - joining the Army under any circumstances would have to be a matter of conscience.

Angela Merkel is mostly conservative. In larges swaths of Europe they have compulsory military service even though they are politically more progressive - it's because they are culturally fairly conservative. Most European nations have state Churches, i.e. official religions.

In Europe, the 'free market / big business' folks are not called conservatives (because they aren't), they're called 'Liberals' - which is what they are. The left has Social Democracy, Democratic Socialism. The right usually has Christian/Agrarian Democracy and then maybe some kind of nationalist movement in there.

I admit though 'personal responsibility' is both a conservative and Libertarian value. To a conservative, personal responsibility is a community obligation, righteous members of the community are hearty, productive, and fyi generous. Christian Democrats ideals are fundamentally communitarian (charity with no expectation of return is a requirement) and are totally incompatible with this 'Ayn Rand' stuff about not necessarily having an obligation toward others. (There's a hint there: you absolutely cannot be a Christian and Objectivist at the same time, Christians 'serve God' by behaving morally and by building the community, possibly through self-sacrifice and charitable work, putting God and the 'greater god' above oneself, whereas Objectivists pursue their own happiness as a moral obligation - charity is a choice, not an obligation) Libertarian personal responsibility is more a matter of individual pragmatism: 'Take care of yourself nobody else will (or should)'.

It's obviously a weird paradox in America that some conservatives value community and duty (think boy scouts, military service) and at the same time this penchant for 'absolute freedom'. I believe this is reconciled if you consider 'democracy' really as the form of freedom they aspire for people of other nations and that Americans wish for this basic opportunity for all people - to the point wherein they are willing to fight/sacrifice themselves for that 'greater good'. And of course on the left, you have artists/creative types who on one hand talk about sexual liberation and being 'open minded' and yet who are in 2018 the vanguard of the very illiberal policing appropriate language, and controlling what is acceptable culturally (i.e. only transgender actors should play transgender roles), opposing academic views which are hostile to some ideas etc. etc.. It's definitely weird. Anyhow , in America, Liberals are often not very liberal, and Conservatives are often not very conservative at all.


This is a really good post.


> Libertarianism is ultimately an American flavour of (Classical) Liberalism, which is quite an old political tradition.

"Ultimately" being a weasel word for redefining it again to meet a particular ideology.

This is not correct, nor is historical cherry picking a compelling argument for the viewpoint.

He goes off on yet another tangent after trying to justify the interpretation, through parallel interpretation. They will continue to be one of the many people who are convinced they are right, deriding others with more rational and moderate position, trying to get into arguments to try to justify their beliefs.


I was replying to a non-factual ad-hominem attack, so I thought it required more explanation.

Now I'm being attacked again, with a non-factual personal slander.

Lovely.

My post is basically textbook politics, it's not my opinion. I think my examples are pretty reasonable.

'Libertarianism' is an extension of Classical Liberalism, it's not a conservative movement (in terms of political ideology) and there's no debate about that.

'Republicanism' is 100% a Liberal ideal by definition. There's no wiggle room there. To be a 'Republican' literally means to be against the Monarchy or even Constitutional Monarchy, which is right at the core of Liberalism.

'Pursuit of Liberty' is not a conservative objective, it's Liberal, i.e. 'Classically Liberal'.

The only debate is what some of those words have come to mean through the lens of pop culture media, and that's all pretty foggy.

'Republican', the party, has little to do anymore with 'Republicanism'.

In particular, 'Liberal' has come to mean 'Left Wing' and 'conservative' usually 'right wing'. And since there are only two parties in America (and they are both more or less Liberal), and because party allegiances have changed, and because Americans don't ever learn political theory in school, and because the American press confuses the issue even further - it's a mess.

It's nuance, but it's not that complicated.

European political parties especially their naming - are generally more consistent and clear. When you look at the European political landscape for a bit, things are easier to grasp. Things start to make more sense.


The "right" - if we are referring to Repubs/Trump voters/Fox News Watchers/etc - are in no position to claim "leave me alone and I'll leave you alone" as their motto.


Sorry, why not? Shouldn't anyome have that right if urban living constraints don't get in the way?


I'm saying that the laws that the "right" in the US seek to enact are not consistent with "leave me alone and I'll leave you alone" philosophy.

Anti letting women choose to get an abortion, anti gay marriage, anti marijuana, anti separation of religion and government (via tax exemptions and taxpayer funding of religious schools) , subsidizing specific businesses with taxpayer funds, pro warrantless surveillance, pro police state, etc.


Personally I feel like the issue of abortion is different from the rest of those. There is so much between the moment a guy puts a condom on and when the baby is crowning. It's clear to me that those who are against birth control and in favor of abstinence are extreme. At the same time, it would be criminal to abort a baby as it is crowning. (Btw, is making this criminal anti woman?)

There are moderates who approve of plan b and who understand that the latter case is unjust.

Now for the rest of us we have to decide on a month/week/day or development milestone to figure out exactly when it no longer becomes ok to abort. Who has any right to decide the precise step in development process where it becomes unethical to abort. Yet we must draw a line.

Personally on this issue I am surprised people can feel so confident about what the right thing is to do.


It depends on the proportionality for one. High population states have absurdly diluted voting power for senate. The offices available also give some voting power - if the population is 125 and the only positions available are dogcatcher, sherriff and coroner there is less influence than say a big city mayor capable of building schools, subways, and say deciding to buy vaccines in bulk to give away for free for the sake of public health.


One election does not a trend make. But perhaps also looking at previous elections - national and local - would reveal trends / patterns?

I saw a comment below where the author said the data didn't have demographics. That's understandable. But what about population change?

This was interesting.


I grew up in Kansas and up until about 15 years ago it bounced back and forth between Democrats and Republicans frequently. And in my dad's era, post war, pretty much everyone was a Democrat, whether urban or rural. And then the parties have flipped ideologies substantially (Southern Democrats, and then Nixon-Atwater Southern Strategy Republicans), and even arguably in 2016 you get a rather substantial 180 degrees with Trump Republicans who suddenly became anti-globalism (domestic capitalism, global mercantilism).

So on the one hand, you need more data over more elections to see if there's correlation, but then that adds noise. At a national level, the parties have sub-parties within them where in consensual democracies they'd be separate parties, it's not a strictly two party system like you see in majoritarian democracies. And this is always in flux.

Another source of noise is just the nature of the 2016 presidential election. Possibly a better source to reduce noise? U.S. senate races. They're statewide like a presidential race, the term is 6 years, but the lack of national media hype involved in the campaigns makes them less emotional and the data might be more stable. The incumbency problem might make it useless.


JFK and FDR still seem like Democrats.

Hoover, Eisenhower, and Teddy still seem like Republicans.

The idea that the parties "switched" is little more than a notion with which Democrats try to distance themselves from the awful parts of their past.


The distancing claim is that the racists switched parties, not that the parties switched ideologies.

Ya know, like Strom.

If you don't think it's kind of obvious which party currently has more members that think it's fun to race bait or worse, well whatever.


The claim was:

> And then the parties have flipped ideologies substantially

Strom Thurmond was one of three Southern segregationists who switched parties. The rest of the segregationists remained Democrats, including such famous names as George Wallace and Robert Byrd.

And the Civil Rights Act had more support from Republicans than from Democrats.


You've misread my comment. I responded to you stating that Democrats like to distance themselves from their past by pointing out that they don't do this with claims about switching ideologies.

That's why I put the word "distancing" in front of the word "claim".

Does that 3 count include an exhaustive survey of voting Republicans or is it just sophistry to get people reading the remark to focus on prominent individuals?


That 3 is the number of politicians who switched. I focus on prominent individuals because history has recorded their actions, so we can actually speak factually about their behavior.

Unless you have an exhaustive survey of individuals who switched parties, let's avoid unfounded (and likely partisan) speculation about what such a survey might say.


You started the thread with an assertion that is on the same footing as my speculation.


That assertion is based on facts, not speculation, and I'm happy to back it up with as many facts as you like. For example:

In 1976, after the South supposedly supposedly switched allegiance, shortly after LBJ's (reported) claim that he'd "lost the South for a generation", all the Southern states except Virginia voted for Carter, a Democrat.

(Apparently there's some doubt about whether LBJ actually said that. The media may have lied to us again.)


1976 is the only time since the signing of the Civil Rights Act of 1964 that a Democrat has won a majority of the south. !976 was definitely not a regular election. The Democratic candidate was white evangelical southerner. The Republican candidate was a northerner who had been Nixon's vice president and had pardoned Nixon. It took pretty extreme circumstances for the south to vote for a Democrat after 1964.


What are the extreme circumstances there? That the Democrat was a Southerner? So were Clinton and Gore.

That Ford was closely associated with Nixon and had pardoned him? Why would the South have cared more about that than the rest of the country? Despite the pardon, Ford won 27 states, including California, and 48% of the popular vote.

In 68 much of the South voted for Wallace, a Democrat running as an independent, and Texas voted for the Democrat ticket. In 72 every state save MA and DC voted for Nixon, so the South doesn't stand out there. Then in 76 the South voted for the Democrat, Carter.

It's not until Reagan that we see the South reliably voting Republican.


Ike feels like he would more likely be a centrist Democrat today than a Republican.


Nixon too, in a way.

I mean, Nancy's "respectable Republican cloth coat".


There is also the 1994 mid term elections where Kansas republicans picked up 2 congressional seats and the governor: https://en.wikipedia.org/wiki/Republican_Revolution#House_of...


The ideological "sort" of conservatives into the Republican party and liberals into the Democratic party is a recent phenomenon. As recently as the late 1970s, the Republican party wasn't even clear on its stance on abortion. The sort was set in motion after Reagan was elected and wasn't really completed until after the Contract With America years.


There was a long time of Democrat domination of the southern states' politics from the end of Reconstruction that didn't end until about sixteen years ago. It's hard to assign ideological values like left/right, or even positions of, e.g., capitalism vs. not-capitalism, to the parties before the 70s, and even since (with some exceptions).

The Democratic party had something of a flirtation with the left side of the spectrum in FDR, but it wasn't anything like a defining characteristic of the party back then, and JFK went pretty much in the other direction. The Republican party had Presidents like Coolidge, who would definitely be on the right side of the spectrum, but also Nixon, who gave us price controls and proposed single-payer health care.

It's all a bit of a mishmash with a few salient exponents of somewhat-consistent ideology here and there, like Presidents Teddy Roosevelt (a progressive of sorts), FDR, Reagan, and now Trump. Things do seem to be clarifying in recent times, but even so, it's still not always all very clear. The fact is that the individual candidates have more going for or against them than just party affiliation or ideology.


There's an axis of populist economic policies in there, too; in the late 19th century this was strongly associated with Democrats, while Republicans pushed harder for "pure" laissez-faire capitalism.

That one is a bit more interesting, since in the modern day there are populist-economic wings of both major parties, though with very different approaches to implementing their ideas, surrounding a more laissez-faire "center".


Kansan here. Gun control is a big part of the Democrats failure in KS. Several years ago, over 90% of the voters supported the RKBA amendment to the KS constitution.


Living in close proximity to other people makes you more conscious of externalities.


"It predicted that Tarrant county, with 904 people per km², would support Clinton, while Zavala County, with 3.6 people per km², would support Trump. In fact, the reverse was true."


Tarrant is a very fast-growing county. The population has doubled over 20 years. Be interesting to see 2008 and 2012 results to see if there is a trend.


Naive question, can we just "backfit" sets of county metrics based on results of the last few elections to determine which ones have effect? Surely with a large enough set of metrics (i.e. all combinations of density, race, and gender), a large enough sample size (all counties in this case), and over multiple elections (albeit all reasonably recent to avoid historical shifts), we can determine the set of metrics which are the highest predictors with the fewest exceptions without appearing to rely too much on correlation.


The biggest question I have is, did population density change between 2008 and 2016 to skew the result of the elections in different directions?

My intuition is that it did not, and thus it doesn't predict much.


The error with that thinking is that an election is a one bit sampling function. Small shifts can flip the result.

This is why I'm dubious about polls as a way of guiding campaigns.


I think it's trying to predict the regional outcome not the outcome of the whole election. Also, with the electoral system, any slight shift in a few swing states can change the whole election.


It seems pretty obvious to me that the line is a bit off. If you allowed it to have a negative y-intercept or allowed some kind of an S-curve you'd reduce the error dramatically.


The Economist had an interesting article this summer about this subject, covering it from historical, statistical and political angles : https://www.economist.com/briefing/2018/07/12/americas-elect...


What's up with the line of points at y=0.3772? seems anomalous


It's Alaska, as noted in the footnotes of the article; I think each borough is showing the vote ratio for the whole state rather than the borough-level data. Sorry about that; I'll make some time to look into it later.


This is really interesting. Nice job!

Something I’ve always wondered though is whether it’s cause or effect. In other words, does living in high density areas make liberal causes more important to a person, or is a liberal person more drawn to high density (big cities). And the inverse for conservatives.


You might be interested in reading "The Big Sort": https://www.goodreads.com/book/show/2569072-the-big-sort The long and the short of it is, it's both.


There's a factor this research overlooked and that's intensity. Bernie Sanders won the Michigan primary with high turnout in Detroit. Those voters stayed home in November and that was the difference.

Even with the swing in Macomb county of Obama Democrats voting for Trump that was much discussed by the national media it still could have been overcome with a 2012 turnout level in Detroit. I'd be curious if that was replicated in other states.


My impression: staying home is a way of voting for some people. There are some (many?) people who have so strongly identified with one party, that when they are upset with it and want to "vote against" it, they still cannot bring themselves to vote for another party, as that seems a violation of their core identity. So, staying home is how they vote for the other party. It only counts half as much, of course. So, in this example, there might be some black voters who cannot bring themselves to vote Republican, no matter what, but if they are upset with the Democratic party they may stay home. Similarly, Christian conservatives who don't like the Republican candidate may not be willing to vote Democratic, but they might be willing to skip voting.

Just a hypothesis, of course, I have no data to back that up.


Did not work on my iPhone 6 in Germany. Saw a lot of: “ RuntimeError: us could not be resolved“



RuntimeError: us could not be resolved on safari iPhone X :'(



Same issue with Firefox 52.9.0 on Win10. Works in Chrome.


What is up with Richmond county? Quite the outlier there.


Does a logistic fit work better?


TLDR: “this exercise demonstrates what we already know: voter preference is complicated, and while it is affected by population density, there are too many other factors for that metric alone to be a good predictor”


Did we actually know that before investigating, or did we just have a guess?


That’s a quote from the article.


Why would one try to fit a line to this?


Population density = media consumption


In what direction? People in New York are all walking around reading Instagram, people in Kansas are sitting at home watching Fox News. Which group consumes more is not clear to me.


How well does the average number of bullet holes in road signs predict US voting outcomes?

How well does the number of Pumpkin Spice lattes sold per capita predict US voting outcomes?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: