Welcome to odk2stata’s documentation!¶
The Python 3 package odk2stata
is a configurable Stata do file generator.
The only inputs to this software are the source XLSForm and, optionally, a configuration file.
This package generates a Stata do file to complete several routine data cleansing tasks. They are:
- Import a dataset. Merge in a single repeat group.
- Drop columns. By default, all notes are dropped.
- Rename columns. By default, columns are renamed back to the original ODK name.
- Destring numeric columns.
- Encode
select_one
variables. This turns the column data from ODK choice names to numbers with those names as labels. - Split
select_multiple
variables so that each choice option is a binary variable (selected or not). - Label column variables. The label is used as the default.
This documentation explains how to use odk2stata
and how to configure it.