multi_use_survey_geo: Add new record in DHS survey geo dataset that is a duplicate...

View source: R/spatial.R

multi_use_survey_geoR Documentation

Add new record in DHS survey geo dataset that is a duplicate of an existing year except includes a new year.

Description

Add new record in DHS survey geo dataset that is a duplicate of an existing year except includes a new year.

Usage

multi_use_survey_geo(
  .data,
  setting_iso3,
  existing_year,
  new_years,
  keep_existing = TRUE
)

Arguments

setting_iso3

ISO3 of focus country

existing_year

the year with real data from the DHS survey

new_years

the years you want to get the same data as the existing year

keep_existing

should the record for the existing year stay in the dataset

Details

as an example, the DHS survey might include Peru 2007 but the WHO HEAT data includes Peru 2008 and 2008 is not available in the DHS data. Use this function to add a new recode with year 2008 that is identical to 2007 except the year is changed to 2008. The default is to keep the existing record so in this case you end up with two records with the same geography but one has year = 2007 and one is year = 2008.


WHOequity/HEAT-Data documentation built on May 21, 2024, 10:07 p.m.