-
-
Save abkosar/0eff40d74a9c70af2d395c947f2aec4c 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 NUMBER OF PEDESTRIAN DEATHS - BY ZIPCODES##################### | |
ZipCodes_Pedestrian <- select(ZipcodesGrouped, region, NUMBER.OF.PEDESTRIANS.KILLED) %>% | |
summarise(sum(NUMBER.OF.PEDESTRIANS.KILLED)) | |
ZipCodes_Pedestrian = ZipCodes_Pedestrian[-1] | |
colnames(ZipCodes_Pedestrian) = c("region", "value") | |
ZipCodes_Pedestrian$region = clean.zipcodes(ZipCodes_Pedestrian$region) ##integer to character | |
ZipCodes_Pedestrian = ZipCodes_Pedestrian[-which(is.na(ZipCodes_Pedestrian$region)), ] | |
ZipCodes_Pedestrian =ZipCodes_Pedestrian[!duplicated(ZipCodes_Pedestrian$region), ] | |
ZipCodes_Pedestrian = ZipCodes_Pedestrian[!ZipCodes_Pedestrian$region %in% c("11249", "10000", "10048", "10281", "11695"), ] | |
Total_Death_by_Zipcodes_Pedestrian <- zip_choropleth(ZipCodes_Pedestrian, zip_zoom=ZipCodes_Pedestrian$region, title = "Total Deaths Pedestrians by Zip Codes", legend = "Number of Total Deaths", num_colors = 7) | |
Total_Death_by_Zipcodes_Pedestrian |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment