-
-
Save EmZhu/b7d8fdf843ede894d990fb3af78c0648 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
#================================population per name | |
population_per_name = data.frame(Year = selected_years) | |
population_per_name$Ratio = population$Change / (filtered_national %>% group_by(Year) %>% summarise(Count = n_distinct(Name)))$Count | |
ggplot() + | |
geom_line(data=population_per_name, aes(Year, Ratio),color='purple') + | |
ylab('Population per name (in thousands)') + | |
ggtitle('Population per name') + | |
ylim(0, round_any(max(population_per_name$Ratio), 10000, f=ceiling)) | |
(max(population_per_name$Ratio) - min(population_per_name$Ratio)) / max(population_per_name$Ratio) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment