/vote-card

Primary LanguagePython

vote-card

June 2019

This project was originally conceived of as a vote-below-the-line-card generator for the Australian Senate. The idea was to use the They Vote For You API to pull data on the voting patterns of Australian parliamentarians, and base the recommendations on a quantitative analysis of the user's political beliefs and the actual voting patterns of parliamentarians. In this way I hoped to remove the effect of misinformation generated by differences between how politicians speak and act on the one hand, and how they vote on the other. I also hoped to minimize the impact of our prejudices and biases.

The program asks the user to score a random selection of N policies based on agreement with a statement of that policy, and the importance of the issue. It does a similar calculation for every Australian parliamentarian in the House of Representatives and the Senate, and computes the user's weighted Euclidean distance (in an N-dimensional space) to each of those parliamentarians. The distance in each dimension represents the extent to which the user agrees or disagrees with a given parliamentarian, while the weighting captures the importance; in this way, for example, disagreement on an issue which is deemed important counts for more than one which is unimportant.

Unfortunately, this idea has a flaw: only incumbent politicians have a voting history in parliament, and so a vote-card generated in this fashion necessarily excludes anyone running for the first time. Since I could never find a solution for this, I decided to leave it as a more light-hearted who-is-your-political-spirit-animal generator.

Example output: (parliamentarian, party, normalised distance)

Five closest

  1. Andrew Wilkie, Independent, 0.2329
  2. Terri Butler, Australian Labor Party, 0.2338
  3. Andrew Bartlett, Australian Greens, 0.2348
  4. Kerry Nettle, Australian Greens, 0.2355
  5. Lisa Chester, Australian Labor Party, 0.2400

Five farthest

  1. Michelle Landry, National Party, 0.9968
  2. Keith Pitt, National Party, 0.9981
  3. David Gillespie, National Party, 0.9981
  4. Andrew Broad, National Party, 0.9981
  5. Jason Wood, Liberal Party, 1.0000