Assignment 3: Data Wrangling
Author: Brooke Comito
Date: 2025-03-17
Load necessary libraries
library(dplyr) library(readr)
View the first few rows
head(movies)
——————————————-
Answering the Questions
——————————————-
Question 1: Are the best-rated movies also the most profitable?
Answer:
Looking at the sorted data, high ratings do not always mean high
profitability.
For example:
- “WALL-E” has the highest Rotten Tomatoes % (96%) but low
profitability (2.90 million).
- “Midnight in Paris” (93%) and “Enchanted” (93%) have moderate
profits.
- “Knocked Up” (91%) has higher profitability.
Conclusion:
The best-rated movies are not necessarily the most profitable.
While high Rotten Tomatoes scores indicate critical acclaim,
financial success is influenced
by factors such as marketing, production budget, and audience
reach.
——————————————-
——————————————-
movies_summary <- movies_final %>% group_by(Genre) %>%
summarize( avg_rating = mean(Rotten Tomatoes %
, na.rm =
TRUE), avg_profit_millions = mean(Profitability_millions, na.rm = TRUE)
)
View the summary results
head(movies_summary)
Observations:
- Animation and Comedy genres tend to have higher average
profitability.
- Drama and Romance tend to have higher Rotten Tomatoes ratings but
lower profitability.
- This suggests that some critically acclaimed genres may not always
be the most commercially successful.
——————————————-
Final Thoughts:
——————————————-
This analysis shows that movie success is not solely based on
ratings but also on financial factors.
While high Rotten Tomatoes scores indicate critical success,
profitability depends on variables
such as production cost, distribution strategy, and audience
appeal.