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
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)
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)
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)
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)
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)
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)
You can explore the excel-formatted dictionaries with browseURL(system.file("extdata", "MSF-survey-dict.xlsx", package = "epidict"))
, but treat it as read-only.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.