onbabynames {onbabynames} | R Documentation |
Names of babies in Ontario Between 1917 and 2018
Description
A database containing the first names of babies born in Ontario between 1917 and 2018. Counts of fewer than 5 names were suppressed for privacy.
Usage
onbabynames
Format
A database containing 161 703 lines and 4 columns:
- year
Year
- sex
F for female and M for male
- name
Name
- n
Frequency
Source
Examples
library(dplyr)
# The five most popular girls names in Ontario in 2018
onbabynames %>%
filter(year == 2018 & sex == "F") %>%
arrange(desc(n)) %>%
head(5)
library(ggplot2)
# The popularity of the five most popular girls names in Ontario in 2018
# between 1917 and 2018
girls2018 <- onbabynames %>%
filter(year == 2018 & sex == "F") %>%
arrange(desc(n)) %>%
select(name) %>%
head(5)
onbabynames %>%
filter(name %in% girls2018$name) %>%
ggplot(aes(x = year, y = n, color = name)) +
geom_line()
[Package onbabynames version 0.0.1 Index]