Unveiling Body Compositions in Olympic Track and Field: Exploring Data Trends
health & fitness
analysis
code
data wrangling
R
data visualization
Visualization of the body composition of the athletes in different track and field events. Data from #TidyTuesday.
Published
February 5, 2023
As a passionate track and field athlete, I have always been curious about the correlation between body composition and performance in various events. In this data science project, I explore the realm of Olympic track and field by utilizing data from the Tidy Tuesday GitHub repository (July 27, 2021) to analyze the body compositions of medalists throughout the years.
Look at the code
# load packages and read in data from tidyTuesdaylibrary(tidyverse)library(colorspace)library(patchwork)library(DT)olympics <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-07-27/olympics.csv')# head(olympics)# I am interested in looking at track and field (athletics) medalistsathletics <- olympics %>%filter(sport=="Athletics",!is.na(medal))athletics$sex <-as.factor(athletics$sex)athletics_colnames <-c("ID", "Name", "Sex", "Age", "Height","Weight", "Team", "NOC", "Games", "Year","Season", "City", "Sport", "Event","Medal")DT::datatable(athletics, colnames = athletics_colnames, caption = htmltools::tags$caption(style ="caption-side: bottom; text-align: center;", htmltools::strong("Table 1: Olympic Track & Field Medalists")), filter ="top", options =list(pageLength =5, autoWidth =TRUE))
After filtering the data to focus on track and field medalists, I separated the athletes by sex and visualized their height and weight across different events using informative plots.
To simplify the analysis, I selected representative events and grouped them into categories such as Distance, Mid-Distance, Sprints, Jumps, and Throws. I then refined the visualizations, resulting in a cleaner and more understandable graph.
Look at the code
# there are so many events so lets choose a few events that represent some categories# distance: 10k, 5k# mid-distance: 800m, 1500m# sprints: 100m, 400m# jumps: long jump, triple jump# throws: shot put, discus, javelinathletics$event <-gsub("Athletics Women's ", "", athletics$event)athletics$event <-gsub("Athletics Men's ", "", athletics$event)athletics <- athletics %>%filter(event ==c("10,000 metres", "5,000 metres", "800 metres","1,500 metres", "100 metres", "400 metres", "Long Jump", "Triple Jump", "Shot Put", "Discus Throw", "Javelin Throw"))athletics %>%ggplot(aes(height, weight, color=event))+geom_point(alpha=0.5)
Look at the code
# this is still too much, let's group themathletics <- athletics %>%mutate(event_type =case_when( event %in%c("10,000 metres", "5,000 metres") ~"Distance", event %in%c("800 metres","1,500 metres") ~"Mid-distance", event %in%c("100 metres", "400 metres") ~"Sprints", event %in%c("Long Jump", "Triple Jump", "High Jump") ~"Jumps", event %in%c("Shot Put", "Discus Throw", "Javelin Throw") ~"Throws",))# now it's time to subset by sexathletics_f <- athletics %>%filter(sex=="F")athletics_m <- athletics %>%filter(sex=="M")# plot femaleathletics_f %>%ggplot(aes(height, weight, color=event_type))+geom_point(alpha=0.5)
This is a much easier graphic to understand so I decided to beautify it.
Look at the code
# putting it together(( p1 <- athletics_f %>%ggplot(aes(height, weight, color=event_type))+geom_point(alpha=0.75)+theme_minimal()+scale_color_discrete_qualitative("Dark 3")+labs(title="Body Composition of Female \nOlympic Medalists by Event\n", x="Height (cm)", y="Weight (kg)", color="Type of Track & Field Event") ))
The findings reveal fascinating trends. Female throwers generally exhibit larger body compositions, both in terms of weight and height, while distance runners tend to be smaller and lighter compared to other athletes. Jumpers, on the other hand, show either tall stature (likely due to high jumpers) or body compositions similar to sprinters. Short sprinters demonstrate a balanced distribution without extreme skewness in either height or weight, while mid-distance runners appear slightly lighter and shorter than their short sprinter counterparts. The sprinters, as a group, exhibit similar body types, with an average height of around 170 cm and weight of 60 kg.
Look at the code
# putting it together(( p2 <- athletics_m %>%ggplot(aes(height, weight, color=event_type))+geom_point(alpha=0.75)+theme_minimal()+scale_color_discrete_qualitative("Dark 3")+labs(title="Body Composition of Male \nOlympic Medalists by Event\n", x="Height (cm)", y="Weight (kg)", color="Type of Track & Field Event") ))
Similar patterns emerge among male Olympic medalists. Throwers dominate the upper right quadrant, indicating their tendency to be taller and heavier than other athletes. Like their female counterparts, male distance runners exhibit lighter and shorter body compositions. Jumpers and sprinters showcase comparable body types, with mid-distance runners falling between short sprinters and distance runners.
Interestingly, I was surprised to discover that throwers tend to be significantly taller than other athletes, as I initially assumed jumpers would be the tallest, given high jumpers’ requirements. The realization that distance runners tend to be shorter, which hadn’t caught my attention previously, suggests the importance of the height-to-weight ratio. Being lighter appears advantageous for distance runners, and a shorter stature contributes to achieving this goal.
These data align with my observations of track and field events. The trends indicate that specific events attract athletes with distinct body sizes, likely due to inherent advantages associated with their builds. This exploration sheds light on the relationship between body composition and performance, further deepening our understanding of the sport.
This project has been illuminating, combining my passion for track and field with data science techniques. Please reach out if you have intriguing project ideas or would like to collaborate. Let’s embark on compelling data-driven journeys together, unraveling new insights into whatever intrigues you.