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

add district_winner_matrix() function #13

Merged
merged 3 commits into from
Jan 31, 2025
Merged

Conversation

polettif
Copy link
Owner

This PR adds a function to find district winners (i.e. parties that got the most votes in a district). district_winner_matrix(votes_matrix) returns a corresponding logical matrix. A base implementation has been used with the winner-take-one method, now a public facing method is exported which might help with modelling and troubleshooting.

Also, I clarified the wto docs that district winners need enough seats from the upper apportionment (brought up in #12). There is no change in behavior.

@polettif polettif merged commit c4779d3 into master Jan 31, 2025
1 check passed
@polettif polettif deleted the dev/district_winner_matrix branch January 31, 2025 12:22
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

Successfully merging this pull request may close these issues.

1 participant