This vignette is to recreate an analysis on Pixar ratings that can be found here.
Before we can visualize our data, let’s wrangle our data to help us visualize it later on.
df <-
public_response %>%
select(-cinema_score, -ends_with("counts")) %>%
mutate(imdb_score = imdb_score * 10) %>%
mutate(film = fct_inorder(film)) %>%
pivot_longer(cols = c("rotten_tomatoes_score", "metacritic_score", "imdb_score"),
names_to = "ratings",
values_to = "value") %>%
mutate(ratings = case_when(
ratings == "imdb_score" ~ "IMDb (Scaled)",
ratings == "rotten_tomatoes_score" ~ "Rotten Tomatoes",
ratings == "metacritic_score" ~ "Metacritic"
)) %>%
drop_na()
Their first plot was comparing the Pixar films’ ratings over time.
df %>%
ggplot(aes(x = film, y = value, col = ratings)) +
geom_point() +
geom_line(aes(group = ratings)) +
scale_color_brewer(palette = "Dark2") +
labs(x = "Pixar film", y = "Rating value") +
guides(col = guide_legend(title = "Ratings")) +
theme_minimal() +
scale_y_continuous(limits = c(0, 100)) +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5),
legend.position = "bottom")
Verdict: people and critics generally agree that Cars 2 was not as good as the other Pixar films.
Next, let’s group the rating categories to see if there is a consistency across.
df %>%
ggplot(aes(x = ratings, y = value, col = ratings)) +
geom_boxplot(width = 1.75 / length(unique(df$ratings))) +
ggbeeswarm::geom_beeswarm() +
ggrepel::geom_label_repel(
data = . %>% filter(film == "Cars 2" ),
aes(label = film),
point.padding = 0.5,
nudge_x = 0.1
) +
scale_color_brewer(palette = "Dark2") +
guides(col = guide_legend(title = "Ratings")) +
labs(x = "Rating group", y = "Rating value") +
ylim(c(0, 100)) +
theme_minimal() +
theme(legend.position = "bottom")
Verdict: people at Rotten Tomatoes generally like Pixar films more than Metacritic and IMDb. The exception to this is Cars 2, which is consistently lowly rated.
Are the groups statistically consistent? Let’s perform an interclass correlation among the different critic groups.
public_response %>%
select(-c(film, cinema_score), -ends_with("counts")) %>%
drop_na() %>%
icc(model = "twoway", type = "consistency")
#> Single Score Intraclass Correlation
#>
#> Model: twoway
#> Type : consistency
#>
#> Subjects = 28
#> Raters = 3
#> ICC(C,1) = 0.449
#>
#> F-Test, H0: r0 = 0 ; H1: r0 > 0
#> F(27,54) = 3.45 , p = 5.35e-05
#>
#> 95%-Confidence Interval for ICC Population Values:
#> 0.219 < ICC < 0.665
Verdict: with a null hypothesis that all critic groups are not consistent, for the 28 Pixar films we have data for all critic groups, all groups are consistent in rating Pixar films (p < 0.001).
sessionInfo()
#> R version 4.4.2 (2024-10-31)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.1 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] irr_0.84.1 lpSolve_5.6.22 forcats_1.0.0 tidyr_1.3.1
#> [5] patchwork_1.3.0 lubridate_1.9.3 ggplot2_3.5.1 dplyr_1.1.4
#> [9] pixarfilms_0.2.1 rmarkdown_2.29
#>
#> loaded via a namespace (and not attached):
#> [1] sass_0.4.9 utf8_1.2.4 generics_0.1.3 digest_0.6.37
#> [5] magrittr_2.0.3 evaluate_1.0.1 grid_4.4.2 timechange_0.3.0
#> [9] RColorBrewer_1.1-3 fastmap_1.2.0 jsonlite_1.8.9 ggrepel_0.9.6
#> [13] purrr_1.0.2 fansi_1.0.6 scales_1.3.0 jquerylib_0.1.4
#> [17] cli_3.6.3 rlang_1.1.4 munsell_0.5.1 withr_3.0.2
#> [21] cachem_1.1.0 yaml_2.3.10 ggbeeswarm_0.7.2 tools_4.4.2
#> [25] colorspace_2.1-1 buildtools_1.0.0 vctrs_0.6.5 R6_2.5.1
#> [29] lifecycle_1.0.4 vipor_0.4.7 pkgconfig_2.0.3 beeswarm_0.4.0
#> [33] pillar_1.9.0 bslib_0.8.0 gtable_0.3.6 Rcpp_1.0.13-1
#> [37] glue_1.8.0 xfun_0.49 tibble_3.2.1 tidyselect_1.2.1
#> [41] sys_3.4.3 knitr_1.49 farver_2.1.2 htmltools_0.5.8.1
#> [45] maketools_1.3.1 labeling_0.4.3 compiler_4.4.2