This is an extension of the tidytuesday assignment you have already done. Complete the questions below, using the screencast you chose for the tidytuesday assigment.
library(tidyverse)
theme_set(theme_light())
simpsons <- readr::read_delim("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-08-27/simpsons-guests.csv", delim = "|", quote = "")
The data in this dataset from the github link is listing the guest star appearances in episodes of The Simpsons and how often they have been in the show and the episodes in which they’re featured. The variables include season, episode number, production code, episode title, guest star, and their role.
Hint: One graph of your choice.
simpsons %>%
separate_rows(role, sep = ";\\s+") %>%
add_count(role) %>%
filter(n >= 8) %>%
count(season, role) %>%
mutate(role = fct_reorder(role, -n, sum)) %>%
ggplot(aes(season, n)) +
geom_col() +
facet_wrap(~ role)
The graph plots the characters and guests who have been shown the most often in The Simpsons in different episodes.