Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store inter-round data for sankey diagrams #20

Open
chrisroat opened this issue Mar 4, 2022 · 0 comments
Open

Store inter-round data for sankey diagrams #20

chrisroat opened this issue Mar 4, 2022 · 0 comments

Comments

@chrisroat
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant