Showing bar graph output for RCV (including Hare and BTR)
-
Has anyone attempted to show reasonable bar graphs to show how each candidate did on an instant runoff type election?
FPTP, Approval and Score all allow you to show a bar graph.
Sankey diagrams like the one below are neat, but they are kind of hard to take in compared to a plain old bar graph. They show more about the mechanics of the election rather than just "how each candidate did" relative to the other candidates.
It gets tricky with Condorcet, but at least with ones where there is a progression as there is in IRV, I think it can be done in a reasonable way.
Here's the same election, shown numerically rather than graphically.
For IRV-Hare, I'm thinking the logic below might work. The gist is, we do the regular IRV tabulation first, so we will be working with the numbers in the chart above.
We arbitrarily give the winner a final score, say 100. Then we work backwards, doing the last eliminated, then the one eliminated before that, and so on. At the stage where each candidate is eliminated, we give them a score based on how they are doing, on average, compared to all the candidates still in the race.
In more detail, based on the above election:
Start with the last round, that has Breed vs Leno, where Leno has about .98 times as many votes as Breed. (which caused Leno to be eliminated). So we give Breed a score of 100, and Leno 98.
Now look at the second to the last round, where Kim had been eliminated. The Kim to Breed ratio (at this stage, prior to Breed receiving any votes from Kim) is something like .6, Kim to Leno is like .8. So Kim's score will be the average of .6 * 100, and .8 * 98, which comes out to 69.2.
So now we move to the third to the last round, where Alioto is eliminated. Alioto's ratio to Breed here is about .17, her ratio to Leno is about .34, her ratio to Kim is about .35. So we give her a score of the average of .17 * 100, .34 * 98, and .35 * .62, which comes out to 24.85.
And continue on until we get all of them.
Of course, this means we need to run the initial tabulation out to the end, rather than stopping when a candidate gets 50%, but that's ok. (it doesn't change the outcome).
Obviously, the scores should always get lower as we go down the list. I can't immediately prove that this will always be the case..... but intuitively I think it should.
This would always leave the winner with a score of 100, but of course we could scale them so that they add up to 100, if we must show numbers.
It might get a bit more complicated with RCV-BTW (bottom two runoff).
Finally, if we want to get really fancy (and especially if it doesn't always have the numbers reflect their position, such as if a candidate could end up with a score that is higher than that of a candidate that was eliminated after them), there is an interesting twist. Each candidate, other than the top two, would get multiple scores. So Alioto would have 3 scores: her score relative to Breed, her score relative to Leno, and her score relative to Kim. This means that the bar chart would display her bar as "blurry".... it would have the lowest of these three scores shown fully opaque, then out to the middle score would be 67% opaque, then out to the highest score would be 33% opaque.
Any thoughts on this? (and are you able to visualize how this would work and look from my description prior to me coding it?)
-
And here is what I came up with:
I think it's pretty reasonable. It takes some time to compare it to the sankey diagram and see how it came up with the bar graph, but I think it came up with the right answer, if such a thing can exist.
-
Is this one BTR, @rob?
-
@rb-j No, just Hare, I have yet to process the full set of ballots, mine is based on the data that is visible in the Sankey diagram and the chart below it.
But I think I have an approach to doing it with a BTR election that should work fine. Obviously this doesn't show all information about the election, and there are cases where it may not really be reflective of what we want to show (I think the above way may be a bit misleading as to how far Jane Kim was behind Mark Leno -- she was very close to him in the round she was eliminated, and probably would have received the vast majority of his votes if he was eliminated, so she could have easily won against London Breed).
Another way of doing it, comes up with this:
In this case, Jane Kim is shown as closer to Mark Leno because her score is simply (66043 / 68707) (ratio of her score and Leno's in the round she was eliminated), times Mark Leno's already-calculated score. In other words, I don't average her ratio with London Breed's (times London Breed's score) into Kim's score in this simpler way of tabulating scores.
I think the logic should work fine with BTR. I think. Remember that I am proposing it purely as a simplified way to visualize an election, the scores are not suggested as determining the winner. I'd be interested in seeing if it holds up well when looking at atypical elections, such as when there is no Condorcet winner or a case like B******ton 2009.
Ultimately, what I want to show is "how close was each candidate to winning?" Which might be measured as "how many ballots would need a single change -- i.e. reverse the order of two adjacent candidates -- to make this candidate win under this method?"
That's a lot harder to actually calculate, though. So this is kind of an approximation.
-
This post is deleted!