This is a historical dataset on the modern Olympic Games, from Athens 1896 to Rio 2016. Each row consists of an individual athlete competing in an Olympic event and which medal was won (if any).
Not sure where to begin? Scroll to the bottom to find challenges!
suppressPackageStartupMessages(library(tidyverse)) read_csv('data/athlete_events.csv.gz', show_col_types = FALSE)
|id||Unique number for each athlete|
|sex||M or F|
|age||Age of the athlete|
|noc||National Olympic Committee 3|
|games||Year and season|
|season||Summer or Winter|
|medal||Gold, Silver, Bronze, or NA|
Don't know where to start?
Challenges are brief tasks designed to help you practice specific skills:
- 🗺️ Explore: In which year and city did the Netherlands win the highest number of medals in their history?
- 📊 Visualize: Create a plot visualizing the relationship between the number of athletes countries send to an event and the number of medals they receive.
- 🔎 Analyze: In which sports does the height of an athlete increase their chances of earning a medal?
Scenarios are broader questions to help you develop an end-to-end project for your portfolio:
You are working as a data analyst for an international judo club. The owner of the club is looking for new ways to leverage data for competition. One idea they have had is to use past competition data to estimate the threat of future opponents. They have provided you with a dataset of past Olympic data and want to know whether you can use information such as the height, weight, age, and national origin of a judo competitor to estimate the probability that they will earn a medal.
You will need to prepare a report that is accessible to a broad audience. It should outline your steps, findings, and conclusions.
✍️ If you have an idea for an interesting Scenario or Challenge, or have feedback on our existing ones, let us know! You can submit feedback by pressing the question mark in the top right corner of the screen and selecting "Give Feedback". Include the phrase "Content Feedback" to help us flag it in our system.
In this report, I will move forward with one of the basics of Olympics data.
# Read the dataset library(tidyverse) olympics <- read_csv('data/athlete_events.csv.gz', show_col_types = FALSE) # Group the data by year and calculate the average height height_by_year <- olympics %>% filter(!is.na(height)) %>% group_by(year) %>% summarize(avg_height = mean(height)) # Create the ggplot2 ggplot(height_by_year, aes(x = year, y = avg_height)) + geom_line() + labs(title = "Average Height of Olympic Athletes Over the Years", x = "Year", y = "Average Height (cm)") + theme_minimal()