clean_and_munge_england_births: A Function to Clean and Merge Observed and Projected Births...

Description Usage Arguments Value

View source: R/clean_munge_england_births.R

Description

This functions loads in observed and projected birth data produced by the Office of National Statistics and combines both datasets into a single tidy dataframe. Observed births can be downloaded here, and projected births can be downloaded here.

Usage

1
2
3
4
5
  clean_and_munge_england_births(birth_path = "~/data/tb_data/UK_demographics/annual_reference_table.xls",
  projected_birth_path = "~/data/tb_data/UK_demographics/england_population_projections.xls",
  return = TRUE, save = TRUE, save_name = "england_births",
  save_path = "~/data/tb_data/tbinenglanddataclean", save_format = c("rds",
  "csv"), verbose = TRUE, interactive = TRUE, theme_set = theme_minimal)

Arguments

birth_path

The file path to the unformated observed births data, see the description for details.

projected_birth_path

The file path to the unformated projected births data, see the description for details.

return

Logical, defaults to TRUE. Specifies whether to return cleanded data.

save

Logical, defaults to FALSE. Specifies whether to save data

save_name

A character string contaning the file name for the data to be saved under.

save_path

The filepath for the data to be saved in

save_format

A character vector specifying the format/formats to save the data into, defaults to rds. Currently csv is also supported. See save_data for details.

verbose

A logical indicating whether summary information should be provided.

interactive

Logical, defaults to TRUE. Should the summary graphs be returned as interactive objects.

theme_set

The ggplot theme to apply to the summary graphs, defaults to theme_minimal

Value

A tidy data frame containing observed and projected births for England.


seabbs/tbinenglanddataclean documentation built on May 4, 2018, 3:41 a.m.