mggg / VoteKit

A Swiss Army Knife for computational social choice research
https://votekit.readthedocs.io/en/latest/
MIT License
10 stars 12 forks source link

update pref profile visualization #115

Closed cdonnay closed 9 months ago

cdonnay commented 9 months ago
  1. Update some documentation.
  2. Change plot_summary_stats to have Frequency on y-axis and always print candidates in order they were inputted.
  3. Change PreferenceProfile data frame to have a Percent column. Removed Voter Share column, as this information can be read from the weight and the total weight. Update _sum_row method accordingly.
  4. Change PreferenceProfile head and tail methods to have an optional sort_by_weight parameter. Also automatically condenses ballots.
  5. Add received_votes parameter to get_candidates method of PreferenceProfile. Defaults to True; if True, only return candidate that received votes. If False (and self.candidates not None), return self.candidates.