Sport Climbing at Tokyo 2020, Part III: Rank Swapping

sport climbing 2020 olympics rankings

A competition of small margins.

Quang Nguyen https://github.com/qntkhvn
August 7, 2021

This is the third post in a series about sport climbing at the 2020 Summer Olympics. In the first and second blog posts, I analyzed the ranking system of sport climbing using both simulated data and historical results from recent tournaments. This time, I’m going to continue to address the limitations of this scoring format, utilizing brand new data from Tokyo 2020.

Introduction

Sport climbing at Tokyo 2020 has concluded, and it can only mean one thing: there’s more data to analyze. Previously, I pointed out several problems with sport climbing’s scoring system; in particular, the disadvantage that speed climbers are facing under this format, and how this ranking system violates the independence of irrelevant alternatives property. (i.e. there’s great dependence on irrelevant (lower-ranked) climbers).

In this edition, I’m going to conduct a sensitivity (what-if) analysis on the overall results of sport climbing at the 2020 Summer Olympics. The main motivated question for this post is: “What would happen to the overall rankings if the ranks within an individual climbing discipline are being swapped?”

Analysis

Data Prep

The analysis that follows is going to center around the men’s finals of sport climbing at Tokyo 2020. The data were obtained from the Wikipedia page of the men’s event (here’s the scraping script if you’re interested).

Show code
library(tidyverse)
theme_set(theme_light())

mf <- read_csv("https://raw.githubusercontent.com/qntkhvn/climbing/main/data/2020_olympics/mf.csv") %>% 
  mutate(climber = paste(str_sub(climber, 1, 1), word(climber, -1))) # shorten climber's name

Let’s begin by writing a helper function to perform rank swapping to the final standings.

Show code
climbing_swap <- function(df, ranks = c(1, 2)) {
  speed_swap <- df %>% 
    select(climber, overall, speed, bouldering, lead, total) %>% 
    mutate(speed = ifelse(speed == ranks[1], ranks[2],
                  ifelse(speed == ranks[2], ranks[1], speed)),
           total = speed * bouldering * lead,
           overall = rank(total, ties.method = "first"),
           type = paste("Swap speed ranks", ranks[1], "&", ranks[2]))
  
  bouldering_swap <- df %>% 
    select(climber, overall, speed, bouldering, lead, total) %>% 
    mutate(bouldering = ifelse(bouldering == ranks[1], ranks[2],
                          ifelse(bouldering == ranks[2], ranks[1], bouldering)),
           total = speed * bouldering * lead,
           overall = rank(total, ties.method = "first"),
           type = paste("Swap bouldering ranks", ranks[1], "&", ranks[2]))
  
   lead_swap <- df %>% 
    select(climber, overall, speed, bouldering, lead, total) %>% 
    mutate(lead = ifelse(lead == ranks[1], ranks[2],
                          ifelse(lead == ranks[2], ranks[1], lead)),
           total = speed * bouldering * lead,
           overall = rank(total, ties.method = "first"),
           type = paste("Swap lead ranks", ranks[1], "&", ranks[2]))
   
   swap <- df %>% 
     mutate(type = "Original") %>% 
     bind_rows(speed_swap) %>% 
     bind_rows(bouldering_swap) %>% 
     bind_rows(lead_swap) %>% 
     mutate(climber = fct_rev(factor(climber, levels = df$climber)),
            medal = ifelse(overall == 1, "gold",
                        ifelse(overall == 2, "silver",
                               ifelse(overall == 3, "bronze", "none"))),
            type = factor(type, 
                          levels = c("Original",
                                     paste("Swap speed ranks", ranks[1], "&", ranks[2]),
                                     paste("Swap bouldering ranks", ranks[1], "&", ranks[2]),
                                     paste("Swap lead ranks", ranks[1], "&", ranks[2]))))
   return(swap)
}

Swapping ranks 1 and 2

Let’s first filter out the 8th-ranked climber (Bassa Mawem), since he got injured before the start of the finals; hence was not able to play for a medal and was placed 8th in all three events. Thus swapping the top 2 in any event is not going to affect his score line. (Why didn’t they replace him with somebody else? If they did, would they use the qualification results with or without him? That’s something to think about.)

Show code
mf_swap_12 <- climbing_swap(mf, ranks = c(1, 2)) %>% 
  filter(overall < 8)

Now I’m going to make a couple of plots to illustrate the changes to the overall orderings of climbers after switching the first and second positions in each of the three climbing concentrations. First, below is a figure of multi-panel plots showing the modified leaderboard in each case after swapping alongside the original final standings.

Show code
mf_swap_12 %>% 
  ggplot(aes(x = climber, y = total, fill = medal)) +
  geom_col(show.legend = FALSE) +
  geom_text(aes(label = overall), hjust = -0.2, size = 3) +
  coord_flip() +
  facet_wrap(~ type) +
  scale_fill_manual(values = c("#A77044", "#FFD700", "#95BFE5", "#C0C0C0")) +
  labs(subtitle = "Modified rankings after swapping ranks 1 and 2 - Tokyo 2020 Men's Finals",
       y = "Score",
       x = NULL) +
  theme(strip.background = element_rect(fill = "midnightblue"))

And second, here’s a bump chart showing the rankings across the different types of rank modification.

Show code
library(ggbump)
mf_swap_12 %>% 
  ggplot(aes(type, overall, group = climber, color = climber)) +
  geom_bump(size = 3, smooth = 20) +
  geom_point(size = 5) +
  scale_y_reverse(breaks = 1:7) +
  scale_x_discrete(labels = c("Original", "Swap speed", "Swap bouldering", "Swap lead")) +
  theme(axis.title = element_blank()) +
  scale_color_ordinal() +
  labs(subtitle = "Modified rankings after swapping ranks 1 and 2 - Tokyo 2020 Men's Finals")

There are lots of stories to tell from the two figures above. The two major ones are:

The margin of victory is as narrow as it could get. Anyone could have gone from hero to zero (and vice versa) very quickly. Crazy. Wild. Insane.

Citation

For attribution, please cite this work as

Nguyen (2021, Aug. 7). The Q: Sport Climbing at Tokyo 2020, Part III: Rank Swapping. Retrieved from https://qntkhvn.netlify.app/posts/2021-08-06-climbing-p3-swapping

BibTeX citation

@misc{nguyen2021sport,
  author = {Nguyen, Quang},
  title = {The Q: Sport Climbing at Tokyo 2020, Part III: Rank Swapping},
  url = {https://qntkhvn.netlify.app/posts/2021-08-06-climbing-p3-swapping},
  year = {2021}
}