-
-
Save abkosar/88512e9b96003d1456aace445b125aaf 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
############################################## | |
#####BOROUGH ANALYSIS BY NUMBER OF DEATHS##### | |
############################################## | |
Borough_Deaths_Years <- by_borough %>% summarise(total_people_killed = sum(NUMBER.OF.PERSONS.KILLED)) | |
#############TOTAL PEOPLE KILLED IN COLLISIONS BY BOROUGH FOR EACH YEAR############# | |
Total_Deaths_by_Years = ggplot(data = Borough_Deaths_Years, aes(x = Year, y = total_people_killed)) + | |
geom_bar(aes(fill = BOROUGH), stat = 'identity') + | |
theme_economist() + | |
theme(legend.position = "right") + | |
theme(legend.text=element_text(size=5)) + | |
ggtitle('Total People Killed in Collisions by Year') + | |
ylab("Number of Total Deaths\n") + | |
xlab("\nYear") + | |
scale_fill_brewer(palette = "Blues") + | |
theme(axis.text.x = element_text(vjust = 0, angle = 0, hjust = 0.5)) + | |
theme(legend.position = "right") + | |
theme(legend.text=element_text(size=10)) | |
Total_Deaths_by_Years |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment