The New York Times web site provides a rich set of APIs, as described here: http://developer.nytimes.com/docs You’ll need to start by signing up for an API key. Your task is to choose one of the New York Times APIs, construct an interface in R to read in the JSON data, and transform it to an R dataframe.
Below code reads the source url from the NYT API portal and using httr package reads the JSON output and subsequently flattens into a data frame Movie Critics Review API
# NYT Source Page URL: https://developer.nytimes.com/docs/movie-reviews-api/1/routes/critics/%7Breviewer%7D.json/get
source_url <- "https://api.nytimes.com/svc/movies/v2/critics/all.json"
source_url <- paste0(source_url, '?api-key=', api_key)
#raw_data <- jsonlite::fromJSON(source_url, flatten = TRUE)
#data_frame <- as.data.frame(raw_data)
#colnames(data_frame)<- c("status","copyright","num_results","display_name","sort_name","revewer_status","bio","seo_name","type","src","height","width","credit")
raw_data <- httr::GET(source_url, accept_json())
http_status(raw_data)## $category
## [1] "Success"
##
## $reason
## [1] "OK"
##
## $message
## [1] "Success: (200) OK"
http_type(raw_data)## [1] "application/json"
raw_data_content <- httr::content(raw_data, as = "text", encoding = "UTF-8")
data_frame <- as.data.frame(fromJSON(raw_data_content, flatten = TRUE), stringsAsFactors = FALSE) #explicit convertion to data framekable(head(data_frame,1)) %>%
kable_styling(bootstrap_options = c("striped","hover","condensed","responsive"),full_width = F,position = "left",font_size = 12) %>%
row_spec(0, background ="gray")| status | copyright | num_results | results.display_name | results.sort_name | results.status | results.bio | results.seo_name | results.multimedia.resource.type | results.multimedia.resource.src | results.multimedia.resource.height | results.multimedia.resource.width | results.multimedia.resource.credit |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | A. O. Scott | A. O. Scott | full-time | A. O. Scott joined The New York Times as a film critic in January 2000, and was named a chief critic in 2004. Previously, Mr. Scott had been the lead Sunday book reviewer for Newsday and a frequent contributor to Slate, The New York Review of Books, and many other publications. <br/><br/> In the 1990s he served on the editorial staffs of Lingua Franca and The New York Review of Books. He also edited “A Bolt from the Blue and Other Essays,” a collection by Mary McCarthy, which was published by The New York Review of Books in 2002. <br/><br/> Mr. Scott was a finalist for the Pulitzer Prize in Criticism in 2010, the same year he served as co-host (with Michael Phillips of the Chicago Tribune) on the last season of “At the Movies,” the syndicated film-reviewing program started by Roger Ebert and Gene Siskel. <br/><br/> A frequent presence on radio and television, Mr. Scott is Distinguished Professor of Film Criticism at Wesleyan University and the author of Better Living Through Criticism, forthcoming in 2016 from The Penguin Press. A collection of his film writing will be published by Penguin in 2017. <br/><br/> He lives in Brooklyn with his family. | A-O-Scott | image | http://static01.nyt.com/images/2015/10/07/topics/ao-scott/ao-scott-articleInline.jpg | 163 | 220 | Earl Wilson/<br/>The New York Times |
DT::datatable(data_frame, options = list(pagelength=5))#datatable(data_frame)DT::datatable(select(data_frame, status:results.multimedia.resource.credit), options = list(pagelength=5))knitr::kable(data_frame, format = "html")| status | copyright | num_results | results.display_name | results.sort_name | results.status | results.bio | results.seo_name | results.multimedia.resource.type | results.multimedia.resource.src | results.multimedia.resource.height | results.multimedia.resource.width | results.multimedia.resource.credit |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | A. O. Scott | A. O. Scott | full-time | A. O. Scott joined The New York Times as a film critic in January 2000, and was named a chief critic in 2004. Previously, Mr. Scott had been the lead Sunday book reviewer for Newsday and a frequent contributor to Slate, The New York Review of Books, and many other publications. <br/><br/> In the 1990s he served on the editorial staffs of Lingua Franca and The New York Review of Books. He also edited “A Bolt from the Blue and Other Essays,” a collection by Mary McCarthy, which was published by The New York Review of Books in 2002. <br/><br/> Mr. Scott was a finalist for the Pulitzer Prize in Criticism in 2010, the same year he served as co-host (with Michael Phillips of the Chicago Tribune) on the last season of “At the Movies,” the syndicated film-reviewing program started by Roger Ebert and Gene Siskel. <br/><br/> A frequent presence on radio and television, Mr. Scott is Distinguished Professor of Film Criticism at Wesleyan University and the author of Better Living Through Criticism, forthcoming in 2016 from The Penguin Press. A collection of his film writing will be published by Penguin in 2017. <br/><br/> He lives in Brooklyn with his family. | A-O-Scott | image | http://static01.nyt.com/images/2015/10/07/topics/ao-scott/ao-scott-articleInline.jpg | 163 | 220 | Earl Wilson/<br/>The New York Times |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Manohla Dargis | Manohla Dargis | full-time | Manohla Dargis is the co-chief film critic for The Times, where she started in 2004. She has also written for The Los Angeles Times, where she was a chief film critic, and for the LA Weekly, where she was both a film critic and the film editor. She lives in Los Angeles. | Manohla-Dargis | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Stephen Holden | Stephen Holden | full-time | Stephen Holden is a film and music critic for The Times; he joined the culture staff in 1988. Prior to that, he was a pop music critic and journalist for Rolling Stone, The Village Voice, and numerous other magazines and anthologies. Drawing on his experiences as a journalist and record executive, he wrote a satirical novel about the record business, “Triple Platinum,” that was published in 1980 by Dell Books. In 1986, he won a Grammy with six other writers for Best Album Notes for “The Voice: The Columbia Years, a Frank Sinatra Anthology.” Born July 18, 1941, Mr. Holden graduated from Yale University in 1963 with a Bachelor of Arts degree in English and was elected Class Poet. | Stephen-Holden | image | http://nytimes.com/images/2007/01/05/movies/sholden.163.jpg | 163 | 220 | Brent Murray/<br>NYTimes.com |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Renata Adler | Adler, Renata | part-time | Renata-Adler | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Mordaunt Hall | Hall, Mordaunt | part-time | Mordaunt-Hall | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Thomas M. Pryor | Pryor, Thomas M. | part-time | Thomas-M-Pryor | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Eugene Archer | Archer, Eugene | part-time | Eugene-Archer | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Donal J. Henahan | Henahan, Donal J. | part-time | Donal-J-Henahan | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Nora Sayre | Sayre, Nora | part-time | Nora-Sayre | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | D. J. R. Bruckner | Bruckner, D. J. R. | part-time | D-J-R-Bruckner | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Caryn James | James, Caryn | part-time | Caryn-James | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Harold C. Schonberg | Schonberg, Harold C. | part-time | Harold-C-Schonberg | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Tom Buckley | Buckley, Tom | part-time | Tom-Buckley | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Stanley Kauffman | Kauffman, Stanley | part-time | Stanley-Kauffman | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Andre Sennwald | Sennwald, Andre | part-time | Andre-Sennwald | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Vincent Canby | Canby, Vincent | part-time | Vincent-Canby | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Dave Kehr | Kehr, Dave | part-time | Dave-Kehr | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Dana Stevens | Stevens, Dana | part-time | Dana-Stevens | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | B. R. Crisler | Crisler, B. R. | part-time | B-R-Crisler | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Hilton Kramer | Kramer, Hilton | part-time | Hilton-Kramer | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Michael Stern | Stern, Michael | part-time | Michael-Stern | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Bosley Crowther | Crowther, Bosley | part-time | Bosley-Crowther | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Ned Martel | Martel, Ned | part-time | Ned-Martel | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Theodore Strauss | Strauss, Theodore | part-time | Theodore-Strauss | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Richard Eder | Eder, Richard | part-time | Richard-Eder | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Janet Maslin | Maslin, Janet | part-time | Janet-Maslin | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Howard Thompson | Thompson, Howard | part-time | Howard-Thompson | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Anita Gates | Gates, Anita | part-time | Anita-Gates | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | John T. McManus | McManus, John T. | part-time | John-T-McManus | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Lawrence Van Gelder | Van Gelder, Lawrence | part-time | Lawrence-Van-Gelder | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Walter Goodman | Goodman, Walter | part-time | Walter-Goodman | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Elvis Mitchell | Mitchell, Elvis | part-time | Elvis-Mitchell | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | A. H. Weiler | Weiler, A. H. | part-time | A-H-Weiler | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Roger Greenspun | Greenspun, Roger | part-time | Roger-Greenspun | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Frank S. Nugent | Nugent, Frank S. | part-time | Frank-S-Nugent | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Matt Zoller Seitz | Seitz, Matt Zoller | part-time | Matt-Zoller-Seitz | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Neil Genzlinger | Genzlinger, Neil | part-time | Neil-Genzlinger | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Andy Webster | Webster, Andy | part-time | Andy-Webster | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Jeannette Catsoulis | Catsoulis, Jeannette | part-time | Jeannette-Catsoulis | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Nathan Lee | Lee, Nathan | part-time | Nathan-Lee | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Kevin Cahillane | Cahillane, Kevin | NA | Kevin-Cahillane | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Laura Kern | Kern, Laura | part-time | Laura-Kern | NA | NA | NA | NA | NA | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Anna Kisselgoff | Kisselgoff, Anna | NA | NA | Anna-Kisselgoff | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | C. Hooper Trask | Trask, C. Hooper | NA | NA | C-Hooper-Trask | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Ernest Marshall | Marshall, Ernest | NA | NA | Ernest-Marshall | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Herbert L. Matthews | Matthews, Herbert L. | NA | NA | Herbert-L-Matthews | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Herbert Mitgang | Mitgang, Herbert | NA | NA | Herbert-Mitgang | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Jennifer Dunning | Dunning, Jennifer | NA | NA | Jennifer-Dunning | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | John Corry | Corry, John | NA | NA | John-Corry | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Jon Pareles | Pareles, John | NA | NA | Jon-Pareles | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Nina Darnton | Darnton, Nina | NA | NA | Nina-Darnton | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Patricia S. McCormick | McCormick, Patricia S. | NA | NA | Patricia-S-McCormick | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Peter M. Nichols | Nichols, Peter M. | NA | NA | Peter-M-Nichols | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Richard Bernstein | Bernstein, Richard | NA | NA | Richard-Bernstein | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Richard F. Shepard | Shepard, Richard F. | NA | NA | Richard-F-Shepard | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Richard W. Nason | Nason, Richard W. | NA | NA | Richard-W-Nason | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Robert Alden | Alden, Robert | NA | NA | Robert-Alden | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Charles Morgan | Morgan, Charles | NA | NA | Charles-Morgan | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Dan Sullivan | Sullivan, Dan | NA | NA | Dan-Sullivan | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Harry Gilroy | Gilroy, Harry | NA | NA | Harry-Gilroy | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Julie Salamon | Salamon, Julie | NA | NA | Julie-Salamon | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Morris Gilbert | Gilbert, Morris | NA | NA | Morris-Gilbert | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | W. L. Middleton | Middleton, W. L. | NA | NA | W-L-Middleton | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Harry T. Smith | Smith, Harry T. | NA | NA | Harry-T-Smith | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | David DeWitt | DeWitt, David | part-time | NA | David-DeWitt | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Ben Brantley | Brantley, Ben | part-time | NA | Ben-Brantley | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Carina Chocano | Chocano, Carina | part-time | NA | Carina-Chocano | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Daniel M. Gold | Gold, Daniel M. | part-time | NA | Daniel-M-Gold | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Felicity Barringer | Barringer, Felicity | part-time | NA | Felicity-Barringer | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Holcomb B. Noble | Noble, Holcomb B. | part-time | NA | Holcomb-B-Noble | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Jack Gould | Gould, Jack | part-time | NA | Jack-Gould | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Mike Hale | Hale, Mike | part-time | NA | Mike-Hale | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Paul Brunick | Brunick, Pual | part-time | NA | Paul-Brunick | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Peter Kihss | Kihss, Peter | part-time | NA | Peter-Kihss | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Rachel Saltz | Saltz, Rachel | part-time | NA | Rachel-Saltz | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Suzanne O’Connor | O’Connor, Suzanne | part-time | NA | Suzanne-OConnor | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Victor Navasky | Navasky, Victor | part-time | NA | Victor-Navasky | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Wayne King | King, Wayne | part-time | NA | Wayne-King | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Nicolas Rapold | Rapold, Nicolas | part-time | NA | Nicolas-Rapold | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Miriam Bale | Bale, Miriam | part-time | NA | Miriam-Bale | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Nicole Herrington | Herrington, Nicole | part-time | NA | Nicole-Herrington | NA | NA | NA | NA | NA |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 82 | Ben Kenigsberg | Kenigsberg, Ben | part-time | NA | Ben-Kenigsberg | NA | NA | NA | NA | NA |
sqldf("select * from data_frame") ## status
## 1 OK
## 2 OK
## 3 OK
## 4 OK
## 5 OK
## 6 OK
## 7 OK
## 8 OK
## 9 OK
## 10 OK
## 11 OK
## 12 OK
## 13 OK
## 14 OK
## 15 OK
## 16 OK
## 17 OK
## 18 OK
## 19 OK
## 20 OK
## 21 OK
## 22 OK
## 23 OK
## 24 OK
## 25 OK
## 26 OK
## 27 OK
## 28 OK
## 29 OK
## 30 OK
## 31 OK
## 32 OK
## 33 OK
## 34 OK
## 35 OK
## 36 OK
## 37 OK
## 38 OK
## 39 OK
## 40 OK
## 41 OK
## 42 OK
## 43 OK
## 44 OK
## 45 OK
## 46 OK
## 47 OK
## 48 OK
## 49 OK
## 50 OK
## 51 OK
## 52 OK
## 53 OK
## 54 OK
## 55 OK
## 56 OK
## 57 OK
## 58 OK
## 59 OK
## 60 OK
## 61 OK
## 62 OK
## 63 OK
## 64 OK
## 65 OK
## 66 OK
## 67 OK
## 68 OK
## 69 OK
## 70 OK
## 71 OK
## 72 OK
## 73 OK
## 74 OK
## 75 OK
## 76 OK
## 77 OK
## 78 OK
## 79 OK
## 80 OK
## 81 OK
## 82 OK
## copyright
## 1 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 2 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 3 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 4 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 5 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 6 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 7 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 8 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 9 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 10 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 11 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 12 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 13 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 14 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 15 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 16 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 17 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 18 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 19 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 20 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 21 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 22 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 23 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 24 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 25 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 26 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 27 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 28 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 29 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 30 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 31 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 32 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 33 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 34 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 35 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 36 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 37 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 38 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 39 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 40 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 41 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 42 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 43 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 44 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 45 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 46 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 47 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 48 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 49 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 50 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 51 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 52 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 53 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 54 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 55 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 56 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 57 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 58 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 59 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 60 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 61 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 62 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 63 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 64 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 65 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 66 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 67 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 68 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 69 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 70 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 71 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 72 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 73 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 74 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 75 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 76 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 77 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 78 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 79 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 80 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 81 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## 82 Copyright (c) 2019 The New York Times Company. All Rights Reserved.
## num_results results.display_name results.sort_name results.status
## 1 82 A. O. Scott A. O. Scott full-time
## 2 82 Manohla Dargis Manohla Dargis full-time
## 3 82 Stephen Holden Stephen Holden full-time
## 4 82 Renata Adler Adler, Renata part-time
## 5 82 Mordaunt Hall Hall, Mordaunt part-time
## 6 82 Thomas M. Pryor Pryor, Thomas M. part-time
## 7 82 Eugene Archer Archer, Eugene part-time
## 8 82 Donal J. Henahan Henahan, Donal J. part-time
## 9 82 Nora Sayre Sayre, Nora part-time
## 10 82 D. J. R. Bruckner Bruckner, D. J. R. part-time
## 11 82 Caryn James James, Caryn part-time
## 12 82 Harold C. Schonberg Schonberg, Harold C. part-time
## 13 82 Tom Buckley Buckley, Tom part-time
## 14 82 Stanley Kauffman Kauffman, Stanley part-time
## 15 82 Andre Sennwald Sennwald, Andre part-time
## 16 82 Vincent Canby Canby, Vincent part-time
## 17 82 Dave Kehr Kehr, Dave part-time
## 18 82 Dana Stevens Stevens, Dana part-time
## 19 82 B. R. Crisler Crisler, B. R. part-time
## 20 82 Hilton Kramer Kramer, Hilton part-time
## 21 82 Michael Stern Stern, Michael part-time
## 22 82 Bosley Crowther Crowther, Bosley part-time
## 23 82 Ned Martel Martel, Ned part-time
## 24 82 Theodore Strauss Strauss, Theodore part-time
## 25 82 Richard Eder Eder, Richard part-time
## 26 82 Janet Maslin Maslin, Janet part-time
## 27 82 Howard Thompson Thompson, Howard part-time
## 28 82 Anita Gates Gates, Anita part-time
## 29 82 John T. McManus McManus, John T. part-time
## 30 82 Lawrence Van Gelder Van Gelder, Lawrence part-time
## 31 82 Walter Goodman Goodman, Walter part-time
## 32 82 Elvis Mitchell Mitchell, Elvis part-time
## 33 82 A. H. Weiler Weiler, A. H. part-time
## 34 82 Roger Greenspun Greenspun, Roger part-time
## 35 82 Frank S. Nugent Nugent, Frank S. part-time
## 36 82 Matt Zoller Seitz Seitz, Matt Zoller part-time
## 37 82 Neil Genzlinger Genzlinger, Neil part-time
## 38 82 Andy Webster Webster, Andy part-time
## 39 82 Jeannette Catsoulis Catsoulis, Jeannette part-time
## 40 82 Nathan Lee Lee, Nathan part-time
## 41 82 Kevin Cahillane Cahillane, Kevin <NA>
## 42 82 Laura Kern Kern, Laura part-time
## 43 82 Anna Kisselgoff Kisselgoff, Anna <NA>
## 44 82 C. Hooper Trask Trask, C. Hooper <NA>
## 45 82 Ernest Marshall Marshall, Ernest <NA>
## 46 82 Herbert L. Matthews Matthews, Herbert L. <NA>
## 47 82 Herbert Mitgang Mitgang, Herbert <NA>
## 48 82 Jennifer Dunning Dunning, Jennifer <NA>
## 49 82 John Corry Corry, John <NA>
## 50 82 Jon Pareles Pareles, John <NA>
## 51 82 Nina Darnton Darnton, Nina <NA>
## 52 82 Patricia S. McCormick McCormick, Patricia S. <NA>
## 53 82 Peter M. Nichols Nichols, Peter M. <NA>
## 54 82 Richard Bernstein Bernstein, Richard <NA>
## 55 82 Richard F. Shepard Shepard, Richard F. <NA>
## 56 82 Richard W. Nason Nason, Richard W. <NA>
## 57 82 Robert Alden Alden, Robert <NA>
## 58 82 Charles Morgan Morgan, Charles <NA>
## 59 82 Dan Sullivan Sullivan, Dan <NA>
## 60 82 Harry Gilroy Gilroy, Harry <NA>
## 61 82 Julie Salamon Salamon, Julie <NA>
## 62 82 Morris Gilbert Gilbert, Morris <NA>
## 63 82 W. L. Middleton Middleton, W. L. <NA>
## 64 82 Harry T. Smith Smith, Harry T. <NA>
## 65 82 David DeWitt DeWitt, David part-time
## 66 82 Ben Brantley Brantley, Ben part-time
## 67 82 Carina Chocano Chocano, Carina part-time
## 68 82 Daniel M. Gold Gold, Daniel M. part-time
## 69 82 Felicity Barringer Barringer, Felicity part-time
## 70 82 Holcomb B. Noble Noble, Holcomb B. part-time
## 71 82 Jack Gould Gould, Jack part-time
## 72 82 Mike Hale Hale, Mike part-time
## 73 82 Paul Brunick Brunick, Pual part-time
## 74 82 Peter Kihss Kihss, Peter part-time
## 75 82 Rachel Saltz Saltz, Rachel part-time
## 76 82 Suzanne O'Connor O'Connor, Suzanne part-time
## 77 82 Victor Navasky Navasky, Victor part-time
## 78 82 Wayne King King, Wayne part-time
## 79 82 Nicolas Rapold Rapold, Nicolas part-time
## 80 82 Miriam Bale Bale, Miriam part-time
## 81 82 Nicole Herrington Herrington, Nicole part-time
## 82 82 Ben Kenigsberg Kenigsberg, Ben part-time
## results.bio
## 1 A. O. Scott joined The New York Times as a film critic in January 2000, and was named a chief critic in 2004. Previously, Mr. Scott had been the lead Sunday book reviewer for Newsday and a frequent contributor to Slate, The New York Review of Books, and many other publications. \n<br/><br/>\nIn the 1990s he served on the editorial staffs of Lingua Franca and The New York Review of Books. He also edited "A Bolt from the Blue and Other Essays," a collection by Mary McCarthy, which was published by The New York Review of Books in 2002. \n<br/><br/>\nMr. Scott was a finalist for the Pulitzer Prize in Criticism in 2010, the same year he served as co-host (with Michael Phillips of the Chicago Tribune) on the last season of "At the Movies," the syndicated film-reviewing program started by Roger Ebert and Gene Siskel.\n<br/><br/>\nA frequent presence on radio and television, Mr. Scott is Distinguished Professor of Film Criticism at Wesleyan University and the author of Better Living Through Criticism, forthcoming in 2016 from The Penguin Press. A collection of his film writing will be published by Penguin in 2017. \n<br/><br/>\nHe lives in Brooklyn with his family.
## 2 Manohla Dargis is the co-chief film critic for The Times, where she started in 2004. She has also written for The Los Angeles Times, where she was a chief film critic, and for the LA Weekly, where she was both a film critic and the film editor. She lives in Los Angeles.
## 3 Stephen Holden is a film and music critic for The Times; he joined the culture staff in 1988. Prior to that, he was a pop music critic and journalist for Rolling Stone, The Village Voice, and numerous other magazines and anthologies. Drawing on his experiences as a journalist and record executive, he wrote a satirical novel about the record business, "Triple Platinum," that was published in 1980 by Dell Books. In 1986, he won a Grammy with six other writers for Best Album Notes for "The Voice: The Columbia Years, a Frank Sinatra Anthology." Born July 18, 1941, Mr. Holden graduated from Yale University in 1963 with a Bachelor of Arts degree in English and was elected Class Poet.
## 4
## 5
## 6
## 7
## 8
## 9
## 10
## 11
## 12
## 13
## 14
## 15
## 16
## 17
## 18
## 19
## 20
## 21
## 22
## 23
## 24
## 25
## 26
## 27
## 28
## 29
## 30
## 31
## 32
## 33
## 34
## 35
## 36
## 37
## 38
## 39
## 40
## 41
## 42
## 43 <NA>
## 44 <NA>
## 45 <NA>
## 46 <NA>
## 47 <NA>
## 48 <NA>
## 49 <NA>
## 50 <NA>
## 51 <NA>
## 52 <NA>
## 53 <NA>
## 54 <NA>
## 55 <NA>
## 56 <NA>
## 57 <NA>
## 58 <NA>
## 59 <NA>
## 60 <NA>
## 61 <NA>
## 62 <NA>
## 63 <NA>
## 64 <NA>
## 65 <NA>
## 66 <NA>
## 67 <NA>
## 68 <NA>
## 69 <NA>
## 70 <NA>
## 71 <NA>
## 72 <NA>
## 73 <NA>
## 74 <NA>
## 75 <NA>
## 76 <NA>
## 77 <NA>
## 78 <NA>
## 79 <NA>
## 80 <NA>
## 81 <NA>
## 82 <NA>
## results.seo_name results.multimedia.resource.type
## 1 A-O-Scott image
## 2 Manohla-Dargis <NA>
## 3 Stephen-Holden image
## 4 Renata-Adler <NA>
## 5 Mordaunt-Hall <NA>
## 6 Thomas-M-Pryor <NA>
## 7 Eugene-Archer <NA>
## 8 Donal-J-Henahan <NA>
## 9 Nora-Sayre <NA>
## 10 D-J-R-Bruckner <NA>
## 11 Caryn-James <NA>
## 12 Harold-C-Schonberg <NA>
## 13 Tom-Buckley <NA>
## 14 Stanley-Kauffman <NA>
## 15 Andre-Sennwald <NA>
## 16 Vincent-Canby <NA>
## 17 Dave-Kehr <NA>
## 18 Dana-Stevens <NA>
## 19 B-R-Crisler <NA>
## 20 Hilton-Kramer <NA>
## 21 Michael-Stern <NA>
## 22 Bosley-Crowther <NA>
## 23 Ned-Martel <NA>
## 24 Theodore-Strauss <NA>
## 25 Richard-Eder <NA>
## 26 Janet-Maslin <NA>
## 27 Howard-Thompson <NA>
## 28 Anita-Gates <NA>
## 29 John-T-McManus <NA>
## 30 Lawrence-Van-Gelder <NA>
## 31 Walter-Goodman <NA>
## 32 Elvis-Mitchell <NA>
## 33 A-H-Weiler <NA>
## 34 Roger-Greenspun <NA>
## 35 Frank-S-Nugent <NA>
## 36 Matt-Zoller-Seitz <NA>
## 37 Neil-Genzlinger <NA>
## 38 Andy-Webster <NA>
## 39 Jeannette-Catsoulis <NA>
## 40 Nathan-Lee <NA>
## 41 Kevin-Cahillane <NA>
## 42 Laura-Kern <NA>
## 43 Anna-Kisselgoff <NA>
## 44 C-Hooper-Trask <NA>
## 45 Ernest-Marshall <NA>
## 46 Herbert-L-Matthews <NA>
## 47 Herbert-Mitgang <NA>
## 48 Jennifer-Dunning <NA>
## 49 John-Corry <NA>
## 50 Jon-Pareles <NA>
## 51 Nina-Darnton <NA>
## 52 Patricia-S-McCormick <NA>
## 53 Peter-M-Nichols <NA>
## 54 Richard-Bernstein <NA>
## 55 Richard-F-Shepard <NA>
## 56 Richard-W-Nason <NA>
## 57 Robert-Alden <NA>
## 58 Charles-Morgan <NA>
## 59 Dan-Sullivan <NA>
## 60 Harry-Gilroy <NA>
## 61 Julie-Salamon <NA>
## 62 Morris-Gilbert <NA>
## 63 W-L-Middleton <NA>
## 64 Harry-T-Smith <NA>
## 65 David-DeWitt <NA>
## 66 Ben-Brantley <NA>
## 67 Carina-Chocano <NA>
## 68 Daniel-M-Gold <NA>
## 69 Felicity-Barringer <NA>
## 70 Holcomb-B-Noble <NA>
## 71 Jack-Gould <NA>
## 72 Mike-Hale <NA>
## 73 Paul-Brunick <NA>
## 74 Peter-Kihss <NA>
## 75 Rachel-Saltz <NA>
## 76 Suzanne-OConnor <NA>
## 77 Victor-Navasky <NA>
## 78 Wayne-King <NA>
## 79 Nicolas-Rapold <NA>
## 80 Miriam-Bale <NA>
## 81 Nicole-Herrington <NA>
## 82 Ben-Kenigsberg <NA>
## results.multimedia.resource.src
## 1 http://static01.nyt.com/images/2015/10/07/topics/ao-scott/ao-scott-articleInline.jpg
## 2 <NA>
## 3 http://nytimes.com/images/2007/01/05/movies/sholden.163.jpg
## 4 <NA>
## 5 <NA>
## 6 <NA>
## 7 <NA>
## 8 <NA>
## 9 <NA>
## 10 <NA>
## 11 <NA>
## 12 <NA>
## 13 <NA>
## 14 <NA>
## 15 <NA>
## 16 <NA>
## 17 <NA>
## 18 <NA>
## 19 <NA>
## 20 <NA>
## 21 <NA>
## 22 <NA>
## 23 <NA>
## 24 <NA>
## 25 <NA>
## 26 <NA>
## 27 <NA>
## 28 <NA>
## 29 <NA>
## 30 <NA>
## 31 <NA>
## 32 <NA>
## 33 <NA>
## 34 <NA>
## 35 <NA>
## 36 <NA>
## 37 <NA>
## 38 <NA>
## 39 <NA>
## 40 <NA>
## 41 <NA>
## 42 <NA>
## 43 <NA>
## 44 <NA>
## 45 <NA>
## 46 <NA>
## 47 <NA>
## 48 <NA>
## 49 <NA>
## 50 <NA>
## 51 <NA>
## 52 <NA>
## 53 <NA>
## 54 <NA>
## 55 <NA>
## 56 <NA>
## 57 <NA>
## 58 <NA>
## 59 <NA>
## 60 <NA>
## 61 <NA>
## 62 <NA>
## 63 <NA>
## 64 <NA>
## 65 <NA>
## 66 <NA>
## 67 <NA>
## 68 <NA>
## 69 <NA>
## 70 <NA>
## 71 <NA>
## 72 <NA>
## 73 <NA>
## 74 <NA>
## 75 <NA>
## 76 <NA>
## 77 <NA>
## 78 <NA>
## 79 <NA>
## 80 <NA>
## 81 <NA>
## 82 <NA>
## results.multimedia.resource.height results.multimedia.resource.width
## 1 163 220
## 2 NA NA
## 3 163 220
## 4 NA NA
## 5 NA NA
## 6 NA NA
## 7 NA NA
## 8 NA NA
## 9 NA NA
## 10 NA NA
## 11 NA NA
## 12 NA NA
## 13 NA NA
## 14 NA NA
## 15 NA NA
## 16 NA NA
## 17 NA NA
## 18 NA NA
## 19 NA NA
## 20 NA NA
## 21 NA NA
## 22 NA NA
## 23 NA NA
## 24 NA NA
## 25 NA NA
## 26 NA NA
## 27 NA NA
## 28 NA NA
## 29 NA NA
## 30 NA NA
## 31 NA NA
## 32 NA NA
## 33 NA NA
## 34 NA NA
## 35 NA NA
## 36 NA NA
## 37 NA NA
## 38 NA NA
## 39 NA NA
## 40 NA NA
## 41 NA NA
## 42 NA NA
## 43 NA NA
## 44 NA NA
## 45 NA NA
## 46 NA NA
## 47 NA NA
## 48 NA NA
## 49 NA NA
## 50 NA NA
## 51 NA NA
## 52 NA NA
## 53 NA NA
## 54 NA NA
## 55 NA NA
## 56 NA NA
## 57 NA NA
## 58 NA NA
## 59 NA NA
## 60 NA NA
## 61 NA NA
## 62 NA NA
## 63 NA NA
## 64 NA NA
## 65 NA NA
## 66 NA NA
## 67 NA NA
## 68 NA NA
## 69 NA NA
## 70 NA NA
## 71 NA NA
## 72 NA NA
## 73 NA NA
## 74 NA NA
## 75 NA NA
## 76 NA NA
## 77 NA NA
## 78 NA NA
## 79 NA NA
## 80 NA NA
## 81 NA NA
## 82 NA NA
## results.multimedia.resource.credit
## 1 Earl Wilson/<br/>The New York Times
## 2 <NA>
## 3 Brent Murray/<br>NYTimes.com
## 4 <NA>
## 5 <NA>
## 6 <NA>
## 7 <NA>
## 8 <NA>
## 9 <NA>
## 10 <NA>
## 11 <NA>
## 12 <NA>
## 13 <NA>
## 14 <NA>
## 15 <NA>
## 16 <NA>
## 17 <NA>
## 18 <NA>
## 19 <NA>
## 20 <NA>
## 21 <NA>
## 22 <NA>
## 23 <NA>
## 24 <NA>
## 25 <NA>
## 26 <NA>
## 27 <NA>
## 28 <NA>
## 29 <NA>
## 30 <NA>
## 31 <NA>
## 32 <NA>
## 33 <NA>
## 34 <NA>
## 35 <NA>
## 36 <NA>
## 37 <NA>
## 38 <NA>
## 39 <NA>
## 40 <NA>
## 41 <NA>
## 42 <NA>
## 43 <NA>
## 44 <NA>
## 45 <NA>
## 46 <NA>
## 47 <NA>
## 48 <NA>
## 49 <NA>
## 50 <NA>
## 51 <NA>
## 52 <NA>
## 53 <NA>
## 54 <NA>
## 55 <NA>
## 56 <NA>
## 57 <NA>
## 58 <NA>
## 59 <NA>
## 60 <NA>
## 61 <NA>
## 62 <NA>
## 63 <NA>
## 64 <NA>
## 65 <NA>
## 66 <NA>
## 67 <NA>
## 68 <NA>
## 69 <NA>
## 70 <NA>
## 71 <NA>
## 72 <NA>
## 73 <NA>
## 74 <NA>
## 75 <NA>
## 76 <NA>
## 77 <NA>
## 78 <NA>
## 79 <NA>
## 80 <NA>
## 81 <NA>
## 82 <NA>
Below code reads the source url from the NYT API portal and using fromJSON() method in jsonlite package reads the JSON output and subsequently flattens into a data frame Book Reviews API
# NYT Page URL: https://developer.nytimes.com/docs/books-product/1/routes/reviews.json/get
source_url <- "http://api.nytimes.com/svc/books/v3/reviews.json?author=Dan%20Brown"
source_url <- paste0(source_url, '&api-key=', api_key)
raw_data <- jsonlite::fromJSON(source_url)
data_frame <- data.frame(raw_data)kable(head(data_frame,3)) %>%
kable_styling(bootstrap_options = c("striped","hover","condensed","responsive"),full_width = F,position = "left",font_size = 12) %>%
row_spec(0, background ="gray")| 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) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2003/12/07/books/art.html | 2003-12-07 | CHRISTOPHER BENFEY | Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780385519199 | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2013/05/13/books/inferno-by-dan-brown.html | 2013-05-13 | JANET MASLIN | Inferno | Dan Brown | The author Dan Brown plays games with time, gender, identity, famous tourist attractions and futuristic medicine in “Inferno.” | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | c(“9780345806482”, “9780345806499”, “9780385537858”, “9780385537865”, “9780804121064”, “9780804128766”, “9780804147972”, “9780804172264”, “9781400079155”, “9781448170449”) |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2003/03/17/books/books-of-the-times-spinning-a-thriller-from-a-gallery-at-the-louvre.html | 2003-03-17 | JANET MASLIN | Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781407405698 |
DT::datatable(data_frame, options = list(pagelength=5))#datatable(data_frame)DT::datatable(select(data_frame, results.url:results.isbn13), options = list(pagelength=5))sqldf("select * from data_frame") knitr::kable(data_frame, format = "html")| 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) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2003/12/07/books/art.html | 2003-12-07 | CHRISTOPHER BENFEY | Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780385519199 | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2013/05/13/books/inferno-by-dan-brown.html | 2013-05-13 | JANET MASLIN | Inferno | Dan Brown | The author Dan Brown plays games with time, gender, identity, famous tourist attractions and futuristic medicine in “Inferno.” | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | c(“9780345806482”, “9780345806499”, “9780385537858”, “9780385537865”, “9780804121064”, “9780804128766”, “9780804147972”, “9780804172264”, “9781400079155”, “9781448170449”) |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2003/03/17/books/books-of-the-times-spinning-a-thriller-from-a-gallery-at-the-louvre.html | 2003-03-17 | JANET MASLIN | Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781407405698 | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2009/09/14/books/14maslin.html | 2009-09-14 | JANET MASLIN | The Lost Symbol | Dan Brown | “The Lost Symbol,” Dan Browns overdue follow-up to “Angels & Demons” and “The Da Vinci Code,” brings sexy back to a genre that had been left for dead. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780307950680 |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2009/10/11/books/review/Dowd-t.html | 2009-10-11 | MAUREEN DOWD | The Lost Symbol | Dan Brown | The scariest thing about “The Lost Symbol” is that Dan Brown, who took on the Vatican in his previous novels, seems so desperate to ingratiate himself to the ancient sect at the center of this one: the Masons. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780307950680 |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 7 | http://www.nytimes.com/2004/02/22/books/the-last-word-the-da-vinci-con.html | 2004-02-22 | LAURA MILLER | The Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780385504201 | |
| OK | Copyright (c) 2019 The New York Times Company. All Rights Reserved. | 7 | https://www.nytimes.com/2009/09/14/books/14maslin.html | 2009-09-14 | JANET MASLIN | The Lost Symbol | Dan Brown | “The Lost Symbol,” Dan Browns overdue follow-up to “Angels & Demons” and “The Da Vinci Code,” brings sexy back to a genre that had been left for dead. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780307950680 |
kable(head(book_reviews,3))| url | publication_dt | byline | book_title | book_author | summary | uuid | uri | isbn13 |
|---|---|---|---|---|---|---|---|---|
| http://www.nytimes.com/2003/12/07/books/art.html | 2003-12-07 | CHRISTOPHER BENFEY | Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780385519199 | |
| http://www.nytimes.com/2013/05/13/books/inferno-by-dan-brown.html | 2013-05-13 | JANET MASLIN | Inferno | Dan Brown | The author Dan Brown plays games with time, gender, identity, famous tourist attractions and futuristic medicine in “Inferno.” | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | c(“9780345806482”, “9780345806499”, “9780385537858”, “9780385537865”, “9780804121064”, “9780804128766”, “9780804147972”, “9780804172264”, “9781400079155”, “9781448170449”) |
| http://www.nytimes.com/2003/03/17/books/books-of-the-times-spinning-a-thriller-from-a-gallery-at-the-louvre.html | 2003-03-17 | JANET MASLIN | Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781407405698 |
DT::datatable(book_reviews, options = list(pagelength=5))#datatable(data_frame)DT::datatable(select(book_reviews, url:uri), options = list(pagelength=5))knitr::kable(book_reviews, format = "html")| url | publication_dt | byline | book_title | book_author | summary | uuid | uri | isbn13 |
|---|---|---|---|---|---|---|---|---|
| http://www.nytimes.com/2003/12/07/books/art.html | 2003-12-07 | CHRISTOPHER BENFEY | Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780385519199 | |
| http://www.nytimes.com/2013/05/13/books/inferno-by-dan-brown.html | 2013-05-13 | JANET MASLIN | Inferno | Dan Brown | The author Dan Brown plays games with time, gender, identity, famous tourist attractions and futuristic medicine in “Inferno.” | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | c(“9780345806482”, “9780345806499”, “9780385537858”, “9780385537865”, “9780804121064”, “9780804128766”, “9780804147972”, “9780804172264”, “9781400079155”, “9781448170449”) |
| http://www.nytimes.com/2003/03/17/books/books-of-the-times-spinning-a-thriller-from-a-gallery-at-the-louvre.html | 2003-03-17 | JANET MASLIN | Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9781407405698 | |
| http://www.nytimes.com/2009/09/14/books/14maslin.html | 2009-09-14 | JANET MASLIN | The Lost Symbol | Dan Brown | “The Lost Symbol,” Dan Browns overdue follow-up to “Angels & Demons” and “The Da Vinci Code,” brings sexy back to a genre that had been left for dead. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780307950680 |
| http://www.nytimes.com/2009/10/11/books/review/Dowd-t.html | 2009-10-11 | MAUREEN DOWD | The Lost Symbol | Dan Brown | The scariest thing about “The Lost Symbol” is that Dan Brown, who took on the Vatican in his previous novels, seems so desperate to ingratiate himself to the ancient sect at the center of this one: the Masons. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780307950680 |
| http://www.nytimes.com/2004/02/22/books/the-last-word-the-da-vinci-con.html | 2004-02-22 | LAURA MILLER | The Da Vinci Code | Dan Brown | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780385504201 | |
| https://www.nytimes.com/2009/09/14/books/14maslin.html | 2009-09-14 | JANET MASLIN | The Lost Symbol | Dan Brown | “The Lost Symbol,” Dan Browns overdue follow-up to “Angels & Demons” and “The Da Vinci Code,” brings sexy back to a genre that had been left for dead. | 00000000-0000-0000-0000-000000000000 | nyt://book/00000000-0000-0000-0000-000000000000 | 9780307950680 |
sqldf("select url from book_reviews") book_reviews %>%
group_by(byline) %>%
count(byline)## # A tibble: 4 x 2
## # Groups: byline [4]
## byline n
## <chr> <int>
## 1 CHRISTOPHER BENFEY 1
## 2 JANET MASLIN 4
## 3 LAURA MILLER 1
## 4 MAUREEN DOWD 1
#Timeline of dates of review
#re-ordering the data frame from oldest to latest
book_reviews$publication_dt <- as.Date(book_reviews$publication_dt, format="%Y-%m-%d")
book_reviews$start <- book_reviews$publication_dt
book_reviews$end <- book_reviews$publication_dt
book_reviews <- book_reviews[order(as.Date(book_reviews$publication_dt, format="%d/%m/%Y")),]
#adding the start/end date and calculating the number of days between publications
book_reviews$start <- book_reviews$publication_dt
book_reviews$end <- book_reviews$publication_dt
for (i in 2:length(book_reviews$publication_dt)) {
book_reviews$start[i] <- book_reviews$end[i - 1]
i <- i+1
}
book_reviews$start <- as.Date(book_reviews$start, format="%Y-%m-%d")
book_reviews$end <- as.Date(book_reviews$end, format="%Y-%m-%d")
book_reviews$days_to_write <- as.numeric(book_reviews$end - book_reviews$start)#graphing the data
ggplot(book_reviews, aes(x=book_title, y=days_to_write, fill=book_title)) +
geom_bar(stat="identity") +
xlab("Book Title") +
ylab("Days to Publish") +
guides(fill=FALSE) +
theme(axis.text=element_text(size=10), axis.title=element_text(size=14, face="bold")) +
scale_x_discrete(labels=function(book_title) str_wrap(book_title, width = 10))This exercise helped in learning ways to access the Web APIs and reading the JSON output using either httr approach or jsonlite approach and make data analysis and inferences.