Intro

The data analyzed in this assignment was movie reviews critiques and their critiques, pulled from the New York Times API. The task included accessing the chosen information contained in the API for it to then bwe read in the JSON data, and transformed into an R DataFrame.

Importing libraries and retrieving the Data

library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6     ✔ purrr   0.3.4
## ✔ tibble  3.1.7     ✔ dplyr   1.0.9
## ✔ tidyr   1.2.0     ✔ stringr 1.4.0
## ✔ readr   2.1.2     ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(httr)
library(rvest)
## 
## Attaching package: 'rvest'
## 
## The following object is masked from 'package:readr':
## 
##     guess_encoding
library(jsonlite)
## 
## Attaching package: 'jsonlite'
## 
## The following object is masked from 'package:purrr':
## 
##     flatten
library(knitr)


response <- GET("https://api.nytimes.com/svc/movies/v2/reviews/search.json?api-key=yNHI7wXwGGegzABJslljTcIvEZuAHVqp")
content <- content(response, "text")
data <- fromJSON(content)

Creating the Dataframe

movie_rev <- data.frame(data$results)
movie_rev$link <- movie_rev$link$url
movie_rev <- subset(movie_rev, select = c(-multimedia, -opening_date, -date_updated))

movie_rev$critics_pick <- ifelse(movie_rev$critics_pick == 1, "yes", "no")
knitr::kable(movie_rev, col.names = c("Movie Titles", "MPAA Ratign", "Critics Pick", "Critics", "Review Headline", "Review Summary (Short)", "Publication Date", "Link"))
Movie Titles MPAA Ratign Critics Pick Critics Review Headline Review Summary (Short) Publication Date Link
Tori and Lokita yes Manohla Dargis ‘Tori and Lokita’ Review: Precarious Lives in Exile In the new movie from the Dardenne brothers, two underage African migrants struggle to make a home in an unkind land. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/tori-and-lokita-review-dardenne.html
The Worst Ones yes Lisa Kennedy ‘The Worst Ones’ Review: The Gazes of Children In their feature, the directors Lisa Akoka and Romane Gueret build a provocative critique of filmmaking practices. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/the-worst-ones-review.html
Petite Solange yes Natalia Winkelman ‘Petite Solange’ Review: Coming of Age as Your Parents Divorce Axelle Ropert’s carefully calibrated film from France follows a girl experiencing the pain of having to accept her parents as people with faults. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/petite-solange-review.html
Reggie PG-13 yes Glenn Kenny ‘Reggie’ Review: Reggie Jackson on Himself, Racism and, Yes, Baseball Jackson, a.k.a. Mr. October, was called a lot of things during his storied career with the Yankees. A new documentary goes beyond the nicknames. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/reggie-review.html
Nam June Paik: Moon Is the Oldest TV yes Nicolas Rapold ‘Nam June Paik: Moon Is the Oldest TV’ Review: Art Onscreen A new documentary follows the ceaseless innovations of a man who made art out of television sets and found inspiration in disruption. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/nam-june-paik-moon-is-the-oldest-tv-review.html
Walk Up yes Austin Considine ‘Walk Up’ Review: Good Friends Make Bad Neighbors Hong Sang-soo’s latest film traces the relationships in a small Seoul apartment building as they evolve and grow heavier with complications. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/walk-up-review.html
The Lost King PG-13 yes Jeannette Catsoulis ‘The Lost King’ Review: A Royal Obsession Sally Hawkins lights a fire under this droll dramedy about the search for the final resting place of Richard III. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/the-lost-king-review.html
The Five Devils yes Beatrice Loayza ‘The Five Devils’ Review: The Scent of the Past Part queer love story, part supernatural psychodrama, the uncanny second feature by Léa Mysius follows a young girl with a magical sense of smell. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/the-five-devils-review.html
John Wick: Chapter 4 R no Manohla Dargis ‘John Wick: Chapter 4’ Review: There Will Be Blood, Yeah In the latest and longest movie set in Wick World, Keanu Reeves’s titular assassin visits Paris and paints the town red. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/john-wick-chapter-4-keanu-reeves.html
A Good Person R no Brandon Yu ‘A Good Person’ Review: Zach Braff’s New Chapter The filmmaker behind “Garden State” has created a fully drawn female character in Florence Pugh’s grieving addict. But this recovery drama often has too heavy a hand. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/a-good-person-review-zach-braff.html
Ithaka no Amy Nicholson ‘Ithaka’ Review: In Julian Assange They Trust A frustrating new advocacy documentary about the WikiLeaks founder, with appearances by his father and wife, loses its footing on weak assertions and reporting. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/ithaka-review.html
What the Hell Happened to Blood, Sweat & Tears? no Calum Marsh ‘What the Hell Happened to Blood, Sweat & Tears?’ Review: What Goes Up The rise and fall of a classic-rock band is chronicled (shakily) in this documentary. 2023-03-23 https://www.nytimes.com/2023/03/23/movies/what-the-hell-happened-to-blood-sweat-tears-review.html
Kubrick by Kubrick no Ben Kenigsberg ‘Kubrick by Kubrick’ Review: Stanley Plays Himself A primer on the filmmaker’s career and interests won’t offer much that will surprise even mild obsessives, but it does pierce some of the mystique. 2023-03-21 https://www.nytimes.com/2023/03/21/movies/kubrick-by-kubrick-review.html
Rimini yes Beatrice Loayza ‘Rimini’ Review: Just an Austrian Gigolo The director Ulrich Seidl’s unsettling drama tracks the exploitative behaviors of an aging lounge singer, his fans and family members. 2023-03-16 https://www.nytimes.com/2023/03/16/movies/rimini-review.html
Drylongso R yes Lisa Kennedy ‘Drylongso’ Review: Extraordinary Cauleen Smith’s 1998 movie, set in Oakland in the mid-90s, remains a vivid and prescient feature debut. 2023-03-16 https://www.nytimes.com/2023/03/16/movies/drylongso-review.html
The Innocent yes Claire Shaffer ‘The Innocent’ Review: A Heist With a French Accent A light, enjoyable confection of a film that is built upon an amusingly absurd premise. 2023-03-16 https://www.nytimes.com/2023/03/16/movies/the-innocent-review-a-heist-with-a-french-accent.html
Moving On R no A.O. Scott ‘Moving On’ Review: Cracking Jokes and Settling Scores Lily Tomlin and Jane Fonda team up in an awkward comedy about two women contemplating the murder of a predatory man. 2023-03-16 https://www.nytimes.com/2023/03/16/movies/moving-on-review-lily-tomlin-jane-fonda.html
Inside R no Amy Nicholson ‘Inside’ Review: Tortured Artist, Meet Tortured Man Willem Dafoe stars as an art thief who gets trapped in a penthouse in this drama. 2023-03-16 https://www.nytimes.com/2023/03/16/movies/inside-review-willem-dafoe.html
The Spirit of ’45 no Ben Kenigsberg ‘The Spirit of ’45’ Review: Here Comes Nationalization A documentary from Ken Loach sees the end of World War II as a brief moment of possibility for socialism in Britain. 2023-03-16 https://www.nytimes.com/2023/03/16/movies/the-spirit-of-45-review.html
Shazam! Fury of the Gods PG-13 no Amy Nicholson ‘Shazam! Fury of the Gods’ Review: Yells Like Teen Spirit The problem with this sequel is that the character used up his best ideas in the first movie. 2023-03-16 https://www.nytimes.com/2023/03/16/movies/shazam-fury-of-the-gods-review.html

Analysis

This analysis dives into how each critic critics their reviewed movies. The dataset was filtered to only analyze those who critiqued more than 1 movie to recognize any pattern that may arise.

 repetitive_critcs <- movie_rev %>%
     arrange(byline) %>%
     filter(duplicated(byline) | duplicated(byline, fromLast = TRUE))
critiques_count <- repetitive_critcs %>%
  group_by(byline, critics_pick) %>%
  summarize(count = n())
## `summarise()` has grouped output by 'byline'. You can override using the
## `.groups` argument.

##Visualization

ggplot(critiques_count, aes(byline, count, fill = critics_pick)) +
  geom_col() +
  scale_fill_manual(values = c("#C80404", "#C804B2")) +
  labs(x = "Critics", y = "Count", fill = "Critic Pick", title ="Diversity in Critics Recommendations") +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1),
        plot.title = element_text(hjust = 0.5))

repetitive_critcs %>%
  filter(byline == "Manohla Dargis")
##          display_title mpaa_rating critics_pick         byline
## 1      Tori and Lokita                      yes Manohla Dargis
## 2 John Wick: Chapter 4           R           no Manohla Dargis
##                                                   headline
## 1      ‘Tori and Lokita’ Review: Precarious Lives in Exile
## 2 ‘John Wick: Chapter 4’ Review: There Will Be Blood, Yeah
##                                                                                                              summary_short
## 1    In the new movie from the Dardenne brothers, two underage African migrants struggle to make a home in an unkind land.
## 2 In the latest and longest movie set in Wick World, Keanu Reeves’s titular assassin visits Paris and paints the town red.
##   publication_date
## 1       2023-03-23
## 2       2023-03-23
##                                                                              link
## 1  https://www.nytimes.com/2023/03/23/movies/tori-and-lokita-review-dardenne.html
## 2 https://www.nytimes.com/2023/03/23/movies/john-wick-chapter-4-keanu-reeves.html

##Conclusion As shown in the visualization, we see that most critics who analyze movies are unannimous in their decision as to whether they would recommenend said movie. The only critic to have some diversity within their answers is Manohla Dargis where from the 2 movies she reviewed, she recommended 1 (Tori and Lokita) and not the other (John Wick: Chapter 4.