odksplit
is a Stata module to label the variables, assign corresponding value labels, and split and label multiple response variables generated from ODK. odksplit
labels with all available languages from the XLSForm. odksplit
is developed and maintained by ARCED Foundation and SotLab.
If ODK or SurveyCTO is used for data collection, the multiple response variables are downloaded as string variables. odksplit
can be used to split those variables to create dummy variables as well as label the dummy variables. Additional options allow to do the other labeling excercises. If "SurveyCTO sync" is used to download data, and the 'Export select_multiple responses as series of 1/0 columns?' option was ticked, the dummy variables are already created in the dataset. However, odksplit
does this again deleting the existing variables. odksplit
uses the XLSform to identify the 'select_multiple' variables, and take the value labels from the choices sheet. odksplit
was initially developed to work on multiple response variables, however, additional options were added based on user feedback.
This program will clear any data in memory. Therefore, the program asks whether you really want to clear data from memory. This will not work if the variable names include the group names as prefix.
Current version at GitHub : 4.0.0
Current version at SSC : 2.1.0
First released on July 2019. Last updated June 2023.
odksplit
can label variables in repeat group. It also labels in multiple language. To see available languages write:label language
. To change language to English writelabel language English
. Tha language name is case sensitive. Use label() option of odksplit to make a specific language default. This version can also directly save the labelled dataset at specific location.
odksplit
now adds the full questions as notes to the variables. To view the full question instead of Stata label, writenotes varname
. To view full questions for all variables, writenotes
in the Stata command window.
** Install from ssc
ssc install odksplit
** Install from GitHub
net install odksplit, all replace from(https://raw.githubusercontent.com/ARCED-Foundation/odksplit/master)
odksplit [, options]
help odksplit
Options | Description |
---|---|
survey | The name of the XLSform, including the path |
data | The name of the data file, including the path |
label | The language specified in the label column in ODK XLSform. For example, if the label column is 'label:English', write English. Language specified in this location will be made default. |
dateformat | Specify the date format, either MDY or DMY |
clear | To clear any data in memory |
save | To save labelled data in specific location |
odksplit, survey("X:\Projects 2018\Fieldwork\Tools\SurveyCTO files\Phase one_v1.xlsx") ///
data("X:\Projects 2017\Fieldwork\Data\Data\raw\Phase one data.dta") ///
save("X:\Projects 2017\Fieldwork\Data\Data\raw\Phase one data_labelled.dta") ///
dateformat(MDY) ///
label(English) clear
odksplit, survey("X:\Projects 2018\Fieldwork\Tools\SurveyCTO files\Phase one_v1.xlsx") ///
data("X:\Projects 2017\Fieldwork\Data\Data\raw\Phase one data.dta") ///
save("X:\Projects 2017\Fieldwork\Data\Data\raw\Phase one data_labelled.dta")
label language
label language English
Please report all bugs/feature request to the github issues page.
Mehrab Ali
Email: mehrabbabu@gmail.com