If you analyze ODK data in Stata, merging the repeat-group CSVs back into the main data can be tedious, especially with nested repeats. I've released a Stata command that does it in one line:
It reads your XLSForm, reshapes every repeat group (nested to any depth) wide, merges everything into one row per submission, labels variables from the form, and keeps them in questionnaire order. It handles Central's group-prefixed column names, split geopoints, and both "Remove group names" settings.
Tested on real Central exports. Source and issues: https://github.com/armanmahmud1/odkrepeatmerge
Feedback is very welcome!
Code:
ssc install odkrepeatmerge
odkrepeatmerge using "hh_survey.csv", xlsform("HH Survey.xlsx")
Tested on real Central exports. Source and issues: https://github.com/armanmahmud1/odkrepeatmerge
Feedback is very welcome!
