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.

Import data

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 = "")

Description of the data and definition of variables

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.

Visualize data

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)

What is the story behind the graph?

The graph plots the characters and guests who have been shown the most often in The Simpsons in different episodes.

Hide the messages, but display the code and its results on the webpage.

Write your name for the author at the top.

Use the correct slug.