Assignment 10B

Author

Michael Mayne

Assignment 10B

Pre-Coding Approach:

The Nobel prize Developer sites has a public API function which allows individuals to be able to connect to the data about the winners using an API. For this assignment I intend to answer these 4 specific questions:

  • Out of the last 5 years how many peace prize winner were women?

  • How many noble prize winner stayed in their birth country?

  • Which category of contains the most america winners?

  • Which Nobel prize winners were born in an African Country?

Coding Application: The format will use a standard hhtr2 with jsonlite library. On the Nobel prize development site they show that the data is based on a simple search method with a changing endpoint. I will adjust the endpoint to the goal that I wish to see.

https://api.nobelprize.org/2.1/laureates - for data organized by nobel prize winners

https://api.nobelprize.org/2.1/nobelPrizes- for data organized by the Nobel Prize Categories.

For example for the 1st question, I believe the best adjustment can be /laureates/gender/nobel prize year .

I also intend to use swagger studio in order to parse and understand the information provided.

Libraries

library(httr2)
library(jsonlite)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   4.0.0     ✔ tibble    3.2.1
✔ lubridate 1.9.4     ✔ tidyr     1.3.1
✔ purrr     1.0.4     
── 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