knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(ggplot2) library(k3reviews)
df <- get_songs_ratings(get_all_song_filenames()) knitr::kable(head(df))
filenames <- unique(df$filename) n_songs <- length(filenames) message("Number of songs: ", n_songs) n_reviewed <- sum(filenames %in% na.omit(df)$filename) n_unreviewed <- sum(!filenames %in% na.omit(df)$filename) message("Reviewed: ", n_reviewed) message("Not reviewed: ", n_unreviewed)
ggplot(na.omit(df), aes(x = formation, fill = reviewer)) + geom_histogram(stat = "count")
df$rating <- as.numeric(df$rating) ggplot(na.omit(df), aes(x = reviewer, y = rating)) + geom_boxplot()
df$rating <- as.numeric(df$rating) ggplot(na.omit(df), aes(x = formation, y = rating, fill = reviewer)) + geom_boxplot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.