Last active
February 8, 2019 09:06
-
-
Save toyeiei/d631be48082ee89ae36148c531efcc75 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
# package ggplot2 | |
install.packages("ggplot2") | |
library(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