Assignment Goal: Choose a NYT API, build an interface in R to read in JSON data, and transform it into an R dataframe.
library(jsonlite)
## Warning: package 'jsonlite' was built under R version 4.0.5
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v ggplot2 3.3.3 v purrr 0.3.4
## v tibble 3.1.0 v dplyr 1.0.3
## v tidyr 1.1.2 v stringr 1.4.0
## v readr 1.4.0 v forcats 0.5.1
## Warning: package 'tibble' was built under R version 4.0.4
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x purrr::flatten() masks jsonlite::flatten()
## x dplyr::lag() masks stats::lag()
library(kableExtra)
##
## Attaching package: 'kableExtra'
## The following object is masked from 'package:dplyr':
##
## group_rows
The jsonlite library has a function called fromJSON that can be used to read a JSON file from a URL. To read a JSON file off a NYT API, users also need a key, which can be obtained by following instructions on NYT’s website (link here). For this assignment, I chose to use the book API, and used the example query of Stephen King’s bestseller reviews. I also modified the query to instead search for reviews of Michelle Obama’s bestseller. The data frames are displayed below.
data_ex <- fromJSON("https://api.nytimes.com/svc/books/v3/reviews.json?author=Stephen+King&api-key=grSS1CvDQBtl4ZyUk1ZSkASsTbGR5mru", flatten = TRUE) %>% data.frame()
data_ex %>%
kbl(caption = "Reviews of Stephen King's Bestsellers") %>%
kable_styling(bootstrap_options = "striped")
| status | copyright | num_results | results.url | results.publication_dt | results.byline | results.book_title | results.book_author | results.summary | results.uuid | results.uri | results.isbn13 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2011/11/13/books/review/11-22-63-by-stephen-king-book-review.html | 2011-11-13 | ERROL MORRIS | 11/22/63 | Stephen King | Stephen King’s time traveler tries to undo some painful history. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780307951434, 9780606351461, 9781442344280, 9781442344303, 9781442391635, 9781444727326, 9781451627282, 9781451627299, 9781451627305, 9781451651645, 9781501120602, 9781594135590 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2011/10/31/books/stephen-kings-11-23-63-review.html | 2011-10-31 | JANET MASLIN | 11/22/63 | Stephen King | Stephen King’s latest novel, “11/22/63,” tells of a schoolteacher who travels back to 1958 to alter history, and falls in love as well. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780307951434, 9780606351461, 9781442344280, 9781442344303, 9781442391635, 9781444727326, 9781451627282, 9781451627299, 9781451627305, 9781451651645, 9781501120602, 9781594135590 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2004/01/04/books/the-quest-for-the-north-central-positronics.html | 2004-01-04 | ANDREW O’HEHIR | Wolves of the Calla | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781848941137 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1993/10/24/books/in-short-fiction-284093.html | 1993-10-24 | RICHARD E. NICHOLLS | Nightmares and Dreamscapes | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781441615299 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2001/11/04/books/books-in-brief-fiction-poetry-851302.html | 2001-11-04 | MARY ELIZABETH WILLIAMS | Black House | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780375504396 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1990/05/13/books/armageddon-complete-and-uncut.html | 1990-05-13 | ROBERT KIELY | The Stand | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781848940833 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1990/09/02/books/scared-but-safe.html | 1990-09-02 | ANDY SOLOMON | Four Past Midnight | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780816151776 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1991/10/20/books/l-defending-stephen-king-075091.html | 1991-10-20 | Needful Things | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781598877427 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1992/06/29/books/books-of-the-times-to-be-read-in-daylight-away-from-hungry-dogs.html | 1992-06-29 | CHRISTOPHER LEHMANN-HAUPT | Gerald’s Game | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670846504 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2002/04/14/books/the-horror-etc.html | 2002-04-14 | WALTER KIRN | Everything’s Eventual : 14 Dark Tales | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781439568200 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1986/08/21/books/books-of-the-times-547486.html | 1986-08-21 | CHRISTOPHER LEHMANN-HAUPT | It | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780451169518 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2010/11/28/books/review/Rafferty-t.html | 2010-11-28 | TERRENCE RAFFERTY | Full Dark, No Stars | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781439192566, 9781439192597, 9781439192603, 9781441677112, 9781442335769, 9781444712582, 9781451650600, 9781602859463 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1998/09/27/books/familiar-terrors.html | 1998-09-27 | DANIEL MENDELSOHN | Bag of Bones | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780671026073 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2002/03/18/books/books-of-the-times-storytelling-mogul-decides-to-sweep-out-odds-and-ends.html | 2002-03-18 | JANET MASLIN | Everything’s Eventual : 14 Dark Tales | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781416537816 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1995/07/02/books/in-short-fiction-077895.html | 1995-07-02 | RICHARD E. NICHOLLS | Rose Madder | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781568952611 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2013/09/16/books/doctor-sleep-is-stephen-kings-sequel-to-the-shining.html | 2013-09-16 | JANET MASLIN | Doctor Sleep | Stephen King | In “Doctor Sleep” Stephen King offers a sequel to “The Shining.” | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781451698855 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2013/09/22/books/review/stephen-kings-shining-sequel-doctor-sleep.html | 2013-09-22 | MARGARET ATWOOD | Doctor Sleep | Stephen King | “Doctor Sleep” picks up the story of Danny, the little boy with psycho-intuitive powers from Stephen King’s 1977 novel “The Shining.” | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781451698855 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2013/06/23/books/review/joyland-by-stephen-king.html | 2013-06-23 | WALTER KIRN | Joyland | Stephen King | Stephen King’s lovelorn narrator takes a summer job at a haunted Southern amusement park. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781781162644 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2009/11/08/books/review/JParker-t.html | 2009-11-08 | JAMES PARKER | Under the Dome | Stephen King | When an enormous transparent dome settles over a small town in Maine in Stephen King’s new novel, it’s just fine with Big Jim, the local tyrant-in-waiting, and his pet goon squad. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781476735474 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2009/11/12/books/12book.html | 2009-11-12 | JANET MASLIN | Under the Dome | Stephen King | “Under the Dome” gravely threatens Stephen King’s status as a mere chart-busting pop cultural phenomenon. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781476735474 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2014/11/14/books/stephen-kings-revival.html | 2014-11-14 | JANET MASLIN | Revival | Stephen King | In Stephen King’s “Revival,” a boy is befriended by a charismatic minister with whom he will reconnect in eerie and unsettling ways as an adult. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781410473837, 9781442372764, 9781442372788, 9781476770383, 9781476770390, 9781476770406 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2014/11/23/books/review/stephen-kings-revival.html | 2014-11-23 | DANIELLE TRUSSONI | Revival | Stephen King | Two men are locked in a battle of wills in Stephen King’s novel of fanaticism and what might exist on the other side of life. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781410473837, 9781442372764, 9781442372788, 9781476770383, 9781476770390, 9781476770406 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2006/11/12/books/review/Windolf.t.html | 2006-11-12 | JIM WINDOLF | Lisey’s Story | Stephen King | When Stephen King really wants to put a scare into you, he brings on his most fearsome monster of all, the writer. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781416523352 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2008/11/05/books/05masl.html | 2008-11-05 | JANET MASLIN | Just After Sunset | Stephen King | Everyday situations became open portals to fantasy and horror in Stephen King’s succinct, fast-moving new collection. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781416586654 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2008/11/23/books/review/Taylor-t.html | 2008-11-23 | CHARLES TAYLOR | Just After Sunset | Stephen King | A new short-story collection takes Stephen King back to the form that gave him his seat-of-the-pants start. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781416586654 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2008/01/21/books/21maslin.html | 2008-01-21 | JANET MASLIN | Duma Key | Stephen King | Stephen King’s use of horror is not what it used to be. It may still be the impetus for his stories, but it is no longer the foremost reason they’re interesting. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781416552963 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2008/03/02/books/review/Campbell-t.html | 2008-03-02 | JAMES CAMPBELL | Duma Key | Stephen King | In Stephen King’s new novel, a man recuperating in the Florida Keys begins to paint, with sinister results. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781416552963 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2006/10/23/books/23masl.html | 2006-10-23 | JANET MASLIN | Lisey’s Story | Stephen King | In his new book, Stephen King delivers his version of Joycean wordplay, idiosyncrasy, voluptuousness and stubborn, obsessive chronology. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781416523352 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2014/06/08/books/review/stephen-kings-mr-mercedes.html | 2014-06-08 | MEGAN ABBOTT | Mr. Mercedes | Stephen King | With one eye on Philip Marlowe, Stephen King takes a crack at the detective novel. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781410469007, 9781442369788, 9781442371347, 9781442395404, 9781476754451, 9781476754468, 9781476754475, 9781501125607 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1981/05/10/books/scare-tactics.html | 1981-05-10 | MICHELE SLUNG | Stephen King’s Danse Macabre | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780896960763 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1981/08/14/books/books-of-the-times-books-of-the-times.html | 1981-08-14 | Cujo | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670451937 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1982/08/11/books/books-of-the-times-074639.html | 1982-08-11 | Different Seasons | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670272662 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1982/08/29/books/horror-writer-s-holiday.html | 1982-08-29 | ALAN CHEUSE | Different Seasons | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670272662 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1983/04/03/books/the-other-woman-was-a-car.html | 1983-04-03 | PHILLIPE VAN RJNDT | Christine | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670220267 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1983/04/12/books/books-of-the-times-093019.html | 1983-04-12 | Christine | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670220267 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1983/10/21/books/books-of-the-times-243538.html | 1983-10-21 | Pet Sematary | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780385182447 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1985/06/09/books/don-t-turn-your-back-on-this-book.html | 1985-06-09 | SUSAN BOLOTIN | Skeleton Crew | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | NULL | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1987/02/22/books/what-the-wicked-magician-did.html | 1987-02-22 | BARBARA TRITEL | The Eyes of the Dragon | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | NULL | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1987/05/31/books/summer-reading-sheldon-gets-the-ax.html | 1987-05-31 | JOHN KATZENBACH | Misery | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670813643 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1987/06/08/books/books-of-the-times-301987.html | 1987-06-08 | Misery | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670813643 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1987/11/05/books/books-of-the-times-950387.html | 1987-11-05 | The Tommyknockers | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780399133145 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1987/12/20/books/not-with-a-bang-but-an-eeeooooarrrhmm.html | 1987-12-20 | NINA AUERBACH | The Tommyknockers | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780399133145 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1989/10/23/books/books-of-the-times-from-stephen-king-a-writer-s-demon.html | 1989-10-23 | The Dark Half | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | NULL | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1989/10/29/books/his-alter-ego-is-a-killer.html | 1989-10-29 | GEORGE STADE | The Dark Half | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | NULL | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1991/09/29/books/avaunt-thee-recreant-cyborg.html | 1991-09-29 | RICHARD E. NICHOLLS | The Waste Lands: The Dark Tower Book III | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780452267404 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1991/10/03/books/books-of-the-times-turning-favors-into-catastrophe.html | 1991-10-03 | Needful Things: The Last Castle Rock Story | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670839537 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1994/10/06/books/books-of-the-times-lack-of-sleep-the-least-of-his-problems.html | 1994-10-06 | Insomnia,Stephen King Library Ed. | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670855032 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1995/06/26/books/book-review-a-punch-in-the-nose-then-a-new-life-begins.html | 1995-06-26 | Rose Madder | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780670858699 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1998/09/21/books/books-of-the-times-death-terror-and-writer-s-block.html | 1998-09-21 | Bag of Bones | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780684853505 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1999/04/15/books/books-of-the-times-a-modern-fairy-tale-of-the-dark-north-woods.html | 1999-04-15 | The Girl Who Loved Tom Gordon : A Novel | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780684867625 | ||
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/1999/05/16/books/books-in-brief-fiction-583618.html | 1999-05-16 | ANDREW ESSEX | The Girl Who Loved Tom Gordon : A Novel | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780684867625 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2000/10/05/books/books-of-the-times-how-to-write-if-you-re-stephen-king.html | 2000-10-05 | JANET MASLIN | On Writing: a Memoir of the Craft | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780606222549, 9780606231862, 9780671024253, 9780684853529, 9780743204361, 9780743211536, 9780743455961, 9780743563376, 9781416549864, 9781417647019, 9781439156810, 9781439193631, 9781441658869, 9781444723250, 9781848941083, 9781931208048 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2000/10/08/books/making-it.html | 2000-10-08 | FREDERICK BUSCH | On Writing: a Memoir of the Craft | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780606222549, 9780606231862, 9780671024253, 9780684853529, 9780743204361, 9780743211536, 9780743455961, 9780743563376, 9781416549864, 9781417647019, 9781439156810, 9781439193631, 9781441658869, 9781444723250, 9781848941083, 9781931208048 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2001/03/15/books/books-of-the-times-a-fateful-step-off-a-curb-and-into-alien-territory.html | 2001-03-15 | JANET MASLIN | Dreamcatcher | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780743211383 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2001/04/15/books/weasel-from-another-planet.html | 2001-04-15 | COLIN HARRISON | Dreamcatcher | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780743211383 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2002/09/23/books/books-of-the-times-cruising-the-dark-side-forget-about-seat-belts.html | 2002-09-23 | JANET MASLIN | From a Buick 8 | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780743211376 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2002/09/29/books/not-your-father-s-roadmaster.html | 2002-09-29 | LAURA MILLER | From a Buick 8 | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780743211376 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2004/06/20/books/books-in-brief-fiction-937851.html | 2004-06-20 | BEN SISARIO | The Dark Tower VI | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781880418598 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2006/01/23/books/23masl.html | 2006-01-23 | JANET MASLIN | Cell | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780743292337 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2006/02/05/books/review/05itzkoff.html | 2006-02-05 | DAVE ITZKOFF | Cell | Stephen King | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780743292337 | |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2015/05/31/books/review/stephen-kings-finders-keepers.html | 2015-05-31 | LAURA LIPPMAN | Finders Keepers | Stephen King | Laura Lippman reviews Stephen King’s “Finders Keepers,” the second entry in a planned trilogy that began with “Mr. Mercedes.” | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781410479501, 9781442384347, 9781501100079, 9781501100123, 9781501100130, 9781594138522 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | http://www.nytimes.com/2016/06/12/books/review/stephen-kings-end-of-watch.html | 2016-06-12 | DENISE MINA | End of Watch | Stephen King | A retired police detective sees the return of his nemesis in this suspense story with a supernatural twist. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781410489906, 9781501129742, 9781501134142, 9781501134159, 9781508211358 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | https://www.nytimes.com/2018/05/22/books/review/outsider-stephen-king.html | 2018-05-22 | VICTOR LAVALLE | The Outsider | Stephen King | “The Outsider” starts out as a routine police procedural but before long transforms into something much more sinister. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781501180989 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | https://www.nytimes.com/2018/10/26/books/review/stephen-king-elevation.html | 2018-10-26 | GILBERT CRUZ | Elevation | Stephen King | King’s slim new novel, “Elevation,” returns us to Castle Rock, where prejudice drives a plot that blends the fantastical with the mundane. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781982102319 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | https://www.nytimes.com/2019/09/08/books/review-institute-stephen-king.html | 2019-09-08 | DWIGHT GARNER | The Institute | Stephen King | In his latest, King tells the story of an institution where children with special powers are cultivated — but that’s just where the nightmare begins. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781982110567 |
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 66 | https://www.nytimes.com/2019/09/10/books/review/stephen-king-the-institute.html | 2019-09-10 | LAURA MILLER | The Institute | Stephen King | The terror doesn’t come from ghosts or fiends or clowns — it’s ordinary people, folks just like you and me, who are the evil ones. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781982110567 |
data <- fromJSON("https://api.nytimes.com/svc/books/v3/reviews.json?author=Michelle+Obama&api-key=grSS1CvDQBtl4ZyUk1ZSkASsTbGR5mru", flatten = TRUE) %>% data.frame()
data %>%
kbl(caption = "Review of Michelle Obama's Best Seller") %>%
kable_styling(bootstrap_options = "striped")
| status | copyright | num_results | results.url | results.publication_dt | results.byline | results.book_title | results.book_author | results.summary | results.uuid | results.uri | results.isbn13 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| OK | Copyright (c) 2021 The New York Times Company. All Rights Reserved. | 1 | https://www.nytimes.com/2018/12/06/books/review/michelle-obama-becoming-memoir.html | 2018-12-06 | Isabel Wilkerson | Becoming | Michelle Obama | The former first lady’s long-awaited new memoir recounts with insight, candor and wit her family’s trajectory from the Jim Crow South to Chicago’s South Side and her own improbable journey from there to the White House. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781524763138 |
This was relatively straightforward with the use of the jsonlite library, and showed how one can easily access a large amount of data.
```