size_categories:
- 100K<n<1M
The analysis behind the glory: 120 Years of Data
Project Overview
In this project, I performed a comprehensive Exploratory Data Analysis (EDA) on a dataset covering 120 years of Olympic history. My main goal was to transform a messy, historical dataset into a clean, analyzed resource to uncover the key physical, demographic, and geopolitical factors that determine an athlete's success.
Dataset Description
The dataset provides a wide view of Olympic athletes over a century, from basic demographics to physical attributes and medal outcomes.
- Demographics: Age, Sex, Team/Country, Year.
- Physical Metrics: Height, Weight.
- Contextual Data: Sport, Event.
- Target Variable: Has_Medal (Created feature: 1 for winning any medal, 0 for none).
Phase 1: Data Cleaning & Preprocessing
This historical dataset was naturally messy, containing missing records from early 1900s games and human data-entry errors. I followed a chronological process to clean it:
- Feature Engineering (Target Variable): I converted the categorical "Medal" column into a binary
Has_Medalinteger column. This is crucial for calculating mathematical probabilities and success rates later in the project. - Handling Missing Data (Smart Imputation): I identified thousands of rows missing
HeightandWeight. Instead of using a generic average, I filled these missing values using the specific Mean of the athlete's Sport and Sex. - Outlier Detection & Filtering: I discovered extreme physiological anomalies, such as an adult athlete listed at 28kg being 1.83 meters, and participants with recorded ages over 80 during intense active competition years. I filtered these out as corrupted historical data.
Why I chose Smart Imputation over Dropping Rows: I decided to handle the massive amount of missing physiological data by imputing values based on Sport and Sex, rather than simply dropping the rows entirely. I chose this approach because dropping every athlete with a missing weight would have drastically reduced my dataset size and erased the history of athletes from earlier eras where measurements weren't strictly documented. By using targeted group averages (e.g., filling a missing female gymnast's height only with the average height of other female gymnasts), I preserved the massive scale of the dataset while ensuring the imputed numbers were biologically realistic. This allowed me to neutralize missing data without distorting the statistical realities of each distinct sport.
The Gender Revolution: A Century of Change
How has female participation in the Olympic Games evolved over the past 120 years, and does the data reflect broader social changes?
The visualization below clearly maps a massive historical shift. From near-zero female participation at the dawn of the modern games, we see a steady climb, culminating in a dramatic acceleration towards equality in recent decades. The data isn't just about sports; it's a mirror of global social progress.
National Efficiency: Quality over Quantity
Which countries are the most "efficient" at the Olympics? Is it just about sending the largest delegation, or do some nations convert athletes to medals at a much higher rate?
Simply counting total medals is biased toward massive countries like the US or the former USSR that send huge delegations. By calculating the "Conversion Rate" (total medals divided by unique participants), we reveal the true sporting powerhouses. The graph below shows the top 15 most efficient nations.
The Age Factor: Is There a "Prime" Olympic Age?
At what age do athletes peak in the Olympic games, and does winning a medal correlate with a specific age bracket?
The KDE (Kernel Density Estimate) distribution reveals a distinct "Gold Zone" between the ages of 22 and 27. The density of medalists drops sharply after age 30. However, the long "tail" on the right side of the graph highlights fascinating "Veteran Anomalies" in sports like Equestrian or Shooting, where precise experience outweighs raw physical athleticism.
Youth vs. Experience: Who Actually Wins?
We often hear about teenage prodigies in the Olympics, especially in gymnastics. But statistically, do minors (under 18) or adults have a better "conversion rate" (medals per athlete)?
While young athletes capture our imagination, the data proves the power of physical maturity. Not only do adults make up the vast majority of competitors (over 95%), but they also have a significantly higher conversion rate. The visualizations below demonstrate that years of physical development, mental resilience, and experience yield a higher return on investment (ROI) than the raw agility of youth.
The Physical Paradox: Is There a "Perfect" Olympic Body?
Do general physical attributes like Height and Weight correlate with winning a medal?
The correlation heatmap below reveals a surprising "paradox." Look at the bottom row (Has_Medal): the correlation with Height (0.08) and Weight (0.08) is almost zero! Does this mean physical size doesn't matter in the Olympics? Not at all. It means that looking at the Olympics as a single macro-dataset is heavily misleading.
Resolving the Paradox: Physical Clustering
By isolating four distinct sports, the scatter plot below reveals clear "Physical Identities" (clusters). Gymnasts are concentrated in the bottom-left (short and light), while Basketball players dominate the top-right (tall and heavy). The "Perfect Olympic Body" doesn't exist in general—it is entirely sport-dependent.
The Outlier Advantage: Do You Need to be an Anomaly?
Does being a physical "anomaly" give you an advantage, and in which sports is this most critical?
By calculating the exact deviation of medalists from their specific Event and Sex averages, the horizontal bar chart below reveals the top 10 sports that heavily reward physical extremes. Unsurprisingly, "open" sports without weight classes—like Basketball and Volleyball—top the list. In these arenas, being a massive physical outlier is a distinct statistical advantage.
Closing Thoughts: The Blueprint of a Champion
After diving into 120 years of Olympic history, it’s clear that winning isn’t just about "training harder"—it’s about a perfect alignment between a person's biology and the specific demands of their sport.
The "Winning Formula" identified in this data: Through this research, I’ve shown that success is rarely random. It happens in the "Gold Zone" of the mid-20s, and it heavily favors those who fit a specific physical mold. While we often think of the Olympics as a broad competition, my analysis proves it is actually a collection of highly specialized niches. From the "Anomaly Advantage" in Basketball to the strict physical conformity of Gymnastics, the data tells a story of extreme specialization.
Technical Stack:
Pandas & Numpy: Data cleaning and Feature Engineering.
Matplotlib & Seaborn: Professional EDA and statistical plotting.





