Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# package ggplot2
# create bar plot
small_page %>%
group_by(type) %>%
summarise(avg_like = mean(like)) %>%
arrange(desc(avg_like)) %>%
ggplot(aes(x = reorder(type, avg_like), y = avg_like)) +
geom_col(fill = "#3b5998") +
theme_minimal() +
labs(title = "Most popular content on DataRockie",
x = "content type",
y = "average like per post",
subtitle = "Photo posts received most averrage likes, followed by video and link respectively",
caption = "source: DataRockie FB Page")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment