Data Visualization for the IS607 Project No. 2 | CUNY MSDA

Load data

load("Awards.Data.RData")

#View(data.awards)
library(tidyr)
library(dplyr)
library(ggplot2)
library(knitr)
library(gridExtra)

Table.1 Number of times a Best Picture winner was nominated or won another category.

# Create BP, a dataframe showing only Best Picture Winners
BP <- filter(data.awards, category_name == "BEST PICTURE", won == 1)

# Create BP.AlsoNom, a dataframe showing what other categories the Best Picture Winners were NOMINATED for
BP.AlsoNom <- left_join(BP, data.awards, by = "movie_name") 
BP.AlsoNom <- filter(BP.AlsoNom, category_name.y != "BEST PICTURE") 
BP.AlsoNom <- select(BP.AlsoNom, category_name.y) 
BP.AlsoNom <- count(BP.AlsoNom, category_name.y)
BP.AlsoNom <- arrange(BP.AlsoNom, desc(n))

# Create BP.AlsoWon, a dataframe showing what other categories the Best Picture winners WON
data.awards.won <- filter(data.awards, won == 1)

BP.AlsoWon <- left_join(BP, data.awards.won, by = "movie_name")
BP.AlsoWon <- filter(BP.AlsoWon, category_name.y != "BEST PICTURE") 
BP.AlsoWon <- select(BP.AlsoWon, category_name.y) 
BP.AlsoWon <- count(BP.AlsoWon, category_name.y)
BP.AlsoWon <- arrange(BP.AlsoWon, desc(n))

kable(cbind(BP.AlsoNom, BP.AlsoWon), 
      col.names = c("Category Nominations", "Count", "Category Winners", "Count"))
Category Nominations Count Category Winners Count
WRITING 80 DIRECTING 61
DIRECTING 78 WRITING 56
FILM EDITING 69 FILM EDITING 33
ACTOR – LEADING ROLE 59 ART DIRECTION 27
ACTOR – SUPPORTING ROLE 55 ACTOR – LEADING ROLE 26
CINEMATOGRAPHY 54 CINEMATOGRAPHY 25
MUSIC (SCORING) 50 MUSIC (SCORING) 24
ART DIRECTION 48 SOUND 23
SOUND 45 COSTUME DESIGN 19
ACTRESS – SUPPORTING ROLE 36 ACTOR – SUPPORTING ROLE 15
COSTUME DESIGN 34 ACTRESS – SUPPORTING ROLE 12
ACTRESS – LEADING ROLE 28 ACTRESS – LEADING ROLE 11
MAKEUP 10 MUSIC (SONG) 5
MUSIC (SONG) 10 MAKEUP 4
SOUND EDITING 7 VISUAL EFFECTS 4
VISUAL EFFECTS 5 SOUND EDITING 3

Figure 1. Barchart showing the number of times a Best Picture winner was nominated or won another category.

nom <- ggplot(data = BP.AlsoNom, aes(x = reorder(category_name.y, n), y=n)) + geom_bar(stat="identity") + coord_flip() + labs(x = "Category", y = "Nominations")

win <- ggplot(data = BP.AlsoWon, aes(x = reorder(category_name.y, n), y=n)) + geom_bar(stat="identity") + coord_flip() + labs(x = "Category", y = "Wins") + ylim(0, 80)

grid.arrange(nom, win, ncol=1)