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