Why Does It Work? Wait, what?


First, let me get this out of the way: The most frustrating thing about working on PrezPlayPro the last couple days is … I don’t know my states. I could list them all off the top of my head but if I could not pass a test where I had to label them. You know, like my kids do at school.

I need to practice that and know which are which. Seriously. As self-righteous as I get with my “nobody should be born a citizen — most people born here can’t pass the citizenship test and that just isn’t fair” I should, you know, be able to pass the citizenship test myself and know where Kansas, Nebraska, Missouri, etc. are without googling “usa map”.

Actual Post

Four months ago, I wrote that I was trying to perfect my SQL query selecting the “socialist winners” from my 2016 Presidential Election results database table. Here’s part of the screenshot from that post:


Relatively recently, I created an Excel worksheet for party affiliations that included the state for each candidate/party pair and this week, I finally got around to importing that into my database.

Next step: fixing my SQL query so it used the new table!

But something weird happened.

I opened the page and saw this:


I expected ZERO visual changes–I had not yet changed any code–but saw SIX states change color.

I had no theories but checked to see who won those states — they were all now going to Chris Keniston.  All states with no socialist votes stayed gray but Alyson Kennedy and Michael A. Maturen each lost three states. I looked at my code and saw his candidateID wasn’t even listed in my switch function so I added him. While doing that, I noticed  Dan R. Vacek, Jerry White, and Bradford Lyttle had a case each but none of whom won a state … I couldn’t think of a reason they’d be listed. All of this are the perils of returning to a project months later. I can’t even remember exactly what I wanted to “fix” about the final query!


I also added a stroke for the states so I could *ahem* tell the yellow ones apart.

I totally did not trust this so I looked at all the results for socialist candidates returned via SQL query.

Jill Stein won all six of these states — but, for some reason, with whatever query I used in June, those states went to Kennedy or Maturen and, yesterday, they all went to Keniston. I am completely baffled. Good thing I wasn’t in charge of the election results because this is what reality looked like in Vermont:

  • Chris Keniston     =        3
  • Alyson Kennedy  =        2
  • Jill Stein                =  6758

So, I am writing my query from scratch because it needs more than fixing.


I Have a Dream Come True

Not only did I come up with an idea for my presidential gender and race diagram-thing, but I’m totally using the relevant data as I play with programming and visualization–stay tuned. Below, we have the Socialist candidates for President in the 2012 election. I had to include three parties that didn’t have “socialist” or “socialism” in their names but they are, in fact, socialists.


White Males

  • Mayor Rocky Anderson, Justice party
  • Jerry White, Socialist Equality party

White Females

  • Roseanne Barr, Peace & Freedom party
  • Jill Stein, Green party

Black Males

  • Stewart Alexander, Socialist party
  • James Harris, Socialist Workers party

Black Female

  • Peta Lindsay, Socialism & Liberation party

Below are maps of the results for the 2012 Presidential election if only the four Socialist (by name) candidates ran and if we count all seven.


Interesting Facts

  • Alexander and Harris received approximately the same amount of popular votes but Alexander–who won California–got 3-4 times the Electoral College votes as Harris.
  • Lindsay received more than twice the popular votes that Alexander received but less than half the Electoral College votes. I’m relieved to find that, even among socialists, life just isn’t fair.
  • Jerry White didn’t bring his home state of Michigan.
  • Colorado is the only state in which all four candidates received votes.
  • Not all candidates were on all ballots.


Interesting Facts

  • Jill Stein wins by a landslide
  • Peta Lindsay is the only one of the original four to receive any Electoral College votes when we include the three relatively mainstream candidates.
  • Colorado is the only state in which all seven candidates receive votes
  • Roseanne Barr received 24,000 more votes than Anderson but didn’t win any states so Barr received zero EC votes while Anderson received 19.
  • Not even all three relatively mainstream candidates were on all ballots.

I’d love to crunch numbers based on gender and race but the low profiles of all candidates and the wide range of recognition between them make such an effort rather useless, however fun it might be. Having said that, stay tuned for some D3 socialism election yummy goodness–because I’m more about learning and fun that practicality and utility right now.