Week 10 Assignment 10B Approach - Nobel Prize Data
Introduction (Approach)
For this assignment, I will use the Nobel Prize API’s laureates endpoint which returns one record for each person or organization that has won a Nobel Prize. I plan to answer these four questions:
- Where were laureates born?
- What is the average age of laureates at the time of their award in each category and has it changed over the decades?
- How long did laureates live after winning?
- Which laureate personally received the most money?
The JSON for each laureate is deeply nested. Each person has a birth record and a death record with a date and place, and a list of prizes, where each prize has its own award year, category, and prize amount. Because of this, I plan to read the data without letting jsonlite simplify it so the structure stays intact. I will then use tidyr to flatten only what I need. I’ll use hoist() or unnest_wider() to pull out single fields like birth date and birth country, and unnest_longer() to give each prize its own row since a few laureates won more than once.
Question 4 is the one that goes beyond simple counts. Many prizes are shared and each laureate receives a portion such as one half or one third. I plan to multiply each prize’s inflation adjusted amount by the laureate’s portion to find out how much each person actually received. That way prizes from different years can be compared fairly.
I expect some missing values. Organizations that won the prize will need to be excluded because they don’t have birth or death dates. And for question 3, laureates who are still living have no death date so I will only include laureates who have died. That means the results will lean toward earlier winners.