Created
December 30, 2019 19:09
-
-
Save JosiahParry/294cad3d481a6bcc80090b88e200644b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
library(bbcharts) | |
library(tidyverse) | |
rock <- decade_end_bb("hot-rock-songs") | |
real_rock <- c("The Black Keys", "Panic! At The Disco", "Foo Fighters", "Fall Out Boy") | |
count(rock, artist, sort = TRUE) %>% | |
filter(n >= 2) %>% | |
mutate(artist = fct_reorder(artist, n), | |
`Actual Rock` = ifelse(artist %in% real_rock, "yep", "probably not")) %>% | |
ggplot(aes(artist, n, fill = `Actual Rock`)) + | |
geom_col(width = .75) + | |
coord_flip() + | |
theme_bari() + | |
scale_fill_manual(values = c("grey40", "grey85")) + | |
theme( | |
legend.position = "bottom" | |
) + | |
labs(x = "", | |
y = "# Songs in Top 50", | |
subtitle = 'Top "Rock" Artists of the Decade') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment