The shortest splitline algorithm is a solution to gerrymandering
[1]If you don't know what gerrymandering is, the Washington Post has an easy to follow explanation. proposed by the Center for Range Voting in 2007. The algorithm divides a given region into a set number of districts through iterated implementation of a simple process: A district will be divided into two districts by whatever is the shortest line needed to split it into two districts of equal population, or with a specified population ratio if dividing a region into an odd number of districts. CGP Grey created
a video explaining the algorithm in 2011, which is where I first heard about it, and the
Center for Range Voting provides maps that show how each of the 50 US states would look with the algorithm applied.
There are various issues with the algorithm,
[2]It ignores geographic and cultural boundaries that typically make representative democracies feel representative, and it often splits cities in ways that diffuse their voting power. but out of curiosity, I decided to try applying the algorithm to the entire world to see how a hypothetical global democracy could implement range voting without the possibility of gerrymandering.
Below is an implementation of the algorithm to divide the world into seven regions of equal population:
Population data is from 2015, so each region had about one billion people.
Going a step further, I then divided the world into one hundred regions, each making up one percent of the world's population:
Each region here had about 73 million people.
The python script I used and some of the population data is available on github here:
https://github.com/geobica/bl/tree/master/shortest_splitline