knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  echo = FALSE
)

There are four MSF survey dictionaries available:

You can read more about the survey dictionaries at https://r4epis.netlify.com/surveys

Retrospective mortality and access to care ("mortality")

Variables in the dictionary

The Mortality dictionary contains definitions for r nrow(epidict::msf_dict_survey("Mortality")) variables:

library(epidict)
mortality <- msf_dict_survey("Mortality", compact = TRUE)
names_desc <- mortality[c("name", "label_english", "value_type")]
DT::datatable(names_desc)

Option codes

The dictionaries are exported using option codes that can be translated to human-readable format. This table shows how they are translated.

mortality_codes <- tidyr::unnest(mortality, cols = options)[c("name", "value_type", "option_name", "option_label_english", "option_order_in_set")]
DT::datatable(mortality_codes)

Malnutrition ("nutrition")

Variables in the dictionary

The Nutrition dictionary contains definitions for r nrow(epidict::msf_dict_survey("Nutrition")) variables:

library(epidict)
nutrition <- msf_dict_survey("Nutrition", compact = TRUE)
names_desc <- nutrition[c("name", "label_english", "value_type")]
DT::datatable(names_desc)

Option codes

The dictionaries are exported using option codes that can be translated to human-readable format. This table shows how they are translated.

nutrition_codes <- tidyr::unnest(nutrition, cols = options)[c("name", "value_type", "option_name", "option_label_english", "option_order_in_set")]
DT::datatable(nutrition_codes)

Vaccination Coverage ("vaccination_long" or "Vaccination_short")

Variables in the dictionary

There are two Vaccination dictionaries - a long form and a short form.
The Vaccination long dictionary contains definitions for r nrow(epidict::msf_dict_survey("Vaccination_long")) variables:

library(epidict)
vaccination_long <- msf_dict_survey("Vaccination_long", compact = TRUE)
names_desc_long <- vaccination_long[c("name", "label_english", "value_type")]
DT::datatable(names_desc_long)

The Vaccination short dictionary contains definitions for r nrow(epidict::msf_dict_survey("Vaccination_short")) variables:

library(epidict)
vaccination_short <- msf_dict_survey("Vaccination_short", compact = TRUE)
names_desc_short <- vaccination_short[c("name", "label_english", "value_type")]
DT::datatable(names_desc_short)

Option codes

The dictionaries are exported using option codes that can be translated to human-readable format. This table shows how they are translated.

For vaccination long:

vaccination_codes_long <- tidyr::unnest(vaccination_long, cols = options)[c("name", "value_type", "option_name", "option_label_english", "option_order_in_set")]
DT::datatable(vaccination_codes_long)

For vaccination short:

vaccination_codes_short <- tidyr::unnest(vaccination_short, cols = options)[c("name", "value_type", "option_name", "option_label_english", "option_order_in_set")]
DT::datatable(vaccination_codes_short)

Exploring the dictionaries

You can explore the excel-formatted dictionaries with browseURL(system.file("extdata", "MSF-survey-dict.xlsx", package = "epidict")), but treat it as read-only.



R4EPI/epidict documentation built on Aug. 31, 2022, 5:34 a.m.