Skip to content

Instantly share code, notes, and snippets.

@EmZhu
Created August 16, 2016 00:23
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 EmZhu/fb31aa94afb6ee1e2207a18da3266562 to your computer and use it in GitHub Desktop.
Save EmZhu/fb31aa94afb6ee1e2207a18da3266562 to your computer and use it in GitHub Desktop.
population_range = max(population$Change) - min(population$Change)
population$Normalized = (population$Change - min(population$Change)) / population_range
population$distinct_national = distinct_national$Normalized
ggplot(population, aes(Year)) +
geom_line(aes(y=distinct_national, color='blue')) +
geom_line(aes(y=Normalized, color='red')) +
scale_colour_manual("",
labels = c("Unique names", "Population"),
values = c("red", "blue")) +
ggtitle('Number of unique names against population')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment