Gerrymandering in NC, or, A Tale of Two States

I moved to North Carolina in 2011 and, as I’ve come to learn more about our politics, I’ve been struck by something that seems impossible: North Carolina has two separate realms of politics.  In statewide elections, NC is split pretty much 50/50 between the two major parties.  But in races where the state is split into districts, like the state legislature, the Republican Party controls a supermajority of seats (over 60%).  With over 60% of the seats in the NC House and Senate, the Republicans can override the Governor’s veto, severely limiting the executive’s power.  

In the first chart are the statewide races – some are won by Democrats, some by Republicans, but they’re all within a couple percent of 50/50.  In the second chart, we see the various districted houses in North Carolina, and all of them have 60+% Republican wins.  I’ve spent much of the last year puzzling over how these two types of elections could produce such different results from the same voters.  My background is in computer science and math, so I’ve tried to find an answer to this question the best way I can: using data.

Our state legisIature, the North Carolina General Assembly (NGCA), is elected every two years, as are our Congressional representatives.  The US President and our statewide offices (Governor, Lieutenant Governor, Attorney General, etc) are every four years, and US Senators are every six years.  So we have a lot of data to work with.  I started by downloading the raw election result data for each of the previously-mentioned races for the last fifteen years from the State Board of Elections.  (Before 2002, the data gets harder to access and less detailed).

What I found is that, before I moved here, elections weren’t quite so lopsided.
Clearly something changed, abruptly, between 2010 and 2012.  I don’t think it was me moving to Charlotte.  More importantly, it wasn’t that the electorate faced a massive shift between parties — if you look at statewide elections, the party splits stayed roughly the same.  There’s some variability as you look at individual races, but you see they’re mostly within the 45-55% range.

So what changed?

These changed.  Following the 2010 census, as happens after each census, district boundaries are redrawn in order to rebalance the shifting population across the districts.  But in 2010, the Republican Party had just won control of the NCGA, so they got to control the redistricting process – the prior maps were drawn by a Democratic Party controlled legislature.

Now it’s important to understand how strategic redistricting works.  If you want to skew the district map to your party’s advantage, you create a small number of districts with as many of your opponent’s voters as you can cram in (“packing”), and a larger number of districts with just enough of your voters to reliably win (“cracking”).  If you’re unfamiliar, I’d recommend taking a minute to read Wikipedia’s primer, which has some helpful examples of why this is so effective.  Also, fun fact, the first district they show as an example of egregious gerrymandering is the district I was in when I first moved to Charlotte, the NC-12th.

In any election, 49% of the votes are “wasted” — that is, they don’t contribute to the election of a candidate.  This includes all of the votes for the losing candidate, and all of the votes for the winner past a simple majority.  If you pack and crack effectively, you can skew the districts so that your party wastes fewer of its votes, and your opponent wastes more of their votes, and you can create a map where a 50/50 citizenry elects a supermajority of one party.  

So the goal of gerrymandering is to waste as many of your opponents votes, and as few of your own votes, as possible.  Let’s see if we notice any change in wasted votes after the 2010 redistricting.  To keep the chart easier to read, let’s start with just one district map – the NC House of Representatives.  Let’s look at the percent of votes that each party wasted.

There it is — a pretty clear jump between close margins in 2002-2010, to very lopsided vote wasting in 2012 and later.  And lest you think I cherry-picked the worst map, I actually chose the least dramatic.  The NC Senate and US House results are even more lopsided.  

In case you’re not a chart person, here’s what that last one says — since 2012, the Congressional maps have been drawn so that over ⅔ of Democrats are wasting their votes, and less than ⅓ of Republicans.  

If you look at all of the elections 2002-2010, the highest percentage of wasted votes that any party had was 59.6% (Republicans in the Senate in 2006).  In every single election 2012-2016, the Democrats have wasted more than that.  It’s impossible for me to overstate that sharp division.  Every single election since 2012 has been more skewed than the worst outlier of the decade before.  Every single election since 2012 has been less fair than all of the elections of the prior decade.  

Back to my original question – how did we end up with 50/50 elections for governor, but a legislature that’s had 60% or more seats go to one party, the same party, in every election since 2012?  The best answer I have for that is to look at the districting.  I believe that the data show that the districts were drawn to systematically favor one party by wasting more of their opponent’s votes.

 

Your Smartphone is the Brain, Everything Else is an Appendage

At their I/O conference, Google announced Android Wear, Android Auto, and Android TV.  As I watched the series of announcements, I was struck with this metaphor: your smartphone is the brain, and everything else is an appendage.  Your watch will give you notifications at a glance and take voice commands, but it’s really just funneling that data back to your phone. Android Auto will bring navigation and music control into your car’s dashboard, but it’s just mirroring the maps and music streams from your phone.  Android TV will play movies and search through IMDB, but your phone is the remote control.

All Five Senses (well, 3 out of 5 ain’t bad!)

Our brain doesn’t see or feel or move us directly.  It processes a signals from my nose that smell bacon, then sends signals back out to my legs that say “I want to go to there” and I start walking.  Likewise, my phone doesn’t track my steps, it’s using a sensor in an Android Wear device to log that info, then relay it back to the phone to make sense of it.  Then the phone/brain can say “well, it’s 6PM and you’ve only walked 6,000 steps today, it’s sunny and 75, so grab the dogs and go for a walk.”  It sends out a notification that interrupts me browsing Instagram and gets me moving.

We have virtually replicated three of the senses; we have cameras (sight), microphones (sound), and touchscreens (touch).  Our phones have sensors for all three, and these appendage devices tend to have at least two.

Input & Output

I got on board the Android train back with the G1, and I remember thinking how powerful this device was, even with that rough first-gen hardware.  In the office I was working on a simulator for a $25,000 drone platform for the Marine Corps, but for a couple hundred bucks I had just bought a computer fully integrated with a fast internet connection, location and orientation and acceleration sensors, hi-res E/O sensor (you’d call this a camera), proximity sensor, 2D touch sensor, and keyboard.  I could read the signals from all of these sensors, process them however I wanted, then feed signals back out using the display, LED lights, vibration, or sound.

Since then phones have added a few more inputs (fingerprint sensors, heart rate monitors, multiple cameras for 3D).  What we saw at I/O was a proliferation of these.  Android Wear adds inputs (voice, step counter, wrist motion, heart rate, touch) and outputs (display & vibration on your wrist).  Android Auto uses your car’s display and audio system for I/O.  Android TV uses your existing TV to add a 50″ display to your smartphone.

Why these new Appendages Matter

Some of these might seem like minor additions (why do I need a display on my wrist when my phone is right in my pocket?), but the power is in the context.  If I’m bored in the office, sure, I don’t mind pulling out my phone and reading through a stream.  But if I’m driving a car, looking down at my phone is a seriously dangerous distraction.  If, instead, I can tell my wrist “OK Google, navigate to my next meeting”, without taking my eyes of the road, we’ve enabled the brains of your smartphone to help in a new context where the smartphone itself can’t get the job done.

This may not be as life-changing as the jump from features phones to smart phones, but it is still an improvement.

Flipping the Network

I once worked in a lab where they wanted any user to be able to sit at any computer and start working.  So I was issued a hardware token (think of a smart card, or a USB plug – holding my private key) that I could plug into a computer; it would recognize me, load in my environment and preferences, and I could pick up working wherever I left off.  The central brain was in a server room, but I could use whatever computer was in front of me for I/O.  With Android, we’re flipping that around.  I can still use whatever device is handy for I/O, whether that’s my watch, my TV, my car; but now the central brain is sitting in my pocket with the phone, rather than in a server room.

So What

My point is that these new appendages shouldn’t be viewed on their own. They’re not replacements; you’re not going to get rid of your phone when you get a new watch.  Instead, the watch becomes additional input and output for your phone.  So don’t think of the watch’s utility as a watch, think of what it can do as extra I/O for your phone.

Jenkins CI broken on upgrade to Mac OS Mavericks

Putting this out there in case somebody has the same problem.  I upgraded my Jenkins box to OS X Mavericks, and Jenkins stopped responding; requests to localhost:8080 simply dropped.

After a bit of digging and dead ends, I found out that java wasn’t installed.  Running

javac -version

from the command line failed, and asked me to install Java.  I installed the lastest JDK, restarted jenkins with these commands:

sudo launchctl unload -w /Library/LaunchDaemons/org.jenkins-ci.plist
sudo launchctl load -w /Library/LaunchDaemons/org.jenkins-ci.plist

and everything seems to be back to normal.

Virginia Traffic outage

The Virginia Traffic app experienced an outage this weekend.  VDOT has changed their website significantly, which broke the Virginia Traffic’s app reading of their data.

I’ve mostly recovered, you should see incidents as before, though some incidents might not show up under the right regions.  I’m working on it.

The good news is that VDOT has added some very useful metadata to their data, so the app will be able to take advantage of this data in a future release.

24 Game Solver

My wife teaches elementary-school math, and I’m somewhat of a math nerd, so the 24 game is right up our alley.  Basically, you’re given four numbers, and you have to find a series of operations that makes 24 from those numbers.  For example, given 1, 2, 3, and 4, you might respond that  1*2*3*4 = 24.  Some sets of numbers are harder than others (much harder).

One day, my wife and her class were having trouble solving a particularly hard set, so she emailed me for help.  It took me a while to find the answer, and all the while I was thinking to myself “Self, I’m a programmer.  Why am I doing this the hard way?”  So now I’ve created the easy (cheater) way.  Go to http://jebware.com/24 input your 4 numbers, and it will tell you how to make 24.

Right now it does addition, subtraction, multiplication, division, and exponentiation.  However, it doesn’t understand the commutative property, so you’ll get a lot of answers that are essentially the same, like (1*2)*(3*4) and (4*3)*(2*1). I wrote it in javascript, and if you want the source or you want to improve on it, I made a repository on GitHub.

The “November Nor’easter”

That’s what the local news is calling it, at least. I went out yesterday and got some pictures. Keep in mind that I did this about five hours after high tide, so the water had already gone down a little bit from its morning peak.

These folks were trying to tow their minivan out of the water. I took this picture right after their rope snapped.
Police were blocking this street from both directions so that nobody would even try to get through. Which is probably good, because I saw people attempting some pretty stupid things.

Submerged cars. You’ll notice this becomes a theme.

These people were out taking pictures with their dog; I saw one of their pictures later on the local news’ website. I tried taking my dog along for this expedition, but she gave up after two blocks.

This vehicle wasn’t abandoned yet, I think the owner was still sitting in it.

Probably wishing you hadn’t parked your BMW on that particular block.

You want to know what’s sad? So far these pictures aren’t even tidal flooding. They’re just areas that don’t drain.
In the middle of this shot is Smith’s Creek. On the left is a road, Mowbray Arch a.k.a. the Smith’s Creek Annex. This is the only picture in this set with tidal flooding.

Remember that BMW? When I came back by a tow truck was fishing it out. I hear that the waiting list for tow trucks is getting pretty long.

“Neither rain, nor sleet, nor gloom of night”. What you can’t see in these pictures is that it was still raining hard. And the wind was blowing at 50 mph gusts.