Skip to course content
Free data visualization course

Data Visualization and Dashboard Storytelling

Unit 04.04: Ranking that hides how close the ranks are

A ranked list presents every gap as the same size.

Show the value, not only the rank

Five ranked scores where the top three are within half a point and fourth is sixteen points behind.

The code shows the gaps.

SCORES = {"A": 87.4, "B": 87.1, "C": 86.9, "D": 71.2, "E": 70.8}
ranked = sorted(SCORES.items(), key=lambda kv: -kv[1])

print(f"{'rank':>4} {'team':>5} {'score':>7} {'gap to next':>12}")
for i, (name, score) in enumerate(ranked):
    gap = score - ranked[i + 1][1] if i + 1 < len(ranked) else None
    print(f"{i + 1:>4} {name:>5} {score:>7.1f} "
          f"{'' if gap is None else format(gap, '>12.1f')}")

print("""
Ranks 1, 2 and 3 are separated by half a point. Ranks 3 and 4 are separated by
16. A ranked list presents all four gaps as identical steps.

Show the value, not only the rank -- or the reader treats "3rd" and "4th" as
comparable when one is a rounding error and the other is a different league.
""")

Ranks 1 to 3 are separated by rounding error. Ranks 3 to 4 are separated by a different league. A numbered list makes both look like one step.

This matters most where the ranking drives a decision - supplier selection, team performance, regional targets. Someone will act on being third rather than second, and here that difference is 0.3 of a point.

The mistake this prevents

The mistake is publishing a league table without the values, usually to avoid arguments about the numbers. It converts small differences into apparently meaningful ones, which produces worse arguments later.

Takeaway

Publish the value alongside the rank. Ranks compress every gap to the same visual step, including gaps that are rounding error.