Skip to content

Instantly share code, notes, and snippets.

Created August 4, 2016 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/773677047272343d8e2de7ba539e9b7a to your computer and use it in GitHub Desktop.
Save anonymous/773677047272343d8e2de7ba539e9b7a to your computer and use it in GitHub Desktop.
Mean population density
stden <- crime_nys %>%
select(Year, Density.sq.mi) %>%
group_by(Year) %>%
summarise(Density.sq.mi=mean(Density.sq.mi))
p9 <- ggplot(stden, aes(x=Year, y=Density.sq.mi)) +
geom_line() +
ggtitle('Population Density in New York State (minus NYC)') +
xlab('Year') +
ylab('Population Density (ppl/sq.mi)') +
theme_minimal()
p9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment