As a sort of "for fun" side project, I've been looking at the Pennsylvania senate race results. The Democratic candidate, Joe Sestak, lost by a narrow margin to the Republican candidate, Pat Toomey. I've been kind of interested in the results because 1) it was such a close race, 2) I'm from Pennsylvania, 2) I'm from Philadelphia. As James Carville once said, "Pennsylvania is Philadelphia and Pittsburgh with Alabama in between," so these election returns could have an interesting distribution.
I got the county-by-county election returns from PA Department of State Website. So, first things first, here's a plot of how many votes each county contributed to each candidate. I've subtracted the Republican votes from the Democratic votes, so that the bars represent the margin of victory for each candidate in each county. The colors of the bars represent the size of the Republican or democratic skew by county (specifically, log(Democratic Votes / Republican Votes)).
The counties that contributed most to Sestak were Philadelphia and Allegheny (where Pittsburgh is located), and the counties that contributed most to Toomey were Lancaster and York. One thing to notice is that while there are a lot of red counties in Pennsylvania, no county is as red as Philadelphia is blue. In fact, the trend in this data is that Philadelphia is exceptionally Democratic.
I know that population size is correlated with Democratic voting. So, I got voter registration data from the PA Recovery Act website, and merged it with the returns data. This figure plots the county population of registered voters by the Democratic skew in the county. I've also included a robust regression line, and labeled the most outlying counties (the top quartile of absolute residuals).
So, Democratic voting is correlated with population size, but Philadelphia is a huge outlier.
There was also a lot of talk about how Democrats were not energized to vote this election, so I wanted to see if you could see that effect in the data. I came up with a rough Democratic Turnout Skew number: log((Democratic Votes / Registered Democrats) / (Republican Votes / Registered Republicans)). Really, this should be based on exit polls, but I decided just to work with what I've got. The more positive this number, the more likely(-ish) a Democrat would be to vote than a Republican in that county, and the more negative, the more likely a Republican would be to vote than a Democrat. I compared this turnout skew to the Democratic Registration Skew: log(Registered Democrats / Registered Republicans).
Here's a plot of that data, with a local regression line (calculated excluding Philadelphia).
In almost all counties, Republicans were more likely to be voting than Democrats, except in the three labeled suburbs of Philadelphia. There seems to be no effect of the Democratic-ness of the county when Democrats are < 50%. However, when a county has more than 50% registered Democrats, Democratic turnout takes a nose dive compared to Republican turnout. This is either because Democrats are less motivated to vote (diffusion of responsibility?) or because Republicans were especially motivated to vote, or both. Again, Philadelphia is a strong outlier.
Lastly, I compared the Democratic voting skew in the senate race to the Democratic skew in the Governor's race.
It looks like all counties were more likely to vote for the Republican candidate for governor. Specifically, voters were about 1.17 times more likely to vote for the Republican governor than for the Republican senator, regardless of how strongly the county went for the Republican or Democratic senate candidate. This is one case where Philadelphia was not an outlier.
So, that is that.