The United States, if we drew voting districts using a split line method

Does your vote count? It might not, if you live in a gerrymandered district.

By creatively redrawing electoral districts, politicians and parties can disenfranchise their opposition, ensuring that those votes ultimately don’t count. For instance: if you take a swing district and redraw the lines so a lot of the Republicans are in a neighboring, mostly Democrat district, it might not be a swing district anymore. 

The problem has been around for almost as long as representative democracy itself. In recent years, a new solution has emerged: If humans are so prone to bias and corruption, why do they need to be involved in the redistricting process in the first place? Why not write computer programs to draw districts algorithmically?

Several civically-minded programmers have addressed the issue. It shouldn’t be surprising that these new methods have been gotten a fair amount of attention. There are few things sexier than vigilante technologists hacking a better democracy. Writing of one such tool called BDistricting, the Washington Post’s Christopher Ingraham proclaimed with glee, “This computer programmer solved gerrymandering in his spare time.”

Unfortunately it’s not quite that easy: gerrymandering might not be quite so easily ‘solved.’ Algorithmic methods may be less biased than human district-drawers, but they often result in even less fair elections.

A Brief History of the Gerrymander

The original gerrymander (Wikipedia)

In 1812, Elbridge Gerry (pronounced like the name “Gary”) was the governor of Massachusetts. Gerry was neither a Democrat nor a Republican, because neither of those parties existed yet. He belonged to the Democratic-Republican party, which at the time was one of the two largest political parties in the nation.

In addition to the governorship, the Democratic-Republicans also controlled the Massachusetts state legislature. When given the opportunity, these 19th Century politicians did what most incumbents still do: they passed a pretty implausible plan to redistrict the Massachusetts state senate, designed to favor the Democratic-Republican party in future elections.

In designing the districting plan, the Massachusetts state legislature employed the same techniques gerrymanderers do today. From a piece in the New York Times:

"Gerrymandering is not hard. The core technique is to jam voters likely to favor your opponents into a few throwaway districts where the other side will win lopsided victories, a strategy known as 'packing.' Arrange other boundaries to win close victories, 'cracking' opposition groups into many districts."

An effectively “packed” district (TED-Ed)

Some of the districts stretched into very odd shapes to pack opposition voters into a few districts, or they cracked up large groups of opposition voters into several districts in which they’d barely comprise the minority. Even Governor Gerry said the 1812 plan was “highly disagreeable.” But he signed it into law anyways.

The Federalists were the Democratic-Republican’s opposing party. Upon Gerry’s redistricting, the Federalists were outraged. The above political cartoon ran in the Boston Gazette. It points out one district in Essex County, which so heinously slithered around geographically proximal voters that they said it looked like a salamander. Since Elbridge Gerry had approved the plan, and belonged to the party that wrote it and benefitted from it, the cartoonists held him responsible for it.

They characterized the voting district as a political monster, naming it with the portmanteau: gerrymander. (Fun fact: Though most people now pronounce the “g” in “gerrymander” like the “j” in “Jerry Seinfeld,” Gerry’s name was actually pronounced with a hard “g.”)

The election that year was a loss for Gerry, who -- hindered by the mounting War of 1812, libel allegations, and effective Federalist criticism of redistricting -- failed to win re-election. But it was a “win” for gerrymandering. Democratic-Republicans maintained control of the state senate, aided by the partisan redistricting.

The man who put the “Gerry” in gerrymander (Wikipedia)

Though it coined a term for the phenomenon, the Massachusetts state senate was a mere shadow of the extreme and widespread gerrymandering to come. Gerrymandering even survived the party that invented it. “[In the latter 19th Century,] the Republican Party used its control of Congress to secure the admission of more states in territories friendly to their party,” Wikipedia says, “the admission of Dakota Territory as two states instead of one being a notable example.”

Today, partisan redistricting is deeply ingrained in the political process. And in some cases, it’s very effective. In writing about the effectiveness of gerrymandering, Sam Wang of the Princeton Election Consortium gave the example of the Pennsylvania congressional election of 2012. Democrats won more than half of the statewide vote, but only 5 out of 18 House seats. Democrats who won did so by a much larger margin than Republicans who won. This is one of many victories for the Republican Party’s 2012, $30 million redistricting effort. From a Republican State Leadership Committee memo:

"Controlling the redistricting process in these states would have the greatest impact on determining how both state legislative and congressional district boundaries would be drawn. Drawing new district lines in states with the most redistricting activity presented the opportunity to solidify conservative policymaking at the state level and maintain a Republican stronghold in the U.S. House of Representatives for the next decade."

Gerrymandering is alive and well. It’s still the case that if a voting district looks wonky, it’s probably because that wonkiness served the interests of the politicians who drew it.

Computers Can “Know It When They See It,” Too

Maryland’s 2nd district, in black, was found to be the most gerrymandered in the United States, circa 2010, (John Mackenzie)

The pop advice on recognizing gerrymandering is of the “know-it-when-you-see-it” variety. One TED-Ed video recommends looking up your own voting district and asking yourself: “How wide does your district stretch across your state?” “How many other districts does your district touch?” and “Does my district look like a salamander?”

But Chris Fedor, a programmer working in San Francisco, says that you can actually quantify “looking like a salamander.”

“Just compare the ratio of the perimeter to the area for each voting district,” Fedor writes. “If this ratio is large, it is likely due to a legislator drawing very particularly lines to incorporate or exclude very particular sets of people into a very particular district.”

Fedor isn’t the only person to have noticed this. John MacKenzie, professor of economics and geographic information systems at University of Delaware, used a similar ratio -- partially discounting natural boundaries like rivers and coasts -- to algorithmically determine which districts in the nation were the most gerrymandered. And Chris Ingraham uses a similar method when ranking districts.

Some of the most gerrymandered districts in the US -- in red and black -- circa 2010, (John Mackenzie)

The flip-side of being able to automatically measure gerrymandering is that you can write a computer program to avoid it. In fact, you can write several.

People have come up with many methods of drawing voting districts that help minimize the perimeter-to-area ratio. One is the splitline method visualized at the top of this article. The splitline method finds the shortest line that divides a region as closely as possible into two equally populous groups. You then repeat the method to continue subdividing those groups until you have voting districts of the desired size. People have developed variations on the splitline method to respect things like census tracts and people's houses.


North Carolina voting districts drawn with splitline method (

Another is the BDistricting tool developed by Brian Olson and featured in the Washington Post. His method draws districts specifically with compactness in mind. He made a solver to iteratively minimize the distance from the perimeter of a voting block to its center.

North Carolina with the BDistricting method, which optimizes for compactness (Olson)

These algorithmic methods do work to automatically draw geographically compact districts of equal population or voting population. Split line districts and districts drawn using BDistricting are much more geographically compact than the actual legal voting districts, and have lower perimeter-to-area ratios.

The problem is that this might not actually be enough to achieve fairer elections. In fact, the computers might do more damage than the politicians have.

The Trouble With Machine-Made Districts

Gerrymandering illustration, (Stephen Nass)

“There are a lot of theories and talk and hand waving about what a 'fair' districting system looks like,” Fedor says, “but less actual testing. When you do test, a lot of these things that seem like they should be an improvement, are probably not really.”

Fedor says the real problem with gerrymandering is that it results in representation far afield from the actual political makeup of a state. Depending on how districts are drawn, a state that’s 60% one party and 40% of another could boil down to 100% representation of the majority party, which wouldn’t be right. Or, under a different scheme, 60% of the state could go to the minority party, which wouldn’t be right either.

According to Fedor’s research, it turns out that with many of these compactness-optimizing methods, you still end up with elections that end up very different than the actual political makeup of the state.

“Unbiased redistricting,” he says, “isn’t necessarily fair redistricting.”

To test the ‘fairness’ of each districting scheme, Fedor looked at the redrawn districts in his home state of North Carolina under several different schemes. Because North Carolina has a famously high average perimeter-to-area ratio, Fedor examined some real-world districting schemes: the 112th Congress, the 114th Congress. He also brought in the hypothetical methods of districting: splitline districts, Olson’s “optimal compactness” BDistricting districts, and a method of his own that randomly grouped contiguous voting blocks into districts.

Then, Fedor used historical election data to simulate the 2008 and 2010 senate votes across the real and hypothetical districting schemes: if the districts were drawn this way, and the same votes cast, how would the election have gone?

He compared the results of these votes to a standard of fairness for the state: the popular vote. According to this standard, if 60% of a state votes Democrat, and 40% of the state votes Republican, a perfectly fair districting scheme would award 60% of the seats to Democrats, and 40% of them to Republicans. (Sam Wang also employed this standard in his recent New York Times editorial).

Proximity to the blue line indicates “fairness” of the vote. Actual districting schemes are in purple, alternative schemes in orange; (Fedor)

It turned out that the algorithmically drawn districting systems deviated even farther from representing the popular vote than the actual districts did. Fedor writes:

“In both the 2008 and 2010 elections, the actual districts used by the 111th Congress […] were in fact about as fair as you could reasonably expect from a voting system based on contiguous geographies.” 

“[That’s] despite how they may look and despite how they had been described,” he adds, referencing the swell of criticism over partisan redistricting. The problem is that it wasn’t just that politicians had drawn the districts in a biased fashion: the human geography of the state itself was biased, too. As in the rest of the United States, Democrats tend to be concentrated in urban districts, which has its disadvantages in an election: 

“Winning an urban district with 80% of the vote has no more impact on representation than winning the district with 55% of the vote. When a state is competitive statewide, those extra votes from imbalanced districts can't help Democrats across the state.”

In this example, Democrats have essentially “packed” themselves together into districts already -- no salamander-esque districts required.

The Real Solution to Gerrymandering?

Fedor’s standard of fairness isn’t perfect. It assumes that within a state, candidates are more or less interchangeable within their party – one Democrat just as good as the other. But in today’s increasingly partisan political climate, that might not be far off.

When it comes to policy reform, data matters. Fedor’s research demonstrates that a key part of technology improving our democracy is actually testing technological solutions. If we assume that something that ‘seems right’ must be an improvement on the current system, with its obvious flaws and vulnerability to exploitation, we might accidentally end up worse off than where we started. Or, more likely, we end up concentrating our efforts on the wrong reform.

Fedor chose to focus on North Carolina in his post because the data was particularly clean and accessible. But he has run his analysis on other states and says the phenomenon bears out. In his post on the subject, Fedor volunteers to help would-be redistricters test the merits of their various proposals. He says it’s possible somebody will come up with a scheme that works. But he’s more inclined to the opinion that gerrymandering isn’t the true culprit here.

“Having voting districts based on contiguous geographies lets very small swings in vote totals create really wild swings in representation,” Fedor says. “Probably the only way to reliably avoid that is to move away from this kind of winner-take-all, geographic districting.”


Our next post is about the geographic trends of the black American Great Migration, linking today's urban communities to the mass exodus from the South between 1910 - 1970. To get notified when we post it   join our email list.

This post was written by Rosie Cima. You can follow her on Twitter here.

Woah. We are flattered you shared our blog post!

If you want to be notified when we write a "halfway decent" blog post in the future, leave your email here below.