-
-
Save abkosar/443d889392a8f33be64b39a3deedd729 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 MOTORISTS KILLED IN COLLISIONS BY BOROUGH FOR EACH YEAR############# | |
Motorist_Deaths_Years <- by_borough %>% summarise(Total_Motorist_Killed = sum(NUMBER.OF.MOTORIST.KILLED)) | |
Total_Motorists_Killed_by_Years = ggplot(data = Motorist_Deaths_Years, aes(x = Year, y = Total_Motorist_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 Motorists Killed in Collisions by Year\n(From 07/2012 to 03/2016)') + | |
ylab("Number of Motorist Deaths\n") + | |
xlab("\nYear") + | |
scale_fill_brewer(palette = "Blues") + | |
theme(axis.text.x = element_text(angle = 0, hjust = 0.5)) | |
Total_Motorists_Killed_by_Years |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment