Various analysis and visualizations (like Sankey diagrams) would benefit from having information stored on how many votes are transferred between candidates in each round.
If a single candidate is eliminated per-round, the ElectionResults object has enough data to reconstruct this information. However, sometimes multiple candidates are eliminated in a round, and I do not see how to recover how the vote shifts can be attributed back to each eliminated candidate. Of course, I may have missed something.
One approach would be to have the ElectionManager.transfer_votes be called prior to register results, and having it store the additional information. Care has to be taken that the transfer can shift excess votes for elected candidates. I will implement this and create a PR, but happy to hear ideas or constructive criticism.
Various analysis and visualizations (like Sankey diagrams) would benefit from having information stored on how many votes are transferred between candidates in each round.
If a single candidate is eliminated per-round, the ElectionResults object has enough data to reconstruct this information. However, sometimes multiple candidates are eliminated in a round, and I do not see how to recover how the vote shifts can be attributed back to each eliminated candidate. Of course, I may have missed something.
One approach would be to have the ElectionManager.transfer_votes be called prior to register results, and having it store the additional information. Care has to be taken that the transfer can shift excess votes for elected candidates. I will implement this and create a PR, but happy to hear ideas or constructive criticism.