-
-
Save abkosar/ce53156d8bcd8710aee9e0f2de8ca197 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
#############TOTAL CYCLISTS KILLED IN COLLISIONS BY BOROUGH FOR EACH YEAR############# | |
Cyclist_Deaths_Years <- by_borough %>% summarise(Total_Cyclist_Killed = sum(NUMBER.OF.CYCLIST.KILLED)) | |
Total_Cyclists_Killed_by_Years = ggplot(data = Cyclist_Deaths_Years, aes(x = Year, y = Total_Cyclist_Killed)) + | |
geom_bar(aes(fill = BOROUGH), position = "dodge", stat = 'identity') + | |
theme_economist() + | |
theme(legend.position = "right") + | |
theme(legend.text=element_text(size=10)) + | |
ggtitle('Total Cyclists Killed in Collisions by Year\n(From 07/2012 to 03/2016)') + | |
ylab("Number of Cyclist Deaths\n") + | |
xlab("\nYear") + | |
scale_fill_brewer(palette = "Blues") + | |
theme(axis.text.x = element_text(angle = 0, hjust = 0)) | |
Total_Cyclists_Killed_by_Years |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment