Skip to contents

Prepare Analysis plan

Usage

kobo_dico(xlsformpath)

Arguments

xlsformpath

path to the (extended) xlsform file used to collect the data

Value

A "kobodico" S3 class object (list) formatted to the specifications of "kobocruncher".

Examples

dico <- kobo_dico( xlsformpath = system.file("sample_xlsform.xlsx", package = "kobocruncher") )
# Survey
questions <- as.data.frame(dico[["variables"]])
knitr::kable(utils::head(questions, 10))
#> 
#> 
#> |type            |list_name |name               |label                                           |hint           |name_or    |repeatvar |scope   |chapter |subchapter |disaggregation |correlate |appearance |
#> |:---------------|:---------|:------------------|:-----------------------------------------------|:--------------|:----------|:---------|:-------|:-------|:----------|:--------------|:---------|:----------|
#> |today           |NA        |today              |NA                                              |NA             |today      |main      |        |NA      |NA         |NA             |NA        |           |
#> |date            |NA        |date               |Interview  date                                 |this is a hint |date       |main      |        |NA      |NA         |NA             |NA        |           |
#> |select_one      |location  |location           |Where is the interview taking place             |this is a hint |location   |main      |        |NA      |NA         |NA             |NA        |           |
#> |begin_group     |NA        |profile.profile    |Respondant profile                              |NA             |profile    |main      |profile |NA      |NA         |NA             |NA        |           |
#> |select_one      |countries |profile.country    |What is your country of Origin?                 |this is a hint |country    |main      |profile |NA      |NA         |NA             |NA        |           |
#> |text            |NA        |profile.occupation |What's you occupation?                          |this is a hint |occupation |main      |profile |NA      |NA         |NA             |NA        |           |
#> |select_multiple |reasons   |profile.reason     |Why did you left?                               |this is a hint |reason     |main      |profile |NA      |NA         |NA             |NA        |           |
#> |integer         |NA        |profile.HHSize     |What's the size of your household?              |this is a hint |HHSize     |main      |profile |NA      |NA         |NA             |NA        |           |
#> |end_group       |NA        |NA                 |NA                                              |NA             |NA         |main      |        |NA      |NA         |NA             |NA        |           |
#> |begin_repeat    |NA        |members.members    |Please enter information for each family member |NA             |members    |members   |members |NA      |NA         |NA             |NA        |           |
# Choices
responses <- as.data.frame(dico[["modalities"]])
knitr::kable(utils::head(responses, 10))
#> 
#> 
#> |list_name |name             |label            |order |
#> |:---------|:----------------|:----------------|:-----|
#> |location  |home             |Home             |NA    |
#> |location  |subcenter        |Community Center |NA    |
#> |location  |private_facility |Private facility |NA    |
#> |sex       |male             |Male             |NA    |
#> |sex       |female           |Female           |NA    |
#> |countries |COL              |Colombia         |NA    |
#> |countries |CUB              |Cuba             |NA    |
#> |countries |SLV              |El Salvador      |NA    |
#> |countries |GTM              |Guatemala        |NA    |
#> |countries |HND              |Honduras         |NA    |
# Settings
metadata <- as.data.frame(dico[["settings"]])
knitr::kable(utils::head(metadata, 10))
#> 
#> 
#> |form_title                |form_id    |
#> |:-------------------------|:----------|
#> |Sample Dataset KoboloadeR |koboloadeR |
# Report ToC
toc <- as.data.frame(dico[["plan"]])
knitr::kable(utils::head(toc, 10))
#> 
#> 
#> |type            |label                                           |name               |
#> |:---------------|:-----------------------------------------------|:------------------|
#> |today           |NA                                              |today              |
#> |date            |Interview  date                                 |date               |
#> |select_one      |Where is the interview taking place             |location           |
#> |begin_group     |Respondant profile                              |profile.profile    |
#> |select_one      |What is your country of Origin?                 |profile.country    |
#> |text            |What's you occupation?                          |profile.occupation |
#> |select_multiple |Why did you left?                               |profile.reason     |
#> |integer         |What's the size of your household?              |profile.HHSize     |
#> |begin_repeat    |Please enter information for each family member |members.members    |
#> |integer         |Age                                             |members.age        |
# Indicator
indicator <- as.data.frame(dico[["indicator"]])
knitr::kable(utils::head(indicator, 10))
#> 
#> 
#> |type |name |label |list_name |hint |repeatvar |calculation |chapter |subchapter |disaggregation |correlate |cluster |predict |score |mappoint |mappoly |
#> |:----|:----|:-----|:---------|:----|:---------|:-----------|:-------|:----------|:--------------|:---------|:-------|:-------|:-----|:--------|:-------|