ratings_df <- read.csv(
"https://raw.githubusercontent.com/mj-nurse/mnurse-data_607/refs/heads/main/assignment-02a-movie-ratings/movie_ratings.csv",
na.strings = c("", "NULL")
)
head(ratings_df)
## respondent_label title rating
## 1 Person 1 The Drama 4
## 2 Person 1 Michael 3
## 3 Person 1 Obsession 5
## 4 Person 1 Backrooms 4
## 5 Person 1 The Odyssey 5
## 6 Person 1 Spider-Man: Brand New Day 3
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
movie_summary <- ratings_df %>%
group_by(title) %>%
summarise(
rating_count = sum(!is.na(rating)),
missing_ratings = sum(is.na(rating)),
average_rating = round(mean(rating, na.rm = TRUE), 2)
) %>%
arrange(desc(average_rating))
movie_summary
## # A tibble: 6 × 4
## title rating_count missing_ratings average_rating
## <chr> <int> <int> <dbl>
## 1 The Odyssey 13 9 4.15
## 2 Obsession 18 4 3.94
## 3 Spider-Man: Brand New Day 18 4 3.89
## 4 The Drama 12 10 3.58
## 5 Michael 13 9 3.54
## 6 Backrooms 10 12 3.1
Participants who selected “Not Seen” were stored as missing values
rather than assigning them a numeric rating. In R, these values are
represented as NA. When calculating average ratings, I used
only actual ratings from 1 through 5 were included in the calculation.
This prevents a movie from receiving an artificially low score simply
because a participant had not seen it. So in conclusion of my data, the
people voted The Odyssey as the best movie of the 6 with an average of
4.15 / 5. While, Backrooms scored the lowest on average with a score of
3.10 / 5. Fun fact, Obsession & Spider-Man were tied for the most
watched/rated movie with 18 / 22 ratings.