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!

1 Load the dataset and find the most common gender and birth country

nobel_df = pd.read_csv("data/nobel.csv")
nobel_df.head()
top_gender = nobel_df["sex"].value_counts().index[0]
top_gender
top_country = nobel_df["birth_country"].value_counts().index[0]
top_country

2 Identify the decade with the highest ratio of US-born winners

nobel_df["us_born"] = nobel_df["birth_country"] == "United States of America"
nobel_df["decade"] = (np.floor(nobel_df["year"] / 10) * 10).astype(int)
decade_usa = nobel_df.groupby("decade", as_index=False)["us_born"].mean()
max_decade_usa = decade_usa[decade_usa["us_born"] == decade_usa["us_born"].max()]["decade"].values[0]
max_decade_usa
g = sns.relplot(x="decade", y="us_born", data=decade_usa, kind="line")
g.fig.suptitle("Ratio of US-born Winners by Decade", y=1.03)

3 Find the decade and category with the highest proportion of female laureates

nobel_df["female_winner"] = nobel_df["sex"] == "Female"
df = nobel_df.groupby(["decade", "category"], as_index=False)["female_winner"].mean()
max_female = df[df["female_winner"] == df["female_winner"].max()][["decade", "category"]]
max_female_dict = {max_female["decade"].values[0]: max_female["category"].values[0]}
max_female_dict
# relational line plot

4 Find first woman to win a Nobel Prize

female_winners = nobel_df[nobel_df["female_winner"]]
first_woman = female_winners[female_winners["year"] == female_winners["year"].min()]
first_woman_name = first_woman["full_name"].values[0]
first_woman_name
first_woman_category = first_woman["category"].values[0]
first_woman_category