Week 9 Assignment

John Kellogg

2019-10-27


Assignment Requirements

Your task is to choose one of the New York Times APIs, construct an interface in R to read in the JSON data, and transform it into an R DataFrame.

Data retrieval

Revrieve the results and query term

##             Length Class      Mode     
## status       1     -none-     character
## copyright    1     -none-     character
## has_more     1     -none-     logical  
## num_results  1     -none-     numeric  
## results     11     data.frame list
##                                display_title mpaa_rating critics_pick
## 1                    Solo: A Star Wars Story       PG-13            0
## 2                   Star Wars: The Last Jedi       PG-13            1
## 3               Rogue One: A Star Wars Story       PG-13            0
## 4 Star Wars: Episode VII - The Force Awakens       PG-13            0
## 5                  Star Wars: The Clone Wars                        0
## 6 Star Wars: Episode II Attack of the Clones          PG            0
## 7  Star Wars: Episode I - The Phantom Menace          PG            1
## 8                         Return of the Jedi          PG            0
## 9                                  Star Wars          PG            1
##           byline
## 1     A.O. SCOTT
## 2 MANOHLA DARGIS
## 3    A. O. SCOTT
## 4 MANOHLA DARGIS
## 5     NATHAN LEE
## 6    A. O. Scott
## 7   Janet Maslin
## 8  Vincent Canby
## 9  VINCENT CANBY
##                                                                        headline
## 1    Review: ‘Solo: A Star Wars Story’ Answers Questions You May Not Have Asked
## 2             Review: ‘Star Wars: The Last Jedi’ Embraces the Magic and Mystery
## 3             Review: ‘Rogue One’ Leaves ‘Star Wars’ Fans Wanting More and Less
## 4 ‘Star Wars: The Force Awakens’ Delivers the Thrills, With a Touch of Humanity
## 5                                                             An Animated Force
## 6                                                            Star Wars (Movies)
## 7                               Star Wars: Episode I-the Phantom Menace (Movie)
## 8                                               RETURN OF THE JEDI, THE (MOVIE)
## 9                                                             Star Wars (Movie)
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       summary_short
## 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Where did Han Solo get his last name? How did he and Chewbacca meet? What was the hand of Sabacc that won him the Millennium Falcon?
## 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       With charm and wit, the latest “Star Wars” movie unites the past and present as it looks toward the future.
## 3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This film, masquerading as a heroic tale of rebellion, falls short of the insurgent energy of its predecessors in the franchise.
## 4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                J. J. Abrams, the director, turns out to be what this stagnant franchise needs: a superfan and pop culture savant.
## 5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        “Star Wars: The Clone Wars” comes as something of a surprise: it isn’t the most painful movie of the year!
## 6 Early and late, in a starship chase sequence and in a light-saber duel between Yoda and the nefarious Count Dooku (Chirstopher Lee), some of the old "Star Wars" magic returns. But otherwise, the mixture of grandeur and whimsy that made the first three movies so thrilling has been sacrificed to self-importance, an incomprehensible plot and some of the worst screen acting of the year. Hayden Christensen and Natalie Portman are dreadful as  Anakin Skywalker and Padme Amidala, who are reunited (and fall in love) in the midst of a messy political crisis that threatens the stability of the republic and the power of the Jedi order. Millions of people will see this dreary, joyless picture, but only those pursuing advanced degrees in "Star Wars"-ology will be able to appreciate it. — A. O. Scott
## 7                                                                                                                                              Stripped of hype and breathless expectations, George Lucas's first installment offers a happy surprise: it's up to snuff. It sustains the gee-whiz spirit of the series and offers a swashbuckling extra-galactic getaway, creating illusions that are even more plausible than the kitchen-raiding raptors of "Jurassic Park." While the human stars here are indeed reduced to playing action figures, they are upstaged by amazing backdrops and hordes of crazily lifelike space beings as the Lewis Carroll in Mr. Lucas is given free rein. The "Star Wars" franchise was funnier and scrappier when it was new. But it simply wasn't capable of this. — Janet Maslin
## 8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Third on-target ``Star Wars'' adventure. Dazzling fun.
## 9                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Luke Skywalker and friends vs. evil empire. One of the real champs.
##   publication_date opening_date        date_updated link.type
## 1       2018-05-15   2018-05-25 2018-06-15 16:44:02   article
## 2       2017-12-12   2017-12-15 2018-01-12 17:44:02   article
## 3       2016-12-13   2016-12-16 2017-11-02 04:18:26   article
## 4       2015-12-16   2015-12-18 2017-11-02 04:18:23   article
## 5       2008-08-14         <NA> 2017-11-02 04:16:25   article
## 6       2002-05-10   2002-05-16 2017-11-02 04:18:01   article
## 7       1999-05-19   1999-05-19 2017-11-02 04:17:57   article
## 8       1983-05-25   1983-05-25 2017-11-02 04:17:32   article
## 9       1977-05-26   1977-05-25 2017-11-02 04:17:28   article
##                                                                                               link.url
## 1                          http://www.nytimes.com/2018/05/15/movies/solo-a-star-wars-story-review.html
## 2                         http://www.nytimes.com/2017/12/12/movies/star-wars-the-last-jedi-review.html
## 3                             http://www.nytimes.com/2016/12/13/movies/star-wars-rogue-one-review.html
## 4                     http://www.nytimes.com/2015/12/18/movies/star-wars-the-force-awakens-review.html
## 5                                                 http://www.nytimes.com/2008/08/15/movies/15clon.html
## 6            http://www.nytimes.com/2002/05/10/movies/film-festival-review-kicking-up-cosmic-dust.html
## 7                http://www.nytimes.com/1999/05/19/movies/film-review-in-the-beginning-the-future.html
## 8                            http://www.nytimes.com/1983/05/25/movies/lucas-returns-with-the-jedi.html
## 9 http://www.nytimes.com/1977/05/26/archives/star-wars-a-trip-to-a-far-galaxy-thats-fun-and-funny.html
##                                                       link.suggested_link_text
## 1                    Read the New York Times Review of Solo: A Star Wars Story
## 2                   Read the New York Times Review of Star Wars: The Last Jedi
## 3               Read the New York Times Review of Rogue One: A Star Wars Story
## 4 Read the New York Times Review of Star Wars: Episode VII - The Force Awakens
## 5                  Read the New York Times Review of Star Wars: The Clone Wars
## 6 Read the New York Times Review of Star Wars: Episode II Attack of the Clones
## 7  Read the New York Times Review of Star Wars: Episode I - The Phantom Menace
## 8                         Read the New York Times Review of Return of the Jedi
## 9                                  Read the New York Times Review of Star Wars
##       multimedia.type
## 1 mediumThreeByTwo210
## 2 mediumThreeByTwo210
## 3 mediumThreeByTwo210
## 4 mediumThreeByTwo210
## 5                <NA>
## 6                <NA>
## 7                <NA>
## 8                <NA>
## 9                <NA>
##                                                                                                                          multimedia.src
## 1 https://static01.nyt.com/images/2018/05/16/arts/16solo1/merlin_137749824_188fee9d-0d97-4538-962b-066a7b8784b5-mediumThreeByTwo210.jpg
## 2                               https://static01.nyt.com/images/2017/12/13/arts/13thelastjedi-3/13thelastjedi-3-mediumThreeByTwo210.jpg
## 3                                       https://static01.nyt.com/images/2016/12/14/arts/14ROGUEONE1/14ROGUEONE1-mediumThreeByTwo210.jpg
## 4                                     https://static01.nyt.com/images/2015/12/16/arts/STARWARSWEB1/STARWARSWEB1-mediumThreeByTwo210.jpg
## 5                                                                                                                                  <NA>
## 6                                                                                                                                  <NA>
## 7                                                                                                                                  <NA>
## 8                                                                                                                                  <NA>
## 9                                                                                                                                  <NA>
##   multimedia.width multimedia.height
## 1              210               140
## 2              210               140
## 3              210               140
## 4              210               140
## 5               NA                NA
## 6               NA                NA
## 7               NA                NA
## 8               NA                NA
## 9               NA                NA