Deviation calculation
       |           

Welcome, Guest. Please login or register.
Did you miss your activation email?
May 05, 2024, 08:00:53 AM
News: Election Simulator 2.0 Released. Senate/Gubernatorial maps, proportional electoral votes, and more - Read more

  Talk Elections
  General Politics
  Political Geography & Demographics (Moderators: muon2, 100% pro-life no matter what)
  Deviation calculation
« previous next »
Pages: [1]
Author Topic: Deviation calculation  (Read 339 times)
Bleeding heart conservative, HTMLdon
htmldon
Junior Chimp
*****
Posts: 8,983
United States


Political Matrix
E: 1.03, S: -2.26

Show only this user's posts in this thread
« on: December 23, 2012, 05:03:31 PM »

So the OurCampaigns site (perhaps the worst-designed site on earth, but with lots and lots of cool data) has a feature on their maps called "Deviation".  I'd imagine this is some sort of standard deviation calculation, but I have no idea how they apply std. dev. for multiple candidates.

These maps are cool because they help show where third-party (or candidates that didn't win any counties) candidates did relatively well.

Does anyone know how one might calculate this so that we could make our own deviation maps?


Indiana US Senate 2012: http://www.ourcampaigns.com/RaceDetail.html?RaceID=507745
Maine US Senate 2012: http://www.ourcampaigns.com/RaceDetail.html?RaceID=490756
Logged
jimrtex
Atlas Icon
*****
Posts: 11,817
Marshall Islands


Show only this user's posts in this thread
« Reply #1 on: December 23, 2012, 08:40:41 PM »

So the OurCampaigns site (perhaps the worst-designed site on earth, but with lots and lots of cool data) has a feature on their maps called "Deviation".  I'd imagine this is some sort of standard deviation calculation, but I have no idea how they apply std. dev. for multiple candidates.

These maps are cool because they help show where third-party (or candidates that didn't win any counties) candidates did relatively well.

Does anyone know how one might calculate this so that we could make our own deviation maps?


Indiana US Senate 2012: http://www.ourcampaigns.com/RaceDetail.html?RaceID=507745
Maine US Senate 2012: http://www.ourcampaigns.com/RaceDetail.html?RaceID=490756
If you look at the Indiana map the Yellow counties are where the the Libertarian candidate Horning did particularly well and where the Republican and Democratic candidates did about as well as they did statewide (semi-narrow victory for the Democrat Donnelly).

But if move around, there are counties where Horning did pretty well, but are not yellow.   In those Mourdouck also did well.  I think these may actually be orangeish (red + yellow).  If you click on +candidates, you can select and de-select candidates.   I had better luck deselecting all but the Top 3, and then picking pairs.

For example, if you look at Maine, and have King(I), Summers(R), and Dill(D) selected, it shows King did relatively well in the center band of the state.  If you add Woods(G) back in, Oxford and Franklin become Green.  So that is really showing where Woods had strength.   Because Woods only had 1.47% statewide it must be showing relative strength.   When he gets 1.96% in Franklin, that is 33% better than average.   It would be pretty hard for a candidate who got 50% statewide to get 33% better (67%) in any county.

Now switch to just the R, D, and I candidates in Maine.   Switch off either King or Summers, and Aroostook suddenly goes blue.  King was weakest in Aroostook (the further you got from Portland, the more conventional partisanship prevailed).   In a D vs. R race, Aroostook is more Democratic than the state.   In a R vs I, or D. vs I, it is less King-favorable.   In a D-R-I race the R strength hides the D strength.

So it must generating a color scale for each candidate based on the relative strength in a county vs statewide strength.

color = function(county%/state%)

And then adding the colors together.

Scaling is tricky here.
Logged
Pages: [1]  
« previous next »
Jump to:  


Login with username, password and session length

Terms of Service - DMCA Agent and Policy - Privacy Policy and Cookies

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Page created in 0.024 seconds with 11 queries.