Socialist Results for 2016 Election


Here are the results if only socialist candidates are considered — whether or not their party has the word “socialist” in the name.

Screen Shot 2018-10-31 at 12.00.11 PM.png
Gray states either had no candidate or any candidates received zero ballot* votes.

You’ve seen that one before.

*I should mention I don’t have any data for write-in candidates.

Here are the results if we don’t include Jill Stein or the Green Party.

Screen Shot 2018-10-31 at 11.59.23 AM.png
Gray states either had no candidate or any candidates received zero ballot* votes.

LEGEND (obsolete but matches above)

  • LIGHT GREEN = Alyson Kennedy
  • LIGHT BLUE = Emidio Soltysik
  • DARK BLUE = Gloria Estela La Riva
  • DARK GREEN = Chris Keniston
  • PURPLE = Monica Moorehead
  • PINK = Michael A. Maturen
  • YELLOW = Lynn S. Kahn

Please note that not all candidates are on all ballots. Most of the 31 candidates for President who were on a ballot were on few states’ ballots. Ooh — there’s an idea for another map! Showing which states each candidate was on the ballot … and I’ll include write-in status. Hmm … I wonder if OpenElections has write-in data. If they don’t, I can totally volunteer!

Anyway, the “problem” isn’t just a lack of unity but also a lack of numbers in the respective organizations — in both individuals and states covered.

Often, a single candidate is running in multiple parties across as many states.

Sometimes, there’s lack of unity within a single party — multiple candidates across as many states.

Anyway, here are the other options that will be available soon (along with an updated legend):


Similar maps for socialist results of the 2012 election.

These are done with JavaScript, D3, PHP, MySQL. Now starting the interactive features.


PrezPlayPro Progress

I’ve made so much progress since I last revised my schema in Nov 2017. Most of that progress has been in the last week — two weeks at the very most. The Mobile Web Specialist nanodegree program I’m in as a Google Udacity Scholar via a Grow With Google scholarship has made my skillset and confidence go all supernova.

See also: I have a dream come true (2012 results made manually in Photoshop)

Here is what I’m up to:

Gray states are those with no socialist candidates (or there were socialist candidates but they received zero votes).

This query fetches only socialist candidates (excluding Hillary Clinton in one state where she’s actually on the ballot as a socialist — she’s not included because then she’d win all the states … until I fix my query by, hopefully, finally completing the affiliations table below) to see who among would “win” among the socialist candidates.

Here’s the new schema … I still haven’t added a stateAbbr column to the affiliations2016 table which, I think, is the reason for a problem I’m having with my first major query.


I need some buttons to change what results are fetched and displayed including but not limited to:

  • Results if all the “left-ish” third parties voted for a single candidate — would that candidate have beaten Trump?
  • If all the right-ish votes went to Trump, would he have have won the popular vote?

Beautiful Socialism

About 13 months ago, I made some maps of the 2012 election results using only the socialist candidates. If nothing else, I was curious how many votes they’d get if they all voted together instead of having seven or more different candidates. Those maps were made using Illustrator, Photoshop, and data from the  delightfully detailed, completely comprehensive FEC 2012 Election Results (PDF) I tediously transcribed into Excel. Fun, but yuck.

For 2016, I’m using Python and D3 and will probably throw in some MySQL, PHP, and jQuery along with, of course, plain-old JavaScript for some other fun.

I’ve just finished preparing the latest data from the 2016 election. The post and project are called beautifulSocialism because I use BeautifulSoup. Get it? See what I did there?

First, I just saved the 2016 Presidential Election Results page from Politico. After my first few tries (ever) using Beautiful Soup, I reduced just over 6202 lines of code (and they were really long lines) to 103 equally dense lines of code that I could almost use. I can’t express how proud I am of how elegant it is, IMHO, and how proud I am.

Lines 30-33 were a last-minute addition after I noticed that tag contained the hidden treasure of the full party name.

However, there were some whitespace issues I just could not solve and neither Google searches nor StackOverflow provided solutions that worked for me. Also, BeautifulSoup’s encoding shoved some additional unwanted characters into my “final” product.


I spent a lot of time trying many things but solved neither problem. I made it even worse a couple times, though!

Eventually, I surrendered and used Dreamweaver for a relatively few rounds of Find & Replace. First, I used Dreamweaver’s awesome Apply Source Formatting command which made the code pretty but the number of lines ballooned to 2595.

Sadly, correcting the candidates’ names took far more rounds than I expected because they were screwed up in so many different ways. I wanted full names and, since there were many candidates even I was unfamiliar with, I went to my go-to source of presidential candidate information for the last ten years but‘s lack of state-specific ballot information  (in their defense, that’s not the site’s purpose) posed two problems:

  • They give the candidate’s home state but I didn’t know if Smith from whatever state, for example, would be the Smith running in some other state.
  • They give the party the candidate most identifies with but Politico’s results used whatever was on the ballot–often “unaffiliated,” “independent,” or “other.”

So, much to my chagrin, I used Ballot-o-pedia or whatever it’s called. It’s the slowest damn site on the Internet. I hate to admit that it was a huge help and I’m still not providing a link to it. It made me want to throw stuff several times.

After a bunch of manual editing I didn’t expect, I now have this:


Now for some fun DOM manipulation using jQuery to dynamically add some sexy CSS to for the table. Yes, it might be quicker to just do it manually (much like my eventual editing in Dreamweaver) but I prefer learning, even if it takes longer and I make mistakes. Besides, someday, hopefully, I’ll be working with much larger data sets and this knowledge would, of course, pay off.

That’s unrelated to the maps, of course, but there are so many cool things I can do to practice with this data! I’ll also make something that will find and list all the different parties candidates use in different states (just for fun but also) to consolidate them and use in the maps.

Eventually, much of this work will also apply to my politicsPlay project as well.

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.