Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hadley/babynames
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Apr 14, 2017
2 parents 83fb6d3 + e60c69c commit 2814914
Show file tree
Hide file tree
Showing 10 changed files with 278 additions and 268 deletions.
3 changes: 2 additions & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ NULL
#'
#' @format A data frame with five variables: \code{year}, \code{sex},
#' \code{name}, \code{n} and \code{prop} (\code{n} divided by total number
#' of applicants in that year).
#' of applicants in that year, which means proportions are of people of
#' that gender with that name born in that year).
"babynames"

#' Applicants.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This package contains three datasets provided by the USA social security administration:

* `babynames`: For each year from 1880 to 2013, the number of children of
* `babynames`: For each year from 1880 to 2015, the number of children of
each sex given each name. All names with more than 5 uses are given.
(Source: http://www.ssa.gov/oact/babynames/limits.html)

Expand All @@ -17,7 +17,7 @@ This package contains three datasets provided by the USA social security adminis

It also includes the following data set from the US Census:

* `births`: Number of live births by year.
* `births`: Number of live births by year, up to 2014.
(Source: http://www.census.gov/statab/hist/02HS0013.xls and
http://www.cdc.gov/nchs/data/nvsr/nvsr62/nvsr62_09.pdf)

Expand Down
3 changes: 2 additions & 1 deletion data-raw/applicants.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ ssa$F <- parse_number(ssa$F)

applicants <- ssa %>%
gather(sex, n_all, M:F) %>%
arrange(year, sex)
arrange(year, sex) %>%
mutate(n_all = as.integer(n_all))

write_csv(applicants, "data-raw/applicants.csv")
devtools::use_data(applicants, overwrite = TRUE)
Loading

0 comments on commit 2814914

Please sign in to comment.