R/DDharmonize_validate_BirthCounts.R
DDharmonize_validate_BirthCounts.Rd
This script implements a workflow for births counts from vr or census extracting data from Demodata, harmonizing age groups, identifying full series, selecting preferred series, validating totals by age and, eventually including key fields in the function output.
DDharmonize_validate_BirthCounts(
locid,
times,
process = c("census", "vr"),
return_unique_ref_period = TRUE,
DataSourceShortName = NULL,
DataSourceYear = NULL,
retainKeys = FALSE,
server = "https://popdiv.dfs.un.org/DemoData/api/"
)
Location id
The period of the data to be extracted. You can extract one year data e.g times = 2020 or a longer period of time e.g times = c(1950, 2020).
The process through which the data was obtained from various sources i.e either via census or vital registrations (vr). By default, the function pulls data obtained through both of these processes.
TRUE / FALSE. Specifies whether the data to be returned should contain one unique id (return_unique_ref_period == TRUE) or several ids (return_unique_ref_period == FALSE) per time label.
ids are a unique identifier for each unique set of records based on LocID
, LocName
, DataProcess
, ReferencePeriod
, DataSourceName
, StatisticalConceptName
, DataTypeName
and DataReliabilityName
.
The definitions of these variables are provided later in this article.
NULL
NULL
TRUE / FALSE. Specifies whether only a few (retainKeys == FALSE) or all (retainKeys == TRUE) variables should be retained in the output.
"https://popdiv.dfs.un.org/DemoData/api/"
A harmonized dataset containing birth counts
See the DDharmonize_validate_BirthCounts vignette for more details about this function.