Skip to content

The Nobel Prize has been among the most prestigious international awards since 1901. Each year, awards are bestowed in chemistry, literature, physics, physiology or medicine, economics, and peace. In addition to the honor, prestige, and substantial prize money, the recipient also gets a gold medal with an image of Alfred Nobel (1833 - 1896), who established the prize.

The Nobel Foundation has made a dataset available of all prize winners from the outset of the awards from 1901 to 2023. The dataset used in this project is from the Nobel Prize API and is available in the nobel.csv file in the data folder.

In this project, you'll get a chance to explore and answer several questions related to this prizewinning data. And we encourage you then to explore further questions that you're interested in!

# Loading in required libraries
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt 

# Start coding here!
nobel_data= pd.read_csv("data/nobel.csv")
print(nobel_data.info())
print(nobel_data.head())
# clean the data 
print(nobel_data.isnull().sum())
nobel_data.drop_duplicates(inplace=True)
nobel_data.dropna(subset=['sex'])
# What is the most commonly awarded gender and birth country?
top_gender = nobel_data['sex'].value_counts().index[0]
print(top_gender)
top_country = nobel_data['birth_country'].value_counts().index[0]
print(top_country)
sns.catplot(x='sex', data=nobel_data, kind='count')
plt.show()

# Calculate the proportion of USA born winners per decade
nobel_data['us_born_winner'] = nobel_data['birth_country'] == 'United States of America'
nobel_data['decade'] = (np.floor(nobel_data['year'] / 10) * 10).astype(int)
prop_usa_winners = nobel_data.groupby('decade', as_index=False).mean()
# Identify the decade with the highest proportion of US-born winners
max_decade_usa = prop_usa_winners[prop_usa_winners['us_born_winner'] == prop_usa_winners['us_born_winner'].max()]['decade'].values[0]
sns.catplot(x='decade', y='us_born_winner', data=prop_usa_winners, kind='bar')
plt.title('US-born highest ratio by decade')
plt.xlabel('Decade')
plt.ylabel('Ratio')
plt.show()

# Which decade and Nobel Prize category combination had the highest proportion of female laureates?
nobel_data['female_winner']=nobel_data['sex']=='Female'
prop_female_winner= nobel_data.groupby(['decade','category'],as_index=False)['female_winner'].mean().sort_values(by='female_winner',ascending=False)
max_female_decade_category = prop_female_winner[prop_female_winner['female_winner'] ==         prop_female_winner['female_winner'].max()][['decade', 'category']]

max_female_dict= {prop_female_winner['decade'].values[0]: max_female_decade_category['category'].values[0]}
print(max_female_dict)
# Who was the first woman to receive a Nobel Prize, and in what category?
nobel_women = nobel_data[nobel_data['female_winner']]
min_row = nobel_women[nobel_women['year'] == nobel_women['year'].min()]
first_woman_name = min_row['full_name'].values[0]
first_woman_category = min_row['category'].values[0]
print(f"\n The first woman to win a Nobel Prize was {first_woman_name}, in the category of {first_woman_category}.")
# Which individuals or organizations have won more than one Nobel Prize throughout the years?
counts= nobel_data['full_name'].value_counts()
repeats= counts[counts>=2].index
repeat_list= list(repeats)
print('\n The repeat winners are :', repeat_list)
**NOBEL PRIZE WINNERS **

KEY finding

  1. most of winners are males with around 925.
  2. United States has the most scientist birth country with nobel prize winners.
  3. 2000 decade had the highest ratio of us-born scientist with almost 0.45 ot all scientist.
  4. In 2020 decade literature had the highest propotion and highest female winners of all decades.
  5. The first woman to win a Nobel Prize was Marie Curie, née Sklodowska, in the category of Physics.
  6. You had 6 repeated winners from 1900 to 2023: Comité international de la Croix Rouge (International Committee of the Red Cross) Linus Carl Pauling John Bardeen Frederick Sanger Marie Curie, née Sklodowska Office of the United Nations High Commissioner for Refugees (UNHCR)