New York Times API

I’m using jsonlite package to convert results in a flat list and then convert to a data frame.

Two APIs have been queries: Book review Article search

But first things first, installed/calling relevant libraries.

library(XML)
library(jsonlite)
library(tidyverse)
## ── Attaching packages ───────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.2.1     ✓ purrr   0.3.3
## ✓ tibble  2.1.3     ✓ dplyr   0.8.4
## ✓ tidyr   1.0.2     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.4.0
## ── Conflicts ──────────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter()  masks stats::filter()
## x purrr::flatten() masks jsonlite::flatten()
## x dplyr::lag()     masks stats::lag()
nyt_key_book_review<-"6SzKSy3JLBQhJRA2sie1z0fZSiO9kYGJ"
nyt_key_article_search<-"oREdUFLfvSwvdkb5iQj4GqvJ6aiqpa5"

Book review

The Books API provides information about book reviews and The New York Times Best Sellers lists.

I’m getting book reviews on one of my favorite authors: Iain Banks.

# Reading JSON files from NYT API and converting to a data.frame

# Book review
reviews_df <- fromJSON("https://api.nytimes.com/svc/books/v3/reviews.json?author=Iain+Banks&api-key=6SzKSy3JLBQhJRA2sie1z0fZSiO9kYGJ",flatten = TRUE) %>% data.frame()

# Printing
head(reviews_df)
##   status                                                            copyright
## 1     OK Copyright (c) 2020 The New York Times Company.  All Rights Reserved.
## 2     OK Copyright (c) 2020 The New York Times Company.  All Rights Reserved.
## 3     OK Copyright (c) 2020 The New York Times Company.  All Rights Reserved.
##   num_results
## 1           3
## 2           3
## 3           3
##                                                                         results.url
## 1                       http://www.nytimes.com/1995/02/19/books/death-by-modem.html
## 2             http://www.nytimes.com/1986/03/02/books/in-love-with-sara-ffitch.html
## 3 http://www.nytimes.com/2000/12/17/books/books-in-brief-fiction-poetry-570729.html
##   results.publication_dt    results.byline results.book_title
## 1             1995-02-19  CATHERINE TEXIER         Complicity
## 2             1986-03-02  SAMUEL R. DELANY   Walking on Glass
## 3             2000-12-17 PETER BRICKLEBANK       The Business
##   results.book_author results.summary                         results.uuid
## 1          Iain Banks                 00000000-0000-0000-0000-000000000000
## 2          Iain Banks                 00000000-0000-0000-0000-000000000000
## 3          Iain Banks                 00000000-0000-0000-0000-000000000000
##                                       results.uri results.isbn13
## 1 nyt://book/00000000-0000-0000-0000-000000000000  9780743200189
## 2 nyt://book/00000000-0000-0000-0000-000000000000  9780395400487
## 3 nyt://book/00000000-0000-0000-0000-000000000000  9780349112459

Goodreads API

I would like to check whether any of these books reviewed by the Times are part of the famous Culture series.

To do so, I will call an API from Goodreads.com: https://www.goodreads.com/api.

There are two API calls: First: Author name to grab author id Second: Series list, that uses author id

Steps: 1: Finding author id

# connection
# author name to be parsed in the URL
con <-'https://www.goodreads.com/api/author_url/Iain%20M%20Banks?key=UZDsXRdqqW0GHin6a2Iw'
author_xml<-readLines(con, warn = FALSE)
# XML parsing
author_xml<-xmlParse(author_xml)
# grabbing author id
author_id <- xpathSApply(author_xml, "//*/author/@id")
y<-str_trim(author_id, side = c("both"))

This is Mr Banks’ id: 5807106.

2: Extract author’s series

# connection
# author id to be parsed in the URL
url_gr<-paste("https://www.goodreads.com/series/list/",y,".xml?key=UZDsXRdqqW0GHin6a2Iw",sep="")

con1<-url_gr
# XML parsing
series_xml<-readLines(con1, warn = FALSE)
head(series_xml,10)
##  [1] "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"       
##  [2] "<GoodreadsResponse>"                              
##  [3] "  <Request>"                                      
##  [4] "    <authentication>true</authentication>"        
##  [5] "      <key><![CDATA[UZDsXRdqqW0GHin6a2Iw]]></key>"
##  [6] "    <method><![CDATA[series_list]]></method>"     
##  [7] "  </Request>"                                     
##  [8] "  <series_works>"                                 
##  [9] "<series_work>"                                    
## [10] "<id>178910</id>"
series_xml<-xmlParse(series_xml)

# extracting Book titles into a data frame
title_df <- xmlToDataFrame(nodes = getNodeSet(series_xml, "//*/best_book"), stringsAsFactors = FALSE)

# Displaying Book titles
head(title_df$title,20)
##  [1] "Consider Phlebas (Culture #1)"                               
##  [2] "The Player of Games (Culture, #2)"                           
##  [3] "Use of Weapons (Culture #3)"                                 
##  [4] "The State of the Art (Culture, #4)"                          
##  [5] "Excession (Culture, #5)"                                     
##  [6] "Inversions (Culture, #6)"                                    
##  [7] "Look to Windward (Culture, #7)"                              
##  [8] "Matter (Culture, #8)"                                        
##  [9] "Surface Detail (Culture #9)"                                 
## [10] "The Hydrogen Sonata (Culture #10)"                           
## [11] "The Culture: Consider Phlebas/Player of Games/Use of Weapons"
## [12] "Das Kultur-Spiel: Das Spiel Azad / Einsatz der Waffen"       
## [13] "Выбор оружия. Последнее слово техники (Культура #3-4)"       
## [14] "La Saga de la Cultura"                                       
## [15] "La Saga de la Cultura - 1"                                   
## [16] "La Saga de la Cultura - 2"                                   
## [17] "Les Enfers virtuels 1"                                       
## [18] "Les Enfers virtuels 2"

3: Comparing NYT book list to Goodreads list.

result<-str_detect(title_df$title,reviews_df$results.book_title)

Unfortunately, none of the books reviewed by NYT belong to the Culture series.

FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE

Article searching

As another example, I’m also getting articles mentioning Mr Banks. This data frame would require more work, giving that it searches for all string.

# Article search
article_df <- fromJSON("http://api.nytimes.com/svc/search/v2/articlesearch.json?q=iain+m.+banks&api-key=joREdUFLfvSwvdkb5iQj4GqvJ6aiqpa5", flatten = TRUE) %>% data.frame()

# Printing
head(article_df,10)
##    status                                                           copyright
## 1      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 2      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 3      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 4      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 5      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 6      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 7      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 8      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 9      OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
## 10     OK Copyright (c) 2020 The New York Times Company. All Rights Reserved.
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             response.docs.abstract
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   He will be very sorely missed.
## 2                                                                                                                                                                                                                                                                                                                                                                                                                                         Mr. Banks, a best-selling Scottish author, churned out 28 books in just under 30 years on subjects ranging from violent crime to interstellar conflicts.
## 3                                                                                                                                                                                                                                                                         LEAD: Linda Ellen Lewis, the daughter of Richard Forest Lewis of Norwich, Conn., and the late Frances Lewis, was married yesterday to Iain Hay Bruce, a son of Mr. and Mrs. Archibald M. Bruce of Old Greenwich, Conn. The Rev. Harold Donald Smith performed the ceremony at the Park Congregational Church in Norwich.
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                  A British writer’s novel is trimmed and broken into 23 episodes to encourage listeners to buy the full book, in audio or print.
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                           Gerald Jonas reviews books Look To Windward by Iain M Banks, Nekropolis by Maureen F McHugh and The Other Wind by Ursula K Le Guin (M)
## 6  Heather Timmons column on M&C Saatchi's announcement of initial public offering that is intended to raise 10 million pounds ($18 million) and values whole company at about 75 million pounds; says announcement sets off disquieting memories of Saatchi & Saatchi's initial public offering nine years ago and its sad consequences for stockholders; David Kershaw, who left Saatchi & Saatchi with Charles and Maurice Saatchi, is now one five partners with them in M&C Saatchi and will be chief executive of public company, insists that things will be different this time around (M)
## 7                                                                                                                                                                                                                                                                                                                                                                                                        Gerald Jonas reviews books The Martian Race by Prof Gregory Benford; The Quiet Invasion by Sarah Zettel; Crescent City Rhapsody by Kathleen Ann Goonan and Inversions by Iain M Banks (M)
## 8                                                                                                                                                                                                                                                                               Bank of Scotland, smarting from public criticism of banking venture with Pat Robertson, says it is reviewing its relationship with conservative American evangelist; it is first indication by bank that project, telephone and Internet banking venture described as something of a coup, might be foundering (M)
## 9                                                                                                        Morgan Stanley has named 228 employees to be its latest class of managing directors. As Financial News reports, the new managing directors include Jeremy Capstick, part of Morgan Stanley’s investment banking team that advised Euronext on its pending merger with the New York Stock Exchange, and Seth Weintrob, a financial sponsors banker in the United States with close ties to private equity firm Blackstone Group. Below, a list of the investment bank’s newest inductees: 
## 10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     Taking the Children review of movies Riding in Cars With Boys, Bandits and K-Pax; photo (S)
##                                                                                                                response.docs.web_url
## 1                                                                  https://krugman.blogs.nytimes.com/2013/04/04/iain-banks-is-dying/
## 2                          https://www.nytimes.com/2013/06/13/books/iain-banks-novelist-of-crime-and-science-fiction-dies-at-59.html
## 3                                                        https://www.nytimes.com/1989/10/01/style/iain-bruce-wed-to-linda-lewis.html
## 4                                                                     https://www.nytimes.com/2009/09/21/business/media/21audio.html
## 5                                                                      https://www.nytimes.com/2001/10/07/books/science-fiction.html
## 6  https://www.nytimes.com/2004/04/20/business/media-business-advertising-m-c-saatchi-s-plans-go-public-revive-memories-another.html
## 7                                                                      https://www.nytimes.com/2000/02/27/books/science-fiction.html
## 8    https://www.nytimes.com/1999/06/03/business/international-business-under-criticism-bank-scotland-reassesses-robertson-deal.html
## 9                                               https://dealbook.nytimes.com/2006/12/18/morgan-stanley-names-new-managing-directors/
## 10            https://www.nytimes.com/2001/11/02/movies/taking-the-children-it-s-all-about-motherhood-the-young-accidental-kind.html
##                                                                                                                                                                                                                                         response.docs.snippet
## 1                                                                                                                                                                                                                              He will be very sorely missed.
## 2                                                                                                    Mr. Banks, a best-selling Scottish author, churned out 28 books in just under 30 years on subjects ranging from violent crime to interstellar conflicts.
## 3                                                                                                                                                                                                                                                            
## 4                                                                                                                             A British writer’s novel is trimmed and broken into 23 episodes to encourage listeners to buy the full book, in audio or print.
## 5                                                                                                                      Gerald Jonas reviews books Look To Windward by Iain M Banks, Nekropolis by Maureen F McHugh and The Other Wind by Ursula K Le Guin (M)
## 6  Heather Timmons column on M&C Saatchi's announcement of initial public offering that is intended to raise 10 million pounds ($18 million) and values whole company at about 75 million pounds; says announcement sets off disquieting memories of Saatc...
## 7                                                                   Gerald Jonas reviews books The Martian Race by Prof Gregory Benford; The Quiet Invasion by Sarah Zettel; Crescent City Rhapsody by Kathleen Ann Goonan and Inversions by Iain M Banks (M)
## 8  Bank of Scotland, smarting from public criticism of banking venture with Pat Robertson, says it is reviewing its relationship with conservative American evangelist; it is first indication by bank that project, telephone and Internet banking ventur...
## 9                                                                                                                                                                                                                                                            
## 10                                                                                                                                                                Taking the Children review of movies Riding in Cars With Boys, Bandits and K-Pax; photo (S)
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                  response.docs.lead_paragraph
## 1                                                                                                                                                                 This is very upsetting. Banks writes two kinds of books — gritty realism under the name Iain Banks, and visionary science fiction as Iain M Banks. The latter are just amazing — try starting with Use of Weapons, but every one of the Culture novels is a gem, and it’s terribly sad to think that there will be no more.
## 2                                                                                                                                                                                                                                                                                                                      Iain Banks, a best-selling Scottish novelist whose books ranged from violent crime dramas to interstellar conflicts, died on Sunday in Kirkcaldy, Scotland. He was 59.
## 3                                                                                                                                                                          Linda Ellen Lewis, the daughter of Richard Forest Lewis of Norwich, Conn., and the late Frances Lewis, was married yesterday to Iain Hay Bruce, a son of Mr. and Mrs. Archibald M. Bruce of Old Greenwich, Conn. The Rev. Harold Donald Smith performed the ceremony at the Park Congregational Church in Norwich.
## 4                Back in the 1990s, abridged audio books were as popular as the full-length versions. They were cheaper and required toting fewer CDs or cassettes. But as enthusiasts increasingly listen on iPods, and Web sites like Audible.com and iTunes make downloading unabridged books more affordable, the popularity of abridgments has waned, shrinking to 13 percent of total audio book sales in 2008, from 36 percent in 2005, according to the Audio Publishers Association.
## 5                                                                                                                                               On the day that everything changed, I was reading the advance galleys of a novel by Iain M. Banks called LOOK TO WINDWARD (Pocket Books, $23.95). Like most people, I immediately began to think my everyday activities seemed trivial in the wake of unimaginable tragedy. Then, like most people, I became convinced of quite the opposite.
## 6                                                                                                                                                                                                                                 Investors with long memories could be forgiven for being surprised when executives from M&C Saatchi, the advertising firm started by Maurice and Charles Saatchi in 1995, said last month that they planned an initial public offering in London this year.
## 7                                      You think the Internet has been commercialized? Wait until the entrepreneurs get into space. In THE MARTIAN RACE (Warner Aspect, $23.95), Gregory Benford, a professor of physics at the University of California, Irvine, foresees a near future in which the expense of mounting a manned expedition to Mars will be assumed not by NASA or some similar agency but by media-savvy promoters competing for a $30-billion there-and-back-again prize.
## 8                                                                                                                                                                                                                                                                           After squirming under public criticism of a banking venture with Pat Robertson, the conservative American television evangelist, the Bank of Scotland said today that it was reviewing its relationship with him.
## 9   Morgan Stanley has named 228 employees to be its latest class of managing directors. As Financial News reports, the new managing directors include Jeremy Capstick, part of Morgan Stanley’s investment banking team that advised Euronext on its pending merger with the New York Stock Exchange, and Seth Weintrob, a financial sponsors banker in the United States with close ties to private equity firm Blackstone Group. Below, a list of the investment bank’s newest inductees: 
## 10                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Riding in Cars With Boys
##    response.docs.source
## 1    The New York Times
## 2    The New York Times
## 3    The New York Times
## 4    The New York Times
## 5    The New York Times
## 6    The New York Times
## 7    The New York Times
## 8    The New York Times
## 9    The New York Times
## 10   The New York Times
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      response.docs.multimedia
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NULL
## 2  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, wide, videoThumb, videoLarge, mediumThreeByTwo210, miniMoth, xlarge, blog480, blog427, tmagArticle, jumbo, blog225, master675, master180, popup, blog533, tmagSF, slide, superJumbo, master1050, master495, square320, filmstrip, square640, moth, articleInline, hpSmall, blogSmallInline, mediumFlexible177, sfSpan, largeHorizontal375, hpLarge, largeWidescreen573, videoSmall, videoHpMedium, thumbnail, thumbLarge, blogSmallThumb, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, image, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-thumbWide.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-videoThumb.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-videoLarge.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-mediumThreeByTwo210.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-miniMoth.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-articleLarge.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-blog480.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-blog427.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-tmagArticle.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-jumbo.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-blog225.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-master675.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-master180.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-popup.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-blog533.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-tmagSF.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-slide.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-superJumbo.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-master1050.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-master495.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-square320.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-filmstrip.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-square640.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-moth.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-articleInline.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-hpSmall.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-blogSmallInline.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-mediumFlexible177.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-sfSpan.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-largeHorizontal375.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-hpLarge.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-largeWidescreen573.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-videoSmall.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-videoHpMedium.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-thumbStandard.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-thumbLarge.jpg, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-blogSmallThumb.jpg, 126, 50, 507, 140, 70, 816, 653, 581, 805, 1024, 306, 918, 245, 500, 725, 492, 500, 1838, 1428, 673, 320, 190, 640, 151, 258, 222, 205, 241, 263, 250, 256, 287, 281, 190, 75, 150, 50, 190, 75, 768, 210, 151, 600, 480, 427, 592, 753, 225, 675, 180, 368, 533, 362, 368, 1351, 1050, 495, 320, 190, 640, 151, 190, 163, 151, 177, 395, 375, 511, 573, 500, 337, 75, 150, 50, wide, videoThumb, videoLarge, mediumThreeByTwo210, miniMoth, xlarge, blog480, blog427, tmagArticle, jumbo, blog225, master675, master180, popup, blog533, tmagSF, slide, superJumbo, master1050, master495, square320, filmstrip, square640, moth, articleInline, hpSmall, blogSmallInline, mediumFlexible177, sfSpan, largeHorizontal375, hpLarge, largeWidescreen573, videoSmall, videoHpMedium, thumbnail, thumbLarge, blogSmallThumb, thumbWide, videoThumb, videoLarge, mediumThreeByTwo210, miniMoth, articleLarge, blog480, blog427, tmagArticle, jumbo, blog225, master675, master180, popup, blog533, tmagSF, slide, superJumbo, master1050, master495, square320, filmstrip, square640, moth, articleInline, hpSmall, blogSmallInline, mediumFlexible177, sfSpan, largeHorizontal375, hpLarge, largeWidescreen573, videoSmall, videoHpMedium, thumbStandard, thumbLarge, blogSmallThumb, 190, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 126, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-thumbWide.jpg, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-articleLarge.jpg, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 600, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 816, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, images/2013/06/13/arts/sub-banks-obit/sub-banks-obit-thumbStandard.jpg, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 75, NA, NA
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NULL
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NULL
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NULL
## 6                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NULL
## 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NULL
## 8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NULL
## 9                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        NULL
## 10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       NULL
##                                                                                                                                                                                                                                                                                                                                                                           response.docs.keywords
## 1                                                                                                                                                                                                                                                                                                                                                                                           NULL
## 2                                                                                                                                                                                                                          persons, subject, subject, subject, glocations, Banks, Iain M, Books and Literature, Deaths (Obituaries), Writing and Writers, Scotland, 1, 2, 3, 4, 5, N, N, N, N, N
## 3                                                                                                                                                                                                                                                                                     persons, persons, subject, BRUCE, IAIN HAY, LEWIS, LINDA ELLEN, Weddings and Engagements, 1, 2, 3, N, N, N
## 4                                                                                                                                                                                                   persons, subject, subject, subject, subject, subject, Banks, Iain M, Podcasts, Recordings and Downloads (Audio), Audiobooks, Sales, Books and Literature, 1, 2, 3, 4, 5, 6, N, N, N, N, N, N
## 5                                                                                            persons, persons, persons, subject, subject, creative_works, creative_works, creative_works, Banks, Iain M, Le Guin, Ursula K, Mchugh, Maureen F, Reviews, Books and Literature, NEKROPOLIS (BOOK), OTHER WIND, THE (BOOK), LOOK TO WINDWARD (BOOK), 1, 2, 3, 4, 5, 6, 7, 8, N, N, N, N, N, N, N, N
## 6                                                                                                                                                                                                            organizations, persons, persons, persons, creative_works, M&c Saatchi, Saatchi, Maurice, KERSHAW, DAVID, Saatchi, Charles, ADVERTISING (TIMES COLUMN), 1, 2, 3, 4, 5, N, N, N, N, N
## 7  persons, persons, persons, persons, subject, subject, creative_works, creative_works, creative_works, creative_works, Banks, Iain M, Goonan, Kathleen Ann, Benford, Gregory, Zettel, Sarah, Reviews, Books and Literature, INVERSIONS (BOOK), QUIET INVASION, THE (BOOK), CRESCENT CITY RHAPSODY (BOOK), MARTIN RACE, THE (BOOK), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, N, N, N, N, N, N, N, N, N, N
## 8                                                                                                                                                                                       organizations, persons, subject, subject, subject, Bank of Scotland, Robertson, Pat, Mergers, Acquisitions and Divestitures, Computers and the Internet, Banks and Banking, 1, 2, 3, 4, 5, N, N, N, N, N
## 9                                                                                                                                                                                                                                                                                                                                                                                           NULL
## 10                                                                                                                                                                 subject, subject, subject, creative_works, creative_works, creative_works, MOTION PICTURES, Reviews, Children and Youth, Bandits (Movie), Riding in Cars with Boys (Movie), K-PAX (Movie), 1, 2, 3, 4, 5, 6, N, N, N, N, N, N
##      response.docs.pub_date response.docs.document_type
## 1  2013-04-04T11:07:43+0000                     article
## 2  2013-06-12T23:53:40+0000                     article
## 3  1989-10-01T05:00:00+0000                     article
## 4  2009-09-20T23:00:20+0000                     article
## 5  2001-10-07T05:00:00+0000                     article
## 6  2004-04-20T05:00:00+0000                     article
## 7  2000-02-27T05:00:00+0000                     article
## 8  1999-06-03T05:00:00+0000                     article
## 9  2006-12-18T15:44:02+0000                     article
## 10 2001-11-02T05:00:00+0000                     article
##                 response.docs.news_desk response.docs.section_name
## 1                                                          Opinion
## 2                               Culture                      Books
## 3                          Society Desk                      Style
## 4                              Business               Business Day
## 5                      Book Review Desk                      Books
## 6               Business/Financial Desk               Business Day
## 7                      Book Review Desk                      Books
## 8               Business/Financial Desk               Business Day
## 9                              Business               Business Day
## 10 Movies, Performing Arts/Weekend Desk                     Movies
##    response.docs.type_of_material
## 1                            News
## 2                 Obituary (Obit)
## 3                            News
## 4                            News
## 5                          Review
## 6                            News
## 7                          Review
## 8                            News
## 9                            News
## 10                           News
##                                     response.docs._id response.docs.word_count
## 1  nyt://article/a5f634f1-a00b-5d57-ac7c-640ccac92ddf                       93
## 2  nyt://article/8a5ef4e8-c2aa-5f96-939e-e21de7ddcfc6                      583
## 3  nyt://article/47fdbdf4-8500-566f-81b1-474875d61a05                      206
## 4  nyt://article/14de6f5e-3484-5029-a7a3-b0fae1d4679d                      294
## 5  nyt://article/176ab09d-5edb-517e-895b-fe276cf54b5a                     1092
## 6  nyt://article/dadb1015-d287-5383-b754-a5eb50559fab                     1395
## 7  nyt://article/52c21f82-a394-543d-89e5-d8dac74e6241                     1094
## 8  nyt://article/725af8e8-9376-56f7-a009-2e522c995f44                      526
## 9  nyt://article/bae1fe56-e6e1-5efb-aeef-a7cd188e5f0c                      392
## 10 nyt://article/563e95ea-6e34-53a5-b63f-6997800396e9                     1178
##                                     response.docs.uri
## 1  nyt://article/a5f634f1-a00b-5d57-ac7c-640ccac92ddf
## 2  nyt://article/8a5ef4e8-c2aa-5f96-939e-e21de7ddcfc6
## 3  nyt://article/47fdbdf4-8500-566f-81b1-474875d61a05
## 4  nyt://article/14de6f5e-3484-5029-a7a3-b0fae1d4679d
## 5  nyt://article/176ab09d-5edb-517e-895b-fe276cf54b5a
## 6  nyt://article/dadb1015-d287-5383-b754-a5eb50559fab
## 7  nyt://article/52c21f82-a394-543d-89e5-d8dac74e6241
## 8  nyt://article/725af8e8-9376-56f7-a009-2e522c995f44
## 9  nyt://article/bae1fe56-e6e1-5efb-aeef-a7cd188e5f0c
## 10 nyt://article/563e95ea-6e34-53a5-b63f-6997800396e9
##    response.docs.print_section response.docs.print_page
## 1                         <NA>                     <NA>
## 2                            B                       19
## 3                            1                       58
## 4                            B                        4
## 5                            7                       19
## 6                            C                        4
## 7                            7                       26
## 8                            C                        4
## 9                         <NA>                     <NA>
## 10                           E                       13
##    response.docs.subsection_name
## 1                           <NA>
## 2                           <NA>
## 3                           <NA>
## 4                          Media
## 5                           <NA>
## 6                           <NA>
## 7                           <NA>
## 8                           <NA>
## 9                           <NA>
## 10                          <NA>
##                                                                          response.docs.headline.main
## 1                                                                                Iain Banks Is Dying
## 2                                      Iain Banks, Novelist of Crime and Science Fiction, Dies at 59
## 3                                                                      Iain Bruce Wed To Linda Lewis
## 4                                                A New Novel, Edited Down and Read in a Free Podcast
## 5                                                                                    Science Fiction
## 6  M&C Saatchi's plans to go public revive memories of another agency's bruising stockholder battle.
## 7                                                                                    Science Fiction
## 8                                        Under Criticism, Bank of Scotland Reassesses Robertson Deal
## 9                                                        Morgan Stanley Names New Managing Directors
## 10                                             It's All About Motherhood, The Young, Accidental Kind
##      response.docs.headline.kicker response.docs.headline.content_kicker
## 1                     Paul Krugman                                    NA
## 2                             <NA>                                    NA
## 3                             <NA>                                    NA
## 4                             <NA>                                    NA
## 5                             <NA>                                    NA
## 6  THE MEDIA BUSINESS: ADVERTISING                                    NA
## 7                             <NA>                                    NA
## 8           INTERNATIONAL BUSINESS                                    NA
## 9                         DealBook                                    NA
## 10             TAKING THE CHILDREN                                    NA
##                                                                                                 response.docs.headline.print_headline
## 1                                                                                                                                <NA>
## 2                                                                                     Iain Banks, 59; Wrote Crime and Science Fiction
## 3                                                                                                       Iain Bruce Wed To Linda Lewis
## 4                                                                                 A New Novel, Edited Down And Read in a Free Podcast
## 5                                                                                                                     Science Fiction
## 6  THE MEDIA BUSINESS: ADVERTISING; M&C Saatchi's plans to go public revive memories of another agency's bruising stockholder battle.
## 7                                                                                                                     Science Fiction
## 8                                                 INTERNATIONAL BUSINESS; Under Criticism, Bank of Scotland Reassesses Robertson Deal
## 9                                                                                                                                <NA>
## 10                                                         TAKING THE CHILDREN; It's All About Motherhood, The Young, Accidental Kind
##    response.docs.headline.name response.docs.headline.seo
## 1                           NA                         NA
## 2                           NA                         NA
## 3                           NA                         NA
## 4                           NA                         NA
## 5                           NA                         NA
## 6                           NA                         NA
## 7                           NA                         NA
## 8                           NA                         NA
## 9                           NA                         NA
## 10                          NA                         NA
##    response.docs.headline.sub response.docs.byline.original
## 1                          NA               By Paul Krugman
## 2                          NA          By Daniel E. Slotnik
## 3                          NA                          <NA>
## 4                          NA         By Andrew Adam Newman
## 5                          NA               By Gerald Jonas
## 6                          NA            By Heather Timmons
## 7                          NA               By Gerald Jonas
## 8                          NA                By Alan Cowell
## 9                          NA                   By Dealbook
## 10                         NA           By Peter M. Nichols
##                    response.docs.byline.person
## 1     Paul, NA, Krugman, NA, NA, reported, , 1
## 2   Daniel, E., Slotnik, NA, NA, reported, , 1
## 3                                         NULL
## 4  Andrew, Adam, Newman, NA, NA, reported, , 1
## 5     Gerald, NA, Jonas, NA, NA, reported, , 1
## 6  Heather, NA, Timmons, NA, NA, reported, , 1
## 7     Gerald, NA, Jonas, NA, NA, reported, , 1
## 8      Alan, NA, Cowell, NA, NA, reported, , 1
## 9      Dealbook, NA, NA, NA, NA, reported, , 1
## 10        Peter, NA, NA, NA, NA, reported, , 1
##    response.docs.byline.organization response.meta.hits response.meta.offset
## 1                                 NA              27747                    0
## 2                                 NA              27747                    0
## 3                                 NA              27747                    0
## 4                                 NA              27747                    0
## 5                                 NA              27747                    0
## 6                                 NA              27747                    0
## 7                                 NA              27747                    0
## 8                                 NA              27747                    0
## 9                                 NA              27747                    0
## 10                                NA              27747                    0
##    response.meta.time
## 1                 500
## 2                 500
## 3                 500
## 4                 500
## 5                 500
## 6                 500
## 7                 500
## 8                 500
## 9                 500
## 10                500