Created
February 3, 2021 19:01
-
-
Save erikgregorywebb/693c93659ea361c8fbdba16c7916e9c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rating_trends_plot = all_shows %>% | |
mutate(season = factor(season, levels = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))) %>% | |
mutate(show = factor(show, levels = c('The Office', 'Parks & Recreation', 'Modern Family', 'Community', 'New Girl', 'The Good Place'))) %>% | |
ggplot(., aes(x = airdate, y = rating, col = show, group = season)) + | |
geom_line(alpha = .5) + geom_smooth(se = F, size = 2) + | |
theme(legend.position = 'none') + | |
labs(title = 'Ratings Trend by Show', subtitle = 'IMDb Episode Average Rating, All Seasons', | |
y = 'Average Rating', x = 'Year', fill = 'Season', caption = 'Data Source: IDMb.com | Author: @erikgregorywebb') + | |
facet_wrap(~show, scales = 'free') + | |
scale_y_continuous(limits = c(6, 10)) + | |
theme(text = element_text(size = 15)) | |
rating_trends_plot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment