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
df = pd.read_csv("data/nobel.csv")
# Start coding here!
df.head()
# Looking fo missing values
df.isna().sum()
#Most commonle awarded gender
sns.set_context("notebook")
g = sns.catplot(kind='count',
data=df,
x='sex')
g.fig.suptitle("Nobel Prizes By Gender",
y=1.03)
plt.show()
top_gender = "Male"
top_birth_country = df['birth_country'].mode()
top_country='United States of America'
df['us_born']= df['birth_country']=='United States of America'
df['decade'] = df['year']//10
ratio= df.groupby('decade',as_index=False)['us_born'].mean()
sns.set_context('notebook')
g = sns.relplot(data=df,
kind='line',
x='decade',
y='us_born')
g.fig.suptitle("Ratio of Us Born Nobel Winners per Decade",y=1.05)
plt.show()
max_decade_usa = 2000
Which decade and Nobel Prize category combination had the highest proportion of female laureates?
df['female'] = df['sex']=='Female'
df.groupby(['decade','category'])['female'].mean()
max_female_dict = {2020:'Literature'}
sns.relplot(kind='line',
data=df,
x='decade',
y='female',
hue='category',
ci=None)
plt.plot()
df.columns
filter = df[(df['sex']=='Female')&(df['year'].min())].head(1)
filter[['full_name','category']]
first_woman_name = 'Marie Curie, née Sklodowska'
first_woman_category = 'Physics'