/
clean_and_munge_england_births.Rd
48 lines (36 loc) · 2.36 KB
/
clean_and_munge_england_births.Rd
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clean_munge_england_births.R
\name{clean_and_munge_england_births}
\alias{clean_and_munge_england_births}
\title{A Function to Clean and Merge Observed and Projected Births in England}
\usage{
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{
\item{birth_path}{The file path to the unformated observed births data, see the description for details.}
\item{projected_birth_path}{The file path to the unformated projected births data, see the description for details.}
\item{return}{Logical, defaults to \code{TRUE}. Specifies whether to return cleanded data.}
\item{save}{Logical, defaults to \code{FALSE}. Specifies whether to save data}
\item{save_name}{A character string contaning the file name for the data to be saved under.}
\item{save_path}{The filepath for the data to be saved in}
\item{save_format}{A character vector specifying the format/formats to save the data into, defaults to rds. Currently
csv is also supported. See \code{\link[idmodelr]{save_data}} for details.}
\item{verbose}{A logical indicating whether summary information should be provided.}
\item{interactive}{Logical, defaults to \code{TRUE}. Should the summary graphs be returned as interactive objects.}
\item{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.
}
\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 \href{https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/vitalstatisticspopulationandhealthreferencetables}{here},
and projected births can be downloaded \href{https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/populationprojections/datasets/tablea14principalprojectionenglandsummary}{here}.
}
\examples{
}