/
nibabynames.R
31 lines (31 loc) · 1.02 KB
/
nibabynames.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#' Northern Ireland baby names
#'
#' Full baby name data from 1997 to 2020 for Northern Ireland
#' from the Northern Ireland Statistics and Research Agency.
#'
#' @name nibabynames
#' @docType data
#' @format A data frame with 22,596 observations on 6 variables.
#' \describe{
#' \item{year}{A year (1997-2020).}
#' \item{sex}{Sex, `M` for male and `F` for female.}
#' \item{name}{A name.}
#' \item{n}{Count of name within year and sex.}
#' \item{rank}{Rank of name within year and sex.}
#' \item{nation}{Nation of data source: `Northern Ireland`.}
#' }
#' @source
#' Northern Ireland Statistics and Research Agency. 2021. [Baby Names Statistics Boys and Girls](https://www.nisra.gov.uk/publications/baby-names-2020-0).
#' @examples
#' library(ggplot2)
#' library(dplyr)
#'
#' nibabynames %>%
#' filter(name == "Joseph") %>%
#' ggplot(aes(x = year, y = n)) +
#' geom_line() +
#' labs(
#' title = "Popularity of the name `Joseph` in Northern Ireland",
#' x = "Year", y = "Number of babies"
#' )
"nibabynames"