A History of Preferential Voting in Australia
With the Australian federal election impending, once again it's time to ignore the personality contest and concentrate on reviewing the policies of the various contenders in your electorate. Reading some of the news comments by non-Australians reveals little is known about preferential voting and it's value to creating Australia's stable political system.
While this article by Antony Green is almost 6 years old, it's a nice summary of the Australian electoral system and it's preferential voting system. Most interesting is how different parties across the political spectrum have benefited over the years (since 1918) from preferential voting.
More locally, I recently helped Jill work on voting for a new logo for the NYC 4th St Food Co-op. This was a vote among members of the coop, this time using a preferential transferable vote, the results being gathered from a submission page within the Drupal content management system. We then used OpenSTV, an open source, single transferable voting software to count the vote. OpenSTV is great, with the ability to use it as a stand alone application or embed it behind a web-server. It provides a modular voting system model, so several transferable voting algorithms can be tested.
It did take a little munging of the data from the format it was originally received from the web site: higher number of points to indicate most preferred, to a different format of ranking preference by position on each line (this wasn't immediately clear, this comment clarifies the format). After exporting the file from Excel, this was done with a couple of lines of Octave, since I already had that package installed and Octave eats matrices for breakfast. In fact, all it consisted of was reading and sorting the file:
convert_voting_format.m % Octave code to convert format of results file to an OpenSTV ERS/BLT format file. points = load("logo_results.prn"); candidates = columns(points); votes = rows(points); % Convert to a voting ranking. ranking = candidates - points + 1; [sorted_votes, sorted_indices] = sort(ranking, 2, "ascend"); output_matrix = [ones(votes, 1), sorted_indices, zeros(votes, 1)]; % fprintf(f, "%d %d\n", votes, 1); save -text "logo_results.txt" output_matrix; % fprintf(f, "0\n"); % print the candidate names and the title.