From 87fa40f6a5d5f20a982399e5b8fe05cf31de327d Mon Sep 17 00:00:00 2001 From: Armin Samii Date: Tue, 9 Mar 2021 19:03:53 -0500 Subject: [PATCH] Clarify multiwinner vs singlewinner --- testData/expected-video-script.txt | 2 +- visualizer/graph/roundDescriber.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/testData/expected-video-script.txt b/testData/expected-video-script.txt index c5b74666..e15e29c9 100644 --- a/testData/expected-video-script.txt +++ b/testData/expected-video-script.txt @@ -1,5 +1,5 @@ Ranked Choice Voting Election Results\n\n\nCity of Eastpointe, Macomb County, MI -In this Ranked Choice Voting election, there were 5 rounds, after which Harvey Curley and Larry Edwards were elected. Here's what happened in each round. +In this Multi-Winner Ranked Choice Voting election, there were 5 rounds, after which Harvey Curley and Larry Edwards were elected. Here's what happened in each round. In the first round, Larry Edwards received the most votes. In the second round, People who voted for Write-In had their votes transferred to their next choice. Write-In had the fewest votes and was eliminated. Harvey Curley reached the threshold of 134 votes and was elected. In the third round, Harvey Curley received the most votes. Harvey Curley had more than enough votes to win, so to ensure no vote is wasted, 10 surplus votes were redistributed to other candidates. diff --git a/visualizer/graph/roundDescriber.py b/visualizer/graph/roundDescriber.py index 7e97550e..2a3586d6 100644 --- a/visualizer/graph/roundDescriber.py +++ b/visualizer/graph/roundDescriber.py @@ -221,11 +221,16 @@ def describe_initial_summary(self, isForVideo): finally: self.summarizeAsParagraph = originalSummarizeAsParagraph + if len(winners) > 1: + electionType = "Multi-Winner Ranked Choice Voting election" + else: + electionType = "Ranked Choice Voting election" + if isForVideo: - text = f"In this Ranked Choice Voting election, there were {numRounds} rounds, "\ + text = f"In this {electionType}, there were {numRounds} rounds, "\ f"after which {winnerText}. Here's what happened in each round. " else: - text = f"After {numRounds} rounds of this Ranked Choice Voting election, "\ + text = f"After {numRounds} rounds of this {electionType}, "\ f"{winnerText}. Move the slider to see what happened in each round." return text