Assignment 3 - BC Votes

Matt Hemmings

Ryan Schafer

Adrian Kilian

Lucas Vasilakopoulos

Nicholas Turner

Mike Anderson

Jason Jubinville

Problem 1)

Before solving this problem, we developed a Python script to help us find adjacent districts where gerrymandering was an option. This script computed adjacent electoral districts by scanning the KML data of their voting areas and looking for adjacencies. Then, the script examined the list of adjacent electoral districts, looking for ones where the winning party did so by less than 50% of the total votes, suggesting a weak riding that could be gerrymandered, and reported those districts along with all adjacent districts. This provided a human-readable output that made finding potential gerrymandering opportunities much easier.

Sample output from the gerrymandering Python script. Non-indented districts are potential swing ridings, while the following indented districts are adjacent ridings.

This script produced a somewhat unfortunate result: gerrymandering electoral districts by swapping voting areas is relatively difficult. In general, voting areas tend to be surrounded by other voting areas with similar political leanings, even across district boundaries. Many districts at first glance appeared to be easy to gerrymander, with weak swing ridings adjacent to strong fortress ridings for the other party, but on closer examination we discovered that the voting areas along the border showed little variation in political allegiance.

Originally, we decided to gerrymander the electoral district of Boundary-Similkameen in the 2009 election.. Their high turnout of 17838, representing 61% of registered voters, was split very evenly between the Liberals and NDP. The Liberals won the riding with 6681 votes to the NDP’s 5870, a spread of only ~800 votes. With an average of 200-300 voters in each voting area, we predicted that changing approximately 2-3 voting areas would be sufficient to swing the district in the NDP’s favour. Moreover, our script revealed that the district was bounded by two NDP strongholds, in Fraser-Nicola and Kootenay West, suggesting that some voting areas might exist along the boundary to be swapped.

Sadly, these two fortress ridings have relatively sparse boundaries with Boundary-Similkameen, with only a handful of geographically-large voting areas straddling the border. These voting areas did not contain enough total voters to swing the district, and manual examination of the geography showed that we couldn’t swap the strongest bordering Liberal ridings anyways. Ultimately, we were forced to abandon Boundary-Similkameen as ungerrymanderable.

Further analysis revealed a strong candidate for gerrymandering: the riding of Delta South. In 2009, Delta South was won by an independent, Vicki Huntington, with 9977 votes, compared to the 9945 for the Liberal candidate Wally Oppal. This mere 32-vote spread suggested a very easy gerrymandering opportunity, especially with our adjacency script showing no fewer than 5 adjacent ridings where the Liberals won 50% or more of the votes.

Two of these fortress ridings, Richmond Centre and Richmond-Stevenson, turned out to only border a single voting area in Delta South, rendering them useless for gerrymandering. Richmond East has 3 voting areas bordering 6 voting areas in Delta South, and Richmond East also has a surplus of ~4000 Liberal votes to share. Unfortunately, the only ridings that can be swapped while retaining district continuity are Liberal strongholds.

Ultimately, the extremely narrow nature of Delta South’s race allowed it to be gerrymandered successfully with Surrey-White Rock, to the east. Surrey-White Rock was a crushing victory for the Liberals, with 15121 votes to the NDP’s 6668. Only 2 voting areas in Delta-South border 5 areas in Surrey-White Rock, making it a sub-par choice for gerrymandering. By swapping Surrey-White Rock voting area 001 with Delta South voting area 112, we get the following results:

Voting area votes

Liberal votes

Independent votes

Surrey-White Rock VA 001

157

N/A

Delta South VA 112

71

45

Gerrymandering results

Liberal votes

Independent votes

Winner

Surrey-White Rock (pre-edit)

15 121

0

LIB

Delta South (pre-edit)

9945

9977

IND

Surrey-White Rock (post-edit)

15 207

45

LIB

Delta South (post-edit)

10 031

9932

LIB

Delta South is difficult to gerrymander due to the low number of voting areas along the border. The results above are possible only because the riding was extremely close, with a mere 32 votes deciding the winner of the electoral district. We should also mention that the newly-crafted Delta South riding makes very little geographic sense; the original district is bordered by large bodies of water, making for logical geographical boundaries, while the new riding stretches across Boundary Bay to grab a tiny portion of land on the east bank.

The example of Delta South also showed a weakness of the electoral district adjacency script. Our script reports the percentage of votes held by the winning party, not the vote spread. Delta South’s rating of 42% for the Independent candidate actually looks difficult to gerrymander, until one realizes that the Liberals also received 42% of the vote, with a mere 32 votes deciding the winner of the district. In the future, we would examine the difference between the winning and runner-up party, instead of simply considering the winning party’s percentage.

Further automation would be done using a genetic algorithm. We actually debated this for a term project, before changing focus due to ethical as well as practical considerations. A genetic algorithm would start from a base case, the actual results of the province, and would then begin swapping voting areas at random and checking if the results were improved. With the district and voting area adjacencies found through our Python scripts, our algorithm’s mutator would always produce legal voting area swaps, so our only rating condition would be whether each swap was useful. We decided not to write this algorithm as a term project because of the ethical problems of producing a tool that would help violate integral aspects of representative democracy, as well as the practical issues of our test script (the one used above) revealing only a dozen or so electoral districts that seemed open to gerrymandering.

Problem 2)

The electoral district Peace River North, consistently has the worst voter turnout over all of the electoral districts in BC. This includes data from the 2001, 2005, and 2009 elections. Unfortunately, the data for 2013 was not available, however, the trend would put it again at the lowest voter turnout. Our team considered several reasons why Peace River North might have such low turnout numbers. Firstly, it is the furthest electoral district from Victoria and the legislative buildings. It could be that geographic separation from the capital city promotes an apathetic response to electoral procedures. Furthermore, it is possible that type of work in the Peace River region draws individuals that are generally apolitical. Finally, it is possible that the voting booths are more inconvenient to visit for individuals who live outside of the Fort St. John area.

Problem 3)

To improve the site for the visually impaired, several options could and should be used (in no particular order):

- Introduce a slider bar to modify the text size

- Increase the size of a region when the user moves the mouse over it

- Read the name and results for a region when the user moves the mouse over it

- Change the colours to increase contrast and promote visibility

- Represent the differences between the categories as symbols, such as diagonal lines, strips, polka dots, etc.

Incorporating these concepts into the site will allow users with declining eyesight to interact with the data appropriately.

Problem 4)

After writing a script to parse the google fusion data (included in this upload), we got the following for 2009:

NDP could win in Abbotsford-Mission if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** NDP could NOT win in Abbotsford South if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Abbotsford West if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Alberni-Pacific Rim if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Boundary-Similkameen if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Burnaby-Deer Lake if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Burnaby-Edmonds if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Burnaby-Lougheed if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Burnaby North if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Cariboo-Chilcotin if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Comox Valley if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Coquitlam-Burke Mountain if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Coquitlam-Maillardville if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Cowichan Valley if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Delta North if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Delta South if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Esquimalt-Royal Roads if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

*** NDP could NOT win in Fort Langley-Aldergrove if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

LIB could win in Fraser-Nicola if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Cariboo North if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Chilliwack if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Chilliwack-Hope if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Columbia River-Revelstoke if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Juan de Fuca if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Kamloops-North Thompson if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Kamloops-South Thompson if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Kelowna-Lake Country if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** NDP could NOT win in Kelowna-Mission if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Kootenay East if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Kootenay West if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Langley if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Maple Ridge-Mission if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Maple Ridge-Pitt Meadows if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Nanaimo if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Nanaimo-North Cowichan if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Nechako Lakes if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Nelson-Creston if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

LIB could win in New Westminster if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in North Coast if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in North Island if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in North Vancouver-Lonsdale if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** NDP could NOT win in North Vancouver-Seymour if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Oak Bay-Gordon Head if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Parksville-Qualicum if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

IND could win in Peace River North if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** NDP could NOT win in Peace River South if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Vancouver-Point Grey if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** NDP could NOT win in Vancouver-Quilchena if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

LIB could win in Vancouver-West End if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Vernon-Monashee if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Victoria-Beacon Hill if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

*** LIB could NOT win in Victoria-Swan Lake if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

*** NDP could NOT win in West Vancouver-Capilano if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

*** NDP could NOT win in West Vancouver-Sea to Sky if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Westside-Kelowna if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Penticton if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Port Coquitlam if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Port Moody-Coquitlam if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Powell River-Sunshine Coast if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Prince George-Mackenzie if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Prince George-Valemount if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Richmond Centre if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Richmond East if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** NDP could NOT win in Richmond-Steveston if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Saanich North and the Islands if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Saanich South if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Shuswap if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Skeena if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Stikine if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** NDP could NOT win in Surrey-Cloverdale if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

LIB could win in Surrey-Fleetwood if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Surrey-Green Timbers if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

*** LIB could NOT win in Surrey-Newton if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Surrey-Panorama if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Surrey-Tynehead if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Surrey-Whalley if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

*** NDP could NOT win in Surrey-White Rock if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

NDP could win in Vancouver-Fairview if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Vancouver-False Creek if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Vancouver-Fraserview if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Vancouver-Hastings if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Vancouver-Kingsway if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

NDP could win in Vancouver-Langara if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

LIB could win in Vancouver-Kensington if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009

*** LIB could NOT win in Vancouver-Mount Pleasant if they can encourage a similar percentage of their nonvoters without encouraging their opponent's nonvoters in 2009 ***

The script can also be run for other years with the same table columns