Skip to content
New Workbook
Sign up
Olympics Data Analysis

Olympics

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!

import pandas as pd

pd.read_csv("data/athlete_events.csv.gz")

Data Dictionary

ColumnExplanation
idUnique number for each athlete
nameAthlete's name
sexM or F
ageAge of the athlete
heightIn centimeters
weightIn kilograms
teamTeam name
nocNational Olympic Committee 3
gamesYear and season
yearInteger
seasonSummer or Winter
cityHost city
sportSport
eventEvent
medalGold, Silver, Bronze, or NA

Source and license of the dataset. The dataset is a consolidated version of data from www.sports-reference.com.

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.

Importing Libraries

#Importing Libraries
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

Importing dataset

athlete_events = pd.read_csv("data/athlete_events.csv.gz")
print(athlete_events)

Data Information

The dataset contains 271116 rows and 15 columns of information regarding olympic athletes with respect to country, age, height, wieght, year, event, sport, medals and other variables.

athlete_events.shape
athlete_events.info()
athlete_events.describe()
athlete_events.head()
β€Œ
β€Œ
β€Œ