Title: Names Given to Babies in Ontario Between 1917 and 2018
Version: 0.0.1
Language: en-US
Description: A database containing the names of the babies born in Ontario between 1917 and 2018. Counts of fewer than 5 names were suppressed for privacy.
License: MIT + file LICENSE
URL: <https://github.com/desautm/onbabynames>
BugReports: https://github.com/desautm/onbabynames/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
Depends: R (≥ 2.10)
Imports: tibble
Suggests: dplyr, ggplot2
NeedsCompilation: no
Packaged: 2021-04-30 13:30:42 UTC; mdesautels
Author: Marc-Andre Desautels [aut, cre]
Maintainer: Marc-Andre Desautels <marc-andre.desautels@cstjean.qc.ca>
Repository: CRAN
Date/Publication: 2021-05-03 07:10:02 UTC

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

https://data.ontario.ca/dataset/eb4c585c-6ada-4de7-8ff1-e876fb1a6b0b/resource/919b7260-aafd-4af1-a427-38a51dbc8436/download/ontario_top_baby_names_male_1917-2018_en_fr.csv

https://data.ontario.ca/dataset/4d339626-98f9-49fe-aede-d64f03fa914f/resource/0c4aec56-b2b8-499b-9739-68ab8a56e69a/download/ontario_top_baby_names_female_1917-2018_en_fr.csv

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()