Created
September 1, 2017 14:53
-
-
Save conormm/742bbdab37c47efd50cd9ffdce530081 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
imdb_score_summary <- df %>% | |
summarise_each(funs(min, max, mean, median, sd), imdb_score) %>% | |
gather(stat, value) | |
df %>% | |
ggplot(aes(imdb_score)) + | |
geom_histogram(bins = 50, colour = "black", fill = "red", alpha = 0.4) + | |
theme_minimal() + | |
annotation_custom(tableGrob(imdb_score_summary, rows = NULL), | |
xmin = 2.5, | |
xmax = 4, | |
ymin = 300, ymax = 400) + | |
labs(title = "IMDB score distribution") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment