-
-
Save hcozart/732af5c604d179aaf3f0fba57b2c8aa0 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
group_by(NYC_Death2 ,Year,Cause.of.Death)%>% | |
summarise(., Deaths = sum(Count))%>% | |
arrange(., Deaths)%>% | |
ggplot(data = ., aes(x= Year,y= Deaths)) + | |
geom_bar(aes(fill = reorder(Cause.of.Death, Deaths)), | |
position ="fill",stat = "identity") + | |
ylab(label = "Deaths" )+ scale_fill_discrete(name = "Cause of Death") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment