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

# Start coding here!
df = pd.read_csv("./data/nobel.csv")
df_sex_breakdown = df['sex'].value_counts()
top_gender =df_sex_breakdown[df_sex_breakdown == df_sex_breakdown.max()].index[0]
df_country_breakdown = df['birth_country'].value_counts()
top_country =df_country_breakdown[df_country_breakdown == df_country_breakdown.max()].index[0]

Decade with highest proportion of Americans

df['decade'] = np.floor(df['year']/10)*10
df_total_decade = df.groupby('decade',as_index=False).agg(total_laureates=("laureate_id","count"))
df_country_decade = df.groupby(['birth_country','decade'],as_index=False).agg(country_laureates = ("laureate_id","count"))
df_usa_to_world_by_decade = df_country_decade[df_country_decade['birth_country']=='United States of America'].merge(df_total_decade,on='decade')

df_usa_to_world_by_decade["proportion"] = df_usa_to_world_by_decade["country_laureates"]/df_usa_to_world_by_decade["total_laureates"]

max_decade_usa = int(df_usa_to_world_by_decade.loc[df_usa_to_world_by_decade['proportion']==df_usa_to_world_by_decade['proportion'].max()]['decade'])
max_decade_usa

Decade and Category with highest proportion of female recipients

df_total_decade_category = df.groupby(['decade','category'],as_index=False).agg(total_laureates=("laureate_id","count"))
df_sex_decade_category = df.groupby(['sex','decade','category'],as_index=False).agg(gender_laureates = ("laureate_id","count"))
df_women_and_total_by_decade_category = df_sex_decade_category[df_sex_decade_category['sex']=='Female'].merge(df_total_decade_category,on=['decade','category'])
df_women_and_total_by_decade_category
df_women_and_total_by_decade_category["proportion"] = df_women_and_total_by_decade_category["gender_laureates"]/df_women_and_total_by_decade_category["total_laureates"]
d =int(df_women_and_total_by_decade_category[df_women_and_total_by_decade_category['proportion']==df_women_and_total_by_decade_category['proportion'].max()]['decade'])
c=df_women_and_total_by_decade_category[df_women_and_total_by_decade_category['proportion']==df_women_and_total_by_decade_category['proportion'].max()][['category']].values[0][0]
print(c)
max_female_dict ={d:c}
max_female_dict

First woman name and category

first_woman = (df['sex']=='Female').idxmax()
first_woman_name = df.iloc[first_woman]['full_name']
first_woman_category = df.iloc[first_woman]['category']

People or Orgs that won more than once

df_repeats = df.groupby("full_name",as_index=False).agg(total_times_awarded=("year","count"))
repeat_list = list(df_repeats[df_repeats["total_times_awarded"]>1]['full_name'].values)
repeat_list

Proportion of Women Laureates Over Time

sns.set()
import matplotlib.pyplot as plt
plt.figure(figsize=(20,10))
sns.barplot(df_women_and_total_by_decade_category,x="decade",y="proportion",hue="category")
plt.ylabel("prop. of female laureates")
plt.xlabel("decade")