-
-
Save abkosar/216f06cdde50bdc527af818c7f2423bb 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 DEATHS - BY ZIPCODES##################### | |
Zipcodes <- by_borough %>% | |
mutate(region = as.character(ZIP.CODE)) | |
ZipcodesGrouped = group_by(Zipcodes, BOROUGH, ZIP.CODE) | |
ZipCodes <- select(ZipcodesGrouped, region, NUMBER.OF.PERSONS.KILLED) %>% | |
summarise(sum(NUMBER.OF.PERSONS.KILLED)) | |
ZipCodes = ZipCodes[-1] | |
colnames(ZipCodes) = c("region", "value") | |
ZipCodes$region = clean.zipcodes(ZipCodes$region) ##integer to character | |
ZipCodes = ZipCodes[-which(is.na(ZipCodes$region)), ] | |
ZipCodes =ZipCodes[!duplicated(ZipCodes$region), ] | |
ZipCodes = ZipCodes[!ZipCodes$region %in% c("11249", "10000", "10048", "10281", "11695"), ] | |
Total_Death_by_Zipcodes <- zip_choropleth(ZipCodes, zip_zoom=ZipCodes$region, title = "Total Deaths by Zip Codes", legend = "Number of Total Deaths", num_colors = 5) | |
Total_Death_by_Zipcodes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment