Package 'ozbabynames'

Title: Australian Popular Baby Names
Description: Data on the most popular baby names by sex and year, and for each state in Australia, as provided by the state and territory governments. The quality and quantity of the data varies with the state.
Authors: Rob Hyndman [aut, cre, cph] , Mitchell O'Hara-Wild [aut] , Jessie Roberts [aut], Nick Tierney [aut] , Anna Fergusson [ctb]
Maintainer: Rob Hyndman <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-21 05:50:49 UTC
Source: https://github.com/robjhyndman/ozbabynames

Help Index


ozbabynames: Popular Australian baby names.

Description

The ozbabynames package provides the data object 'ozbabynames' containing popular Australian baby names by sex, state/territory and year. The coverage is very uneven, with some states only providing very recent data, and some states only providing the top 50 or 100 names. The ACT do not provide counts, and so no ACT data are included. South Australia has by far the best data, with full coverage of all names from 1944-1917, although only the top 100 names thereafter.

Usage

ozbabynames

Format

tibble

Source

Various state government websites

Examples

head(ozbabynames)

# Plot most popular names in 2016
library(ggplot2)
library(dplyr)
ozbabynames |>
  filter(year == 2016) |>
  group_by(sex, name) |>
  summarise(count = sum(count)) |>
  arrange(-count) |>
  top_n(10) |>
  ungroup() |>
  ggplot(aes(x = reorder(name, count), y = count, group = sex)) +
  geom_bar(stat = "identity") +
  facet_grid(sex ~ ., scales = "free_y") +
  coord_flip() +
  ylab("Count") +
  xlab("Name") +
  ggtitle("Top ten male and female names in 2016")