Final 2016 Election Maps

I am quite pleased with myself and I’ve learned a lot. So much more to do now that these basic options are working but here are the final maps for them (with some updated colors).

legend.png

So I could use the conventional “red state” and “blue state” for options using “All Right Wing” and “All Left Wing” candidates, respectively, I changed Jill Stein (Green) to, well, green and Donald Trump to orange because, you know, he’s orange.

Purpose: My initial idea was based on a question I asked looking at my first ballot voting in Michigan of 1988, “Golly, if all the socialist and communist candidates teamed up instead of having five different candidates, could their combined forces change the outcome?”

So this little app provides answers to questions like — if all “Left Wing” candidates combined their votes, would there be a President Trump?”

First, I need to define my terms and you may or may not agree with them. Some things to take into consideration. I have 31 candidates in my database. So, deciding where they fall on the political spectrum would be as easy as looking at their 31 party platform except that many of them run in different parties in different states. Some parties have different candidates in different states. At least one candidate, off the top of my head, is in one state with a conservative party and another state with a liberal party.

You can’t really use war as a litmus test because you’ll get both Libertarians and Communists in your group. Same thing with legalization of marijuana. Despite Pro-Lifers having the American Solidarity Party as well as Libertarians for Life — unless a Pro-Life candidate is running with a party and right-to-life is part of their platform (ASP), they go in All Right. Marriage, ironically and inaccurately, is a good litmus test. For some reason, many people calling themselves conservatives think we should have laws about marriage — the Libertarians are the only ones who are consistent (on this issue as well as drugs).

All Socialists – Candidates affiliated with a party that have the words “socialist,” “communist,” “workers,” in their name. Or, if their affiliated party platform planks/issues include “socialized healthcare” and “free” college education. If the candidate runs with a socialist party in one state but a conservative party in another* — they’re on my socialist list.

*See _____ post for more on this (and why Soltysik appears as UST in the above screenshot)!

All Left – All of the above as well as what I call “center-Left”. In at least 99% of cases, “Pro-Choice” is a pretty reliable litmus test. Strengthening or expanding the federal government is probably even better.

All Right – Lowering taxes, eliminating taxes and/or Social Security, if they rant on about defense and terrorism (not that socialists and communists are for terrorism, they just feel the “strong defense” stance is an excuse for doing other crap they can’t abide … kinda the way “right wing” people feel about universal healthcare). See Pro-Life paragraph above — they go here by default. Reducing/eliminating national/federal agencies/laws goes here.

There is no “All Far Right” or equivalent to “All Socialists” because nazi or other white supremacist candidates seem to be, collectively, in the closet — in “public” or “political” life anyway. They may show up to parades and protests but won’t have a party on the ballot. I know this because the American Nazi Party was nice enough to answer some questions I had (in 2012 and just a couple weeks ago) about why they weren’t on ballots anymore. The closest I come to this is “All Right Except Donald Trump and Gary Johnson” but that is not to even imply those candidates are nazis or whatever — it’s just the closest this map has that may include those people. Personally — and this is just my theory — those candidates are probably more likely to slip into a mainstream party than a third party.

There are moderate, centrist candidates not included in either right or left. If they have no party (such as an independent) and their website’s description of their stances on issues aren’t very enlightening, they get left out.

Without further ado …

everyone.png
Everyone — popular votes only.

Trump and Clinton win every state in which they run. Clinton gets a relatively light blue because I reserved blue itself for “All Left” and she’s not really left–she’s just leftish of Trump.

allSocialists.png
All Socialists

Jill Stein of the Green Party, whom I consider a socialist (and for whom I voted so just let that help clarify — or collapse — your opinions of me and my opinions in this post) wins every state in which she runs.

noGreen2.png
All Socialists except Jill Stein

Here’s where the socialists lose — because they’re not on the ballot in a lot of states and, even if they’re legitimate “write in” candidates, the public is largely unaware of them — so they lose a lot of states. State laws determine who goes on the ballot and which “write in” candidates are valid when written in.

At present, those two options still use a SQL query to filter the candidates from a database with a table full o’ 2016 election results using various joins and whatnot. For multiple reasons, I use a much simpler SQL query for the rest that gets all the results and I filter them using client-side Javascript methods such as filter, reduce, and map. Very soon, I’ll refactor those first two options to do the same.

Slowing things down a bit is that PHP script that gets all the data with the “everyone” SQL query. That is one of the reasons I’ll soon use IDB to store that data locally with the user. The other reason I’m doing that is I’m very much an offline-first disciple.

allRight_noTrump.png
All Right Except Trump [accidentally excluding McMullin]
If we only consider “right wing” candidates Trump would, of course, win every state. Removing Trump as a candidate, Libertarian Gary Johnson wins every state which is even more boring than “All Socialists” above, so the user can remove Johnson as well.

Update: As it turns out … adding McMullin takes away Gary Johnson‘s 50-state sweep:

allRightNoTrump.png

allRight_noTrump_norJohnson.png
All Right neither Trump nor Johnson [accidentally excluding McMullin]
Darrel Castle (Constitution Party, mostly) wins every state in which he’s on the ballot … wait a second … DAMMIT! Sorry … because Evan McMullin ran as an Independent, I didn’t include him in All Right … I need to go back and change that. After I fix that, I’ll post a new screenshot for this option … I think that might also affect the “All Left vs All Right” map. It’s possible but, I think, unlikely, that it would affect Gary Johnson’s 50-state sweep above.

Update: McMullin doesn’t change changes the above:

allRightNoTrumpNorJohnson.png
As it turns out, McMullin makes a HUGE difference.

allRight_vs_Clinton.png
All Right [accidentally excluding McMullin] vs Clinton
Even without including Evan McMullin, Clinton loses several states when facing the combined forces of the Right Wing.

Update: McMullin doesn’t change the above

allLeft_vs_Trump.png
All Left vs Trump

The combined forces of the Left Wing take Michigan, Wisconsin, Nevada, Pennsylvania, New Hampshire, and Maine from Trump. Thanks, Hillary, you’re refusal to act like a decent human being lost “us” … let’s see … Michigan, Wisconsin, Nevada, Pennsylvania, New Hampshire, and Maine. Let’s not neglect to also thank the DNC for conspiring against Bernie Sanders. Way to go, dumbasses–hope you’re happy with the consequences.  While I’m at it–thanks to the DNC for our involvement in the Vietnam War. If you hadn’t muddled in that election, Nixon would have won and–love him or hate him–he got us out of the mess your guys made so he probably wouldn’t have gotten us into it in the first place.

allLeft_vs_allRight.png
All Left vs All Right [accidentally excluding McMullin]
Even without McMullin’s help, the Right Wing grabs Maine, Minnesota and New Hampshire from Clinton.

So … let me fix my allRight arrays and retake some screenshots.

Update: McMullin doesn’t change changes the above:

allLeft_allRight.png
McMullin adds New Mexico and Colorado!

Aw, how sad for McMullin … I’m sure things would have been different had he been in the primaries. Maybe. Who can fathom Trump even in hindsight?

Soon, btw, the user will be able to do this sort of thing a little easier once the legend is not only dynamic but interactive.

Advertisements

Schema Revision and PoliticalPorn

I got to my sillyDayJob early this morning so I could work on my SQL query because using JSON and javascript methods got the same weird results. I went to print out the picture of my revised schema and saw the image was more out of date than I thought so I opened it in Photoshop and updated it.

I keep wanting to just put all of this information in one table but I’m very stubborn about wanting to master SQL for properly normalized databases. While working on that, some lady came into our office and asked if I would be interested in a League of Women Voters guide to amendments on the ballot. Would I? I jumped up and shouted, “And how!” No, actually I didn’t but that’s how I felt. I then really wanted to be all Mad Men and shout, “Thanks, this is sure swell!” because … obviously, I’m just a big geek.

It feels good to be a political geek again.

andHow
Yes, people in Florida can read. Yes, people in Florida vote. *sigh*

Hmm … a couple of those don’t show the table’s primary id column. [Below I have an updated update of the revised revision.]

But … already … I think I know how it should and will work.

In related news, two of my pull requests for Hacktoberfest are for OpenElections repos.

Which … makes me sad … because it makes me think about the fact that if openFEC provided election data through their API instead of jacked up PDFs, etc. then … the fine folks at OpenElections wouldn’t have to work so hard.

Update 13 hours later: Getting closer …

Screen Shot 2018-10-12 at 7.14.39 PM.png

There’s probably a better way to do it, but … it’s working (so far) and that’s all I care about at this point.

Screen Shot 2018-10-12 at 7.14.14 PM.png

Here is the corrected revised revision of the revision.

schema_101618.png