The goal of this asssignment is to choose one of the New York Times APIs, construct an interface in R to read in the JSON data, and transform it into an R DataFrame. So I picked two sections from the Top Stories API:
-books/review
-sunday review
The libraries will be used in this assignment are tidyverse for tidying the data, and jsonlite to import the data.
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.2 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(jsonlite)
##
## Attaching package: 'jsonlite'
##
## The following object is masked from 'package:purrr':
##
## flatten
library(stringr)
df_BooksReview <- as.data.frame(fromJSON(url))
head(df_BooksReview)
## status copyright
## 1 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 2 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 3 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 4 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 5 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 6 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## section last_updated num_results results.section
## 1 Book Review 2023-11-03T18:34:53-04:00 34 books
## 2 Book Review 2023-11-03T18:34:53-04:00 34 books
## 3 Book Review 2023-11-03T18:34:53-04:00 34 books
## 4 Book Review 2023-11-03T18:34:53-04:00 34 books
## 5 Book Review 2023-11-03T18:34:53-04:00 34 books
## 6 Book Review 2023-11-03T18:34:53-04:00 34 books
## results.subsection
## 1 review
## 2
## 3 review
## 4 review
## 5
## 6 review
## results.title
## 1 Economists Ignored Inequality for Years. Now They Can’t Stop Talking About It.
## 2 The Original Birders Gave Photography a Run for its Money
## 3 Rock ’n’ Soul: The Amazing Story of Sly & the Family Stone
## 4 9 New Books We Recommend This Week
## 5 Read Your Way Through Lima
## 6 Welcome to Ed Park’s Many-Layered World
## results.abstract
## 1 A flurry of new books highlights broad disagreements over how to address the problem.
## 2 Two art books revisit 19th-century illustrations by John James Audubon and Elizabeth Gould.
## 3 At the age of 80, Sly Stone has finally produced his memoir, and it gives a strong sense of this giant’s voice and sensibility.
## 4 Suggested reading from critics and editors at The New York Times.
## 5 Lima is a city of contrasts and contradictions — gray and tropical, dense and isolated. Augusto Higa Oshiro, one of its writers, recommended books and authors that have captured its complexity.
## 6 “Same Bed Different Dreams” is the rare sophomore novel that has the wild, freewheeling ambition of a debut.
## results.url
## 1 https://www.nytimes.com/2023/11/03/books/review/inequality-economy-books.html
## 2 https://www.nytimes.com/2023/11/03/books/the-original-birders-gave-photography-a-run-for-its-money.html
## 3 https://www.nytimes.com/2023/11/03/books/review/thank-you-falettinme-be-mice-elf-agin-a-memoir-sly-stone-ben-greenman.html
## 4 https://www.nytimes.com/2023/11/02/books/review/new-books-recommendations.html
## 5 https://www.nytimes.com/2023/11/01/books/books-lima-peru.html
## 6 https://www.nytimes.com/2023/11/02/books/review/same-bed-different-dreams-ed-park.html
## results.uri
## 1 nyt://article/72084011-ff1b-51d5-8f90-9450e56182f4
## 2 nyt://article/c1c0dc0e-12f6-537e-b3df-e721ef278c6d
## 3 nyt://article/a40915b4-da5d-518a-8605-23b9267c7ea0
## 4 nyt://article/103830d4-dab7-5edc-8076-45457f09d137
## 5 nyt://article/db1cb62a-d931-5066-92ec-259185cf46a1
## 6 nyt://article/cecfc885-74f3-5ad3-a0d9-a7bac5e865e2
## results.byline results.item_type
## 1 By Jennifer Szalai Article
## 2 By Walker Mimms Article
## 3 By Alan Light Article
## 4 Article
## 5 By Augusto Higa Oshiro and translated by Jennifer Shyue Article
## 6 By Hamilton Cain Article
## results.updated_date results.created_date results.published_date
## 1 2023-11-03T23:33:54-04:00 2023-11-03T05:03:05-04:00 2023-11-03T05:03:05-04:00
## 2 2023-11-03T13:46:56-04:00 2023-11-03T05:02:04-04:00 2023-11-03T05:02:04-04:00
## 3 2023-11-03T08:37:44-04:00 2023-11-03T05:01:10-04:00 2023-11-03T05:01:10-04:00
## 4 2023-11-02T16:09:29-04:00 2023-11-02T16:09:29-04:00 2023-11-02T16:09:29-04:00
## 5 2023-11-01T09:56:53-04:00 2023-11-01T05:00:12-04:00 2023-11-01T05:00:12-04:00
## 6 2023-11-02T16:41:11-04:00 2023-11-02T05:00:44-04:00 2023-11-02T05:00:44-04:00
## results.material_type_facet results.kicker
## 1 Critic’s Notebook
## 2 Up Close
## 3 Nonfiction
## 4 Editors’ choice
## 5
## 6 Fiction
## results.des_facet
## 1 Books and Literature, Income Inequality, United States Economy, Economic Conditions and Trends, Economics (Theory and Philosophy), Economics in America: An Immigrant Economist Explores the Land of Inequality (Book), Visions of Inequality: From the French Revolution to the End of the Cold War (Book), Capital in the Twenty-First Century (Book), A Brief History of Equality (Book), Limitarianism: The Case Against Extreme Wealth (Book), Equality: The History of an Elusive Idea (Book)
## 2
## 3 Books and Literature, Thank You (Falettinme Be Mice Elf Agin): A Memoir (Book), Pop and Rock Music, Content Type: Personal Profile
## 4 Books and Literature, Content Type: Service, A Haunting on the Hill (Book), The Halt During the Chase (Book), Tremor: A Novel (Book), Vengeance Is Mine (Book), I Love Russia: Reporting From a Lost Country (Book), Mapping the Darkness: The Visionary Scientists Who Unlocked the Mysteries of Sleep (Book), Information Desk: An Epic (Book)
## 5 Books and Literature, Writing and Writers, Travel and Vacations
## 6 Books and Literature
## results.org_facet
## 1
## 2
## 3 Sly and the Family Stone
## 4
## 5 Shining Path
## 6
## results.per_facet
## 1 Deaton, Angus, Milanovic, Branko, Piketty, Thomas, Robeyns, Ingrid, McMahon, Darrin M
## 2
## 3 Stone, Sly, Greenman, Ben (1969- )
## 4 Hand, Elizabeth, Knoll, Jessica, Tonks, Rosemary, Cole, Teju, NDiaye, Marie, Garner, Dwight, Kostyuchenko, Elena, Miller, Kenneth (Journalist), Schiff, Robyn
## 5 Higa Oshiro, Augusto (1946-2023), Vargas Llosa, Mario, Alarcon, Daniel, Melville, Herman, Inca Garcilaso de la Vega, Ricardo Palma, Pancho Fierro, Cesar Vallejo, Julio Ramon Ribeyro, Alfredo Bryce Echenique, Santiago Roncagliolo
## 6 Park, Ed
## results.geo_facet
## 1
## 2
## 3
## 4
## 5 Lima (Peru), Peru
## 6
## results.multimedia
## 1 https://static01.nyt.com/images/2023/12/02/multimedia/02Szalai-critics-sub-bhtp/02Szalai-critics-sub-bhtp-superJumbo.jpg, https://static01.nyt.com/images/2023/12/02/multimedia/02Szalai-critics-sub-bhtp/02Szalai-critics-sub-bhtp-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/12/02/multimedia/02Szalai-critics-sub-bhtp/02Szalai-critics-sub-bhtp-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1366, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, “Most of us agree that inequality is a problem — even if we can’t agree on what that actually means and what to do about it.”, “Most of us agree that inequality is a problem — even if we can’t agree on what that actually means and what to do about it.”, “Most of us agree that inequality is a problem — even if we can’t agree on what that actually means and what to do about it.”, Ellen Hansen for The New York Times, Ellen Hansen for The New York Times, Ellen Hansen for The New York Times
## 2 https://static01.nyt.com/images/2023/11/05/multimedia/05upclose-birds-03-khpj/05upclose-birds-03-khpj-superJumbo.jpg, https://static01.nyt.com/images/2023/11/05/multimedia/05upclose-birds-03-khpj/05upclose-birds-03-khpj-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/11/05/multimedia/05upclose-birds-03-khpj/05upclose-birds-03-khpj-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 2048, 400, 150, 1391, 600, 150, image, image, image, photo, photo, photo, Elizabeth Gould’s crimson rosellas (platycercus elegans), Volume 5, Plate 22, from John Gould’s “The Birds of Australia” (1840-48)., Elizabeth Gould’s crimson rosellas (platycercus elegans), Volume 5, Plate 22, from John Gould’s “The Birds of Australia” (1840-48)., Elizabeth Gould’s crimson rosellas (platycercus elegans), Volume 5, Plate 22, from John Gould’s “The Birds of Australia” (1840-48)., via The Trustees of the Natural History Museum, London, via The Trustees of the Natural History Museum, London, via The Trustees of the Natural History Museum, London
## 3 https://static01.nyt.com/images/2023/11/05/books/review/05Stone/00Stone-superJumbo.jpg, https://static01.nyt.com/images/2023/11/05/books/review/05Stone/00Stone-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/11/05/books/review/05Stone/00Stone-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1529, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, Sly Stone in “Woodstock,” the hugely successful 1970 documentary. “I didn’t see it,” he says in his new book, “but someone told me I was the star.”, Sly Stone in “Woodstock,” the hugely successful 1970 documentary. “I didn’t see it,” he says in his new book, “but someone told me I was the star.”, Sly Stone in “Woodstock,” the hugely successful 1970 documentary. “I didn’t see it,” he says in his new book, “but someone told me I was the star.”, Alamy, Alamy, Alamy
## 4 https://static01.nyt.com/images/2023/10/03/books/03elizabeth-hand-cover/03elizabeth-hand-cover-superJumbo.jpg, https://static01.nyt.com/images/2023/10/03/books/03elizabeth-hand-cover/03elizabeth-hand-cover-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/10/03/books/03elizabeth-hand-cover/03elizabeth-hand-cover-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1361, 400, 150, 1360, 600, 150, image, image, image, photo, photo, photo, , , , , ,
## 5 https://static01.nyt.com/images/2023/11/01/books/review/01LitGuide-LIMA/01LitGuide-LIMA-superJumbo.jpg, https://static01.nyt.com/images/2023/11/01/books/review/01LitGuide-LIMA/01LitGuide-LIMA-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/11/01/books/review/01LitGuide-LIMA/01LitGuide-LIMA-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1367, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, , , , Raphaelle Macaron, Raphaelle Macaron, Raphaelle Macaron
## 6 https://static01.nyt.com/images/2023/11/07/books/review/07Park/07Park-superJumbo.jpg, https://static01.nyt.com/images/2023/11/07/books/review/07Park/07Park-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/11/07/books/review/07Park/07Park-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1401, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, , , , Ben Giles, Ben Giles, Ben Giles
## results.short_url
## 1
## 2
## 3
## 4
## 5
## 6
df_SundayReview <- as.data.frame(fromJSON(url1))
head(df_SundayReview)
## status copyright
## 1 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 2 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 3 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 4 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 5 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## 6 OK Copyright (c) 2023 The New York Times Company. All Rights Reserved.
## section last_updated num_results results.section
## 1 Sunday Opinion 2023-05-27T16:47:19-04:00 25 opinion
## 2 Sunday Opinion 2023-05-27T16:47:19-04:00 25 opinion
## 3 Sunday Opinion 2023-05-27T16:47:19-04:00 25 opinion
## 4 Sunday Opinion 2023-05-27T16:47:19-04:00 25 opinion
## 5 Sunday Opinion 2023-05-27T16:47:19-04:00 25 opinion
## 6 Sunday Opinion 2023-05-27T16:47:19-04:00 25 opinion
## results.subsection
## 1 sunday
## 2 sunday
## 3 sunday
## 4 sunday
## 5 sunday
## 6 letters
## results.title
## 1 What Happened When California Chose to Rebuild a Town Devastated by Wildfire
## 2 Why Liberal Academia Needs Republican Friends
## 3 When It Comes to Israel, Who Decides What You Can and Can’t Say?
## 4 Losing Hope in the West Bank
## 5 Glenn Youngkin and the Lost Republican Art of Winning
## 6 Do Today’s Students Lack Ethics?
## results.abstract
## 1 The rebuilding of Paradise, Calif., feels like a test of human fortitude.
## 2 Universities should use the levers of politics and money to rescue the humanities, not destroy them.
## 3 Why both sides feel victimized by the campus debate over the war in Gaza.
## 4 Forty-one years after I befriended two Palestinian university students, I met up with them again to talk about their lives.
## 5 Can Virginia’s governor sell the G.O.P. on a path other than MAGA?
## 6 Readers react to an essay by Ezekiel J. Emanuel lamenting that some students have “moral blinders.”
## results.url
## 1 https://www.nytimes.com/2023/11/04/opinion/sunday/california-wildfires-paradise-rebuilding.html
## 2 https://www.nytimes.com/2023/11/04/opinion/sunday/liberal-universities-republicans.html
## 3 https://www.nytimes.com/2023/11/04/opinion/sunday/israel-palestine-speech-debate.html
## 4 https://www.nytimes.com/2023/11/04/opinion/sunday/palestinians-west-bank-israel.html
## 5 https://www.nytimes.com/2023/11/04/opinion/sunday/glenn-youngkin-virginia-election.html
## 6 https://www.nytimes.com/2023/11/04/opinion/letters/college-students-ethics-morality.html
## results.uri
## 1 nyt://article/d3aea136-061e-51aa-9c3d-e725f25b27c6
## 2 nyt://article/7defb073-fe78-5dbe-838c-dd2d16c106c2
## 3 nyt://article/a78989ae-2d1f-5198-8915-be715b3e62dd
## 4 nyt://article/6d3cd8b7-fcdd-50f1-b26b-e31c765a7d97
## 5 nyt://article/337e7efc-8871-5265-acec-a2b83bd7987b
## 6 nyt://article/adb2f01e-1d97-583b-9f96-565521c802cd
## results.byline results.item_type
## 1 By Erin Brethauer and Tim Hussin and Mark Arax Article
## 2 By Ross Douthat Article
## 3 By Michelle Goldberg Article
## 4 By Nicholas Kristof and William Keo Article
## 5 By Michelle Cottle Article
## 6 Article
## results.updated_date results.created_date results.published_date
## 1 2023-11-04T12:49:19-04:00 2023-11-04T07:01:00-04:00 2023-11-04T07:01:00-04:00
## 2 2023-11-04T10:46:59-04:00 2023-11-04T07:00:56-04:00 2023-11-04T07:00:56-04:00
## 3 2023-11-04T10:45:35-04:00 2023-11-04T07:00:53-04:00 2023-11-04T07:00:53-04:00
## 4 2023-11-04T10:47:47-04:00 2023-11-04T07:00:48-04:00 2023-11-04T07:00:48-04:00
## 5 2023-11-04T10:48:37-04:00 2023-11-04T07:00:33-04:00 2023-11-04T07:00:33-04:00
## 6 2023-11-04T11:22:13-04:00 2023-11-04T07:00:32-04:00 2023-11-04T07:00:32-04:00
## results.material_type_facet results.kicker
## 1 Guest Essay
## 2 Ross Douthat
## 3 Michelle Goldberg
## 4 Nicholas Kristof
## 5 Michelle Cottle
## 6 letters
## results.des_facet
## 1 Zoning, Compensation for Damages (Law), Fires and Firefighters, Wildfires, Real Estate and Housing (Residential), Homeowners Insurance, Suburbs, Global Warming, Disasters and Emergencies, Forests and Forestry, Weather, Home Repairs and Improvements
## 2 Colleges and Universities, Freedom of Speech and Expression, Humanities, Law Schools, Education (K-12), Conservatism (US Politics)
## 3 Israel-Gaza War (2023- ), Colleges and Universities, Terrorism, Palestinians, Demonstrations, Protests and Riots, Zionism, Anti-Semitism, Politics and Government, Jews and Judaism, Freedom of Speech and Expression, The Conflict Over the Conflict: The Israel/Palestine Campus Debate. (Book)
## 4 Israel-Gaza War (2023- ), Palestinians, Israeli Settlements, Refugees and Displaced Persons, Terrorism
## 5 Presidential Election of 2024, State Legislatures
## 6 Colleges and Universities, Israel-Gaza War (2023- ), Terrorism, Ethics and Official Misconduct, Palestinians
## results.org_facet
## 1 Pacific Gas and Electric Co
## 2 Harvard University, Hillsdale College, Ivy League, University of Chicago, University of North Carolina
## 3 Anti-Defamation League
## 4
## 5 Republican Party
## 6 Hamas
## results.per_facet
## 1
## 2 DeSantis, Ron, Trump, Donald J, Rufo, Christopher F
## 3 Stern, Kenneth, Khalidi, Rashid
## 4
## 5 Youngkin, Glenn A, Trump, Donald J
## 6
## results.geo_facet
## 1 California, Paradise (Calif)
## 2
## 3 Israel
## 4 Israel, Gaza Strip, West Bank
## 5 Virginia
## 6 Gaza Strip
## results.multimedia
## 1 https://static01.nyt.com/images/2023/11/05/opinion/04arax-15/04arax-15-superJumbo-v3.jpg, https://static01.nyt.com/images/2023/11/05/opinion/04arax-15/04arax-15-threeByTwoSmallAt2X-v3.jpg, https://static01.nyt.com/images/2023/11/05/opinion/04arax-15/04arax-15-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1635, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, Skyway, the main road leading in and out of Paradise. The thinned tree canopy allows those along the road to see across the canyon on the way to Magalia, a town where 3,000 structures were destroyed by the wildfire., Skyway, the main road leading in and out of Paradise. The thinned tree canopy allows those along the road to see across the canyon on the way to Magalia, a town where 3,000 structures were destroyed by the wildfire., Skyway, the main road leading in and out of Paradise. The thinned tree canopy allows those along the road to see across the canyon on the way to Magalia, a town where 3,000 structures were destroyed by the wildfire., , ,
## 2 https://static01.nyt.com/images/2023/11/04/multimedia/04douthat1-fjqc/04douthat1-fjqc-superJumbo.jpg, https://static01.nyt.com/images/2023/11/04/multimedia/04douthat1-fjqc/04douthat1-fjqc-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/11/04/multimedia/04douthat1-fjqc/04douthat1-fjqc-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 2048, 400, 150, 1434, 600, 150, image, image, image, photo, photo, photo, , , , Bea Oyster for The New York Times, Bea Oyster for The New York Times, Bea Oyster for The New York Times
## 3 https://static01.nyt.com/images/2023/11/05/multimedia/03goldberg1-kbhg/03goldberg1-kbhg-superJumbo.jpg, https://static01.nyt.com/images/2023/11/05/multimedia/03goldberg1-kbhg/03goldberg1-kbhg-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/11/05/multimedia/03goldberg1-kbhg/03goldberg1-kbhg-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1366, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, , , , Bing Guan for The New York Times, Bing Guan for The New York Times, Bing Guan for The New York Times
## 4 https://static01.nyt.com/images/2023/11/04/multimedia/04kristof-6-vbfq/04kristof-6-vbfq-superJumbo.jpg, https://static01.nyt.com/images/2023/11/04/multimedia/04kristof-6-vbfq/04kristof-6-vbfq-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/11/04/multimedia/04kristof-6-vbfq/04kristof-6-vbfq-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1536, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, A view of an Israeli settlement from an abandoned West Bank checkpoint. , A view of an Israeli settlement from an abandoned West Bank checkpoint. , A view of an Israeli settlement from an abandoned West Bank checkpoint. , William Keo for The New York Times, William Keo for The New York Times, William Keo for The New York Times
## 5 https://static01.nyt.com/images/2023/11/05/multimedia/04cottle-05-jclp/04cottle-05-jclp-superJumbo.jpg, https://static01.nyt.com/images/2023/11/05/multimedia/04cottle-05-jclp/04cottle-05-jclp-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/11/05/multimedia/04cottle-05-jclp/04cottle-05-jclp-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1638, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, Gov. Glenn Youngkin speaking at a campaign event in Manassas, Va., Gov. Glenn Youngkin speaking at a campaign event in Manassas, Va., Gov. Glenn Youngkin speaking at a campaign event in Manassas, Va., Matt Eich for The New York Times, Matt Eich for The New York Times, Matt Eich for The New York Times
## 6 https://static01.nyt.com/images/2023/10/22/multimedia/17emanuel-print-hlvm/17emanuel-print-hlvm-superJumbo.jpg, https://static01.nyt.com/images/2023/10/22/multimedia/17emanuel-print-hlvm/17emanuel-print-hlvm-threeByTwoSmallAt2X.jpg, https://static01.nyt.com/images/2023/10/22/multimedia/17emanuel-print-hlvm/17emanuel-print-hlvm-thumbLarge.jpg, Super Jumbo, threeByTwoSmallAt2X, Large Thumbnail, 1365, 400, 150, 2048, 600, 150, image, image, image, photo, photo, photo, , , , Kayana Szymczak for The New York Times, Kayana Szymczak for The New York Times, Kayana Szymczak for The New York Times
## results.short_url
## 1
## 2
## 3
## 4
## 5
## 6
CombinedData <- rbind(df_BooksReview,df_SundayReview)
CombinedData <- CombinedData %>%
select(results.title,results.abstract,results.url,results.created_date, results.published_date, last_updated,results.section,results.subsection, results.byline, results.des_facet)
head(CombinedData)
## results.title
## 1 Economists Ignored Inequality for Years. Now They Can’t Stop Talking About It.
## 2 The Original Birders Gave Photography a Run for its Money
## 3 Rock ’n’ Soul: The Amazing Story of Sly & the Family Stone
## 4 9 New Books We Recommend This Week
## 5 Read Your Way Through Lima
## 6 Welcome to Ed Park’s Many-Layered World
## results.abstract
## 1 A flurry of new books highlights broad disagreements over how to address the problem.
## 2 Two art books revisit 19th-century illustrations by John James Audubon and Elizabeth Gould.
## 3 At the age of 80, Sly Stone has finally produced his memoir, and it gives a strong sense of this giant’s voice and sensibility.
## 4 Suggested reading from critics and editors at The New York Times.
## 5 Lima is a city of contrasts and contradictions — gray and tropical, dense and isolated. Augusto Higa Oshiro, one of its writers, recommended books and authors that have captured its complexity.
## 6 “Same Bed Different Dreams” is the rare sophomore novel that has the wild, freewheeling ambition of a debut.
## results.url
## 1 https://www.nytimes.com/2023/11/03/books/review/inequality-economy-books.html
## 2 https://www.nytimes.com/2023/11/03/books/the-original-birders-gave-photography-a-run-for-its-money.html
## 3 https://www.nytimes.com/2023/11/03/books/review/thank-you-falettinme-be-mice-elf-agin-a-memoir-sly-stone-ben-greenman.html
## 4 https://www.nytimes.com/2023/11/02/books/review/new-books-recommendations.html
## 5 https://www.nytimes.com/2023/11/01/books/books-lima-peru.html
## 6 https://www.nytimes.com/2023/11/02/books/review/same-bed-different-dreams-ed-park.html
## results.created_date results.published_date last_updated
## 1 2023-11-03T05:03:05-04:00 2023-11-03T05:03:05-04:00 2023-11-03T18:34:53-04:00
## 2 2023-11-03T05:02:04-04:00 2023-11-03T05:02:04-04:00 2023-11-03T18:34:53-04:00
## 3 2023-11-03T05:01:10-04:00 2023-11-03T05:01:10-04:00 2023-11-03T18:34:53-04:00
## 4 2023-11-02T16:09:29-04:00 2023-11-02T16:09:29-04:00 2023-11-03T18:34:53-04:00
## 5 2023-11-01T05:00:12-04:00 2023-11-01T05:00:12-04:00 2023-11-03T18:34:53-04:00
## 6 2023-11-02T05:00:44-04:00 2023-11-02T05:00:44-04:00 2023-11-03T18:34:53-04:00
## results.section results.subsection
## 1 books review
## 2 books
## 3 books review
## 4 books review
## 5 books
## 6 books review
## results.byline
## 1 By Jennifer Szalai
## 2 By Walker Mimms
## 3 By Alan Light
## 4
## 5 By Augusto Higa Oshiro and translated by Jennifer Shyue
## 6 By Hamilton Cain
## results.des_facet
## 1 Books and Literature, Income Inequality, United States Economy, Economic Conditions and Trends, Economics (Theory and Philosophy), Economics in America: An Immigrant Economist Explores the Land of Inequality (Book), Visions of Inequality: From the French Revolution to the End of the Cold War (Book), Capital in the Twenty-First Century (Book), A Brief History of Equality (Book), Limitarianism: The Case Against Extreme Wealth (Book), Equality: The History of an Elusive Idea (Book)
## 2
## 3 Books and Literature, Thank You (Falettinme Be Mice Elf Agin): A Memoir (Book), Pop and Rock Music, Content Type: Personal Profile
## 4 Books and Literature, Content Type: Service, A Haunting on the Hill (Book), The Halt During the Chase (Book), Tremor: A Novel (Book), Vengeance Is Mine (Book), I Love Russia: Reporting From a Lost Country (Book), Mapping the Darkness: The Visionary Scientists Who Unlocked the Mysteries of Sleep (Book), Information Desk: An Epic (Book)
## 5 Books and Literature, Writing and Writers, Travel and Vacations
## 6 Books and Literature
colnames(CombinedData) = c("Title", "Abstract", "URL", "Created_Date", "Published_Date", "Last_Updated", "Section", "Subsection", "Author", "Filtered")
DF_Reviews <- unnest(CombinedData, Filtered)
head(DF_Reviews)
## # A tibble: 6 × 10
## Title Abstract URL Created_Date Published_Date Last_Updated Section
## <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 Economists Ig… A flurr… http… 2023-11-03T… 2023-11-03T05… 2023-11-03T… books
## 2 Economists Ig… A flurr… http… 2023-11-03T… 2023-11-03T05… 2023-11-03T… books
## 3 Economists Ig… A flurr… http… 2023-11-03T… 2023-11-03T05… 2023-11-03T… books
## 4 Economists Ig… A flurr… http… 2023-11-03T… 2023-11-03T05… 2023-11-03T… books
## 5 Economists Ig… A flurr… http… 2023-11-03T… 2023-11-03T05… 2023-11-03T… books
## 6 Economists Ig… A flurr… http… 2023-11-03T… 2023-11-03T05… 2023-11-03T… books
## # ℹ 3 more variables: Subsection <chr>, Author <chr>, Filtered <chr>
freq_DF_Reviews <- as.data.frame(table(DF_Reviews$Filtered))
colnames(freq_DF_Reviews)[1]="Facets"
glimpse(freq_DF_Reviews)
## Rows: 200
## Columns: 2
## $ Facets <fct> "A Brief History of Equality (Book)", "A Death in Malta: An Ass…
## $ Freq <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 3, 5, 27, 1, 1, 1, 1,…