10B NobelPrize.org

Author

Tenzin Thakuri

Task

The Nobel Prize organization provides public APIs for accessing structured Nobel Prize data. Using one or both of the APIs available at the Nobel Prize Developer Zone, your task is to use JSON data to investigate and answer four interesting, data-driven questions.

At least one of your questions should go beyond simple counts and require joining, filtering, or comparing fields across the data (e.g., “Which country lost the most Nobel laureates—born there but awarded as a citizen of another country?”).

Requirements Use one or both Nobel Prize APIs to retrieve data in JSON format.

In R, load and transform the JSON data into tidy data frames.

Formulate four questions that can be answered from the data.

For each question:

Describe the question

Show the code used

Present the answer (table, summary, or plot)

Codebase

library(httr2)
library(jsonlite)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.2.0     ✔ readr     2.2.0
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.3     ✔ tibble    3.3.1
✔ lubridate 1.9.5     ✔ tidyr     1.3.2
✔ purrr     1.2.1     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter()  masks stats::filter()
✖ purrr::flatten() masks jsonlite::flatten()
✖ dplyr::lag()     masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(naniar)
library(lubridate)
library(knitr)
url="https://api.nobelprize.org/2.1/laureates?limit=1000"
# make API request
response<-request(url) %>%
  req_perform()
# Extract JSON response as text
json_data <- resp_body_string(response)
# Parse JSON 
data<-fromJSON(json_data)
# check object type
class(data)
[1] "list"
# Convert the list of elements into a clean tibble
laureates_df <- bind_rows(data$laureates)
class(laureates_df)
[1] "data.frame"
names(laureates_df)
 [1] "id"                "knownName"         "givenName"        
 [4] "familyName"        "fullName"          "fileName"         
 [7] "gender"            "birth"             "wikipedia"        
[10] "wikidata"          "sameAs"            "links"            
[13] "nobelPrizes"       "death"             "orgName"          
[16] "acronym"           "founded"           "nativeName"       
[19] "penName"           "penNameOf"         "foundedCountry"   
[22] "foundedCountryNow" "foundedContinent" 
#clean data frame
clean_df<-laureates_df %>%

  mutate(birth_country     = birth$place$country$en,
         birth_country_now = birth$place$countryNow$en) %>%
  unnest_longer(nobelPrizes)%>%
    unnest_wider(nobelPrizes, names_sep = "_") %>%
    unnest_longer(nobelPrizes_affiliations, keep_empty = TRUE) %>%
  unnest_wider(nobelPrizes_affiliations, names_sep = "_")%>%
  mutate(across(where(is.data.frame), ~ .x$en))%>%
   mutate(nobelPrizes_affiliations_country = map_chr(nobelPrizes_affiliations_country,
                           ~ as.character(unlist(.x))[1])) %>%
  
  
  
  select(id,fullName
,gender, birth_country, birth_country_now,nobelPrizes_awardYear,nobelPrizes_category,nobelPrizes_dateAwarded,nobelPrizes_prizeAmount,nobelPrizes_affiliations_country)

class(clean_df$fullName)
[1] "character"
clean_df
# A tibble: 1,008 × 10
   id    fullName   gender birth_country birth_country_now nobelPrizes_awardYear
   <chr> <chr>      <chr>  <chr>         <chr>             <chr>                
 1 745   A. Michae… male   USA           USA               2001                 
 2 102   Aage Niel… male   Denmark       Denmark           1975                 
 3 779   Aaron Cie… male   British Prot… Israel            2004                 
 4 259   Aaron Klug male   Lithuania     Lithuania         1982                 
 5 1004  Abdulraza… male   <NA>          <NA>              2021                 
 6 114   Abdus Sal… male   India         Pakistan          1979                 
 7 982   Abhijit B… male   India         India             2019                 
 8 981   Abiy Ahme… male   Ethiopia      Ethiopia          2019                 
 9 843   Ada E. Yo… female British Mand… Israel            2009                 
10 866   Adam G. R… male   USA           USA               2011                 
# ℹ 998 more rows
# ℹ 4 more variables: nobelPrizes_category <chr>,
#   nobelPrizes_dateAwarded <chr>, nobelPrizes_prizeAmount <int>,
#   nobelPrizes_affiliations_country <chr>
colSums(is.na(clean_df))
                              id                         fullName 
                               0                               30 
                          gender                    birth_country 
                              30                               33 
               birth_country_now            nobelPrizes_awardYear 
                              33                                0 
            nobelPrizes_category          nobelPrizes_dateAwarded 
                               0                                0 
         nobelPrizes_prizeAmount nobelPrizes_affiliations_country 
                               0                              260 
clean_df
# A tibble: 1,008 × 10
   id    fullName   gender birth_country birth_country_now nobelPrizes_awardYear
   <chr> <chr>      <chr>  <chr>         <chr>             <chr>                
 1 745   A. Michae… male   USA           USA               2001                 
 2 102   Aage Niel… male   Denmark       Denmark           1975                 
 3 779   Aaron Cie… male   British Prot… Israel            2004                 
 4 259   Aaron Klug male   Lithuania     Lithuania         1982                 
 5 1004  Abdulraza… male   <NA>          <NA>              2021                 
 6 114   Abdus Sal… male   India         Pakistan          1979                 
 7 982   Abhijit B… male   India         India             2019                 
 8 981   Abiy Ahme… male   Ethiopia      Ethiopia          2019                 
 9 843   Ada E. Yo… female British Mand… Israel            2009                 
10 866   Adam G. R… male   USA           USA               2011                 
# ℹ 998 more rows
# ℹ 4 more variables: nobelPrizes_category <chr>,
#   nobelPrizes_dateAwarded <chr>, nobelPrizes_prizeAmount <int>,
#   nobelPrizes_affiliations_country <chr>
glimpse(clean_df)
Rows: 1,008
Columns: 10
$ id                               <chr> "745", "102", "779", "259", "1004", "…
$ fullName                         <chr> "A. Michael Spence", "Aage Niels Bohr…
$ gender                           <chr> "male", "male", "male", "male", "male…
$ birth_country                    <chr> "USA", "Denmark", "British Protectora…
$ birth_country_now                <chr> "USA", "Denmark", "Israel", "Lithuani…
$ nobelPrizes_awardYear            <chr> "2001", "1975", "2004", "1982", "2021…
$ nobelPrizes_category             <chr> "Economic Sciences", "Physics", "Chem…
$ nobelPrizes_dateAwarded          <chr> "2001-10-10", "1975-10-17", "2004-10-…
$ nobelPrizes_prizeAmount          <int> 10000000, 630000, 10000000, 1150000, …
$ nobelPrizes_affiliations_country <chr> "USA", "Denmark", "Israel", "United K…
# Since nobelPrizes_awardYear and nobelPrizes_dateAwarded are in chr data types needs to convert it into date 
clean_df <- clean_df %>%
  mutate(nobelPrizes_awardYear = as.integer(nobelPrizes_awardYear))

Q1:Which laureates have won the Nobel Peace Prize?

This question explores the individuals who have received the Nobel Peace Prize from 1901 to 2026.

clean_df %>%
  filter(nobelPrizes_category == "Peace", !is.na(fullName)) %>%
  distinct(fullName, nobelPrizes_awardYear) %>%
  filter(nobelPrizes_awardYear >= 1901) %>%
  arrange(desc(nobelPrizes_awardYear)) %>%   
  kable()
fullName nobelPrizes_awardYear
Navanethem Navi Pillay 2026
Maria Corina Machado 2025
Narges Mohammadi 2023
Ales Bialiatski 2022
Dmitry Andreyevich Muratov 2021
Maria Ressa 2021
Abiy Ahmed Ali 2019
Denis Mukwege 2018
Nadia Murad Basee Taha 2018
Juan Manuel Santos 2016
Kailash Satyarthi 2014
Malala Yousafzai 2014
Ellen Johnson Sirleaf 2011
Leymah Gbowee 2011
Tawakkol Karman 2011
Liu Xiaobo 2010
Barack Hussein Obama 2009
Martti Ahtisaari 2008
Albert Arnold (Al) Gore Jr. 2007
Muhammad Yunus 2006
Mohamed ElBaradei 2005
Wangari Muta Maathai 2004
Shirin Ebadi 2003
James Earl Carter 2002
Kofi Atta Annan 2001
Kim Dae-jung 2000
David Trimble 1998
John Hume 1998
Jody Williams 1997
Carlos Filipe Ximenes Belo 1996
José Ramos-Horta 1996
Joseph Rotblat 1995
Shimon Peres 1994
Frederik Willem de Klerk 1993
Nelson Rolihlahla Mandela 1993
Rigoberta Menchú Tum 1992
Aung San Suu Kyi 1991
Mikhail Sergeyevich Gorbachev 1990
The 14th Dalai Lama (Tenzin Gyatso) 1989
Oscar Arias Sánchez 1987
Elie Wiesel 1986
Desmond Mpilo Tutu 1984
Lech Wałęsa 1983
Alfonso García Robles 1982
Alva Myrdal 1982
Adolfo Pérez Esquivel 1980
Mother Teresa 1979
Mohamed Anwar al-Sadat 1978
Menachem Begin 1978
Elizabeth Williams 1976
Mairead Corrigan 1976
Andrei Dmitrievich Sakharov 1975
Eisaku Satō 1974
Seán MacBride 1974
Henry Alfred Kissinger 1973
Le Duc Tho 1973
Norman Ernest Borlaug 1970
René Cassin 1968
Martin Luther King Jr. 1964
Linus Carl Pauling 1962
Dag Hjalmar Agne Carl Hammarskjöld 1961
Albert John Lutuli 1960
Philip J. Noel-Baker 1959
Georges Pire 1958
Lester Bowles Pearson 1957
George Catlett Marshall 1953
Albert Schweitzer 1952
Léon Jouhaux 1951
Ralph Bunche 1950
John Boyd Orr, Baron Boyd-Orr of Brechin Mearn 1949
Emily Greene Balch 1946
John Raleigh Mott 1946
Cordell Hull 1945
Edgar Algernon Robert Gascoyne-Cecil, 1st Viscount Cecil of Chelwood 1937
Carlos Saavedra Lamas 1936
Carl von Ossietzky 1935
Arthur Henderson 1934
Sir Norman Angell (Ralph Lane) 1933
Jane Addams 1931
Nicholas Murray Butler 1931
Lars Olof Jonathan (Nathan) Söderblom 1930
Frank Billings Kellogg 1929
Ferdinand Buisson 1927
Ludwig Quidde 1927
Aristide Briand 1926
Gustav Stresemann 1926
Charles Gates Dawes 1925
Sir Austen Chamberlain 1925
Fridtjof Nansen 1922
Christian Lous Lange 1921
Karl Hjalmar Branting 1921
Léon Victor Auguste Bourgeois 1920
Henri La Fontaine 1913
Elihu Root 1912
Alfred Hermann Fried 1911
Tobias Michael Carel Asser 1911
Auguste Marie François Beernaert 1909
Paul Henri Benjamin Balluet d’Estournelles de Constant, Baron de Constant de Rebecque 1909
Fredrik Bajer 1908
Klas Pontus Arnoldson 1908
Ernesto Teodoro Moneta 1907
Louis Renault 1907
Theodore Roosevelt Jr. 1906
Baroness Bertha Sophie Felicita von Suttner, née Countess Kinsky von Chinic und Tettau 1905
William Randal Cremer 1903
Charles Albert Gobat 1902
Élie Ducommun 1902
Frédéric Passy 1901
Jean Henry Dunant 1901

Above table shows the list of laurates who won the nobel peace prize from year 1901 to 2026. Jean Henry Dunant and Frédéric Passy received the first Nobel Peace Prize in 1901.

Q2 Which country has produced the highest number of Nobel Prize laureates?

nobel_laureates_country<-clean_df%>%
  # prevents counting the same laureate more than once for the same country.
    distinct(id, nobelPrizes_affiliations_country) %>%
    filter(!is.na(nobelPrizes_affiliations_country)) %>%
    count(nobelPrizes_affiliations_country )%>%
    arrange(desc(n))%>%
    slice_head(n = 15)



ggplot(nobel_laureates_country, aes(x =reorder(nobelPrizes_affiliations_country,n) , y =n)) +
  geom_col(fill = "#2b5c8f", width = 0.7) +
  coord_flip()+
  geom_text(aes(label = n), 
          hjust = -0.2,
          size = 3.5)+
labs(
  title = "Top Countries by Number of Nobel Prize Laureates",
  x = "Affiliation Country",
  y = "Number of Nobel Prize Laureates"
) +
  theme_minimal()+
 theme(
    panel.grid.major.y = element_blank(),
    panel.grid.minor = element_blank(),
    plot.title = element_text(face = "bold", size = 14),
    plot.subtitle = element_text(color = "gray30")
  )

USA is the only country that has produced the highest number of Nobel Prize laureates (390) followed by United Kingdom (94), Germany (74). There is a substantial difference between the United States and the other countries. These results may be influenced by the laureates’ Nobel Prize institutional affiliations, as the data reflects the countries where their affiliated institutions are located rather than necessarily their birth countries or nationalities.

Q3 How has the prize amount changed over time?

prize_amount_year<-clean_df%>%
    mutate(nobelPrizes_awardYear = as.numeric(nobelPrizes_awardYear)) %>%
  group_by(nobelPrizes_awardYear)%>%
  summarize(avg_prize_amount = mean(nobelPrizes_prizeAmount, na.rm = TRUE)
)%>%
    arrange(nobelPrizes_awardYear)

ggplot(prize_amount_year,
       aes(x = nobelPrizes_awardYear, y = avg_prize_amount)) +
  geom_line(color = "#2b5c8f", linewidth = 1) +
  geom_point(color = "#2b5c8f", size = 2) +
    scale_x_continuous(breaks = seq(1901, 2026, by = 10)) +

  labs(
    title = "Trends in Nobel Prize Award Amounts Over Time",
    x = "Award Year",
    y = "Average Prize Amount"
  ) +
  theme_minimal()+
  theme(
    axis.text.x = element_text(
      angle = 45,
      hjust = 1,
      size = 8
    )
  )

The average Nobel Prize amount remained relatively stable from 1901 to 1951, followed by a slight increase between 1955 and 1981. From 1981 to 2001, the prize amount increased exponentially. It then remained relatively stable for approximately 10 years before decreasing. After that, it gradually increased again, reaching an average of approximately 12,500,000 in recent years.

Q4 Which country lost the most Nobel laureates—born there but awarded as a citizen of another country?.

country_lost <- clean_df %>%
  filter(
    !is.na(birth_country),
    !is.na(nobelPrizes_affiliations_country),
    birth_country != nobelPrizes_affiliations_country
  ) %>%
  group_by(birth_country) %>%
  summarise(
    n = n_distinct(id),
    affiliation_countries = paste(sort(unique(nobelPrizes_affiliations_country)),
                                  collapse = ", "),
    .groups = "drop"
  ) %>%
  arrange(desc(n))

kable(head(country_lost, 10))
birth_country n affiliation_countries
Germany 26 Austria, Canada, France, Israel, Sweden, Switzerland, United Kingdom, USA
United Kingdom 24 Australia, Canada, Switzerland, USA
Canada 14 USA
France 12 Argentina, Germany, Sweden, Switzerland, Tunisia, USA
Austria-Hungary 11 Austria, Czechoslovakia, Germany, Hungary, Sweden, Switzerland, USA
Prussia 11 Germany, USA
Russia 10 Belgium, Switzerland, United Kingdom, USA, USSR
Russian Empire 10 Finland, France, Germany, Sweden, USA, USSR
Scotland 9 Canada, United Kingdom, USA
the Netherlands 9 Germany, Switzerland, United Kingdom, USA

Germany lost the most Nobel laureates, born there but awarded as a citizen of another country

Conclusion

The USA has the most laureates (390), far ahead of the United Kingdom (94) and Germany (74). The average prize amount stayed low until the mid-1900s, rose sharply from the 1980s, and reached about 12.5 million in recent years. Germany lost the most laureates (26),closely followed by united kingdom (24), most of the countries lost Nobel laureates to USA.

Citaion

Anthropic. (2026). Claude [Large language model]. https://claude.ai/share/754d7628-df31-4840-bab5-0fe0b63787b1