About Codebook.R
I create a lot of surveys in ODK, and usually do so by creating the form first in excel, and then uploading to a kobo server or ONA. I often, then, later have a need to create a single document with a codebook. There were often times I used the Nafundi and Task Force created LINKS Codebook Generator . However, I found that was often insufficient for my needs. This was for several reasons. More sophisticated calculations, like `pulldata()`, broke it. Additionally, I couldn't seek skip patterns or calculations. Finally - it output into pdf format, which made edits or rearranging more challenging.
Since I always start my XFORMS in Excel, it made sense to simply create an app that would take an xls form and turn it into a single sheet codebook. So, I wrote a few lines of R code and made this!
This is a simple project, but open source. You can find the code for this and other apps here . Currently, this only takes xlsx forms. If you develop your forms in Excel, you can upload it directly here. If you work in kobotoolbox or ONA, you should be able to download your work as an xlsx file and do the same. At some point, I may add support for XForms in XML, but the parser for that will add a considerable level of sophistication that I just don't need or use. If that is of any interest to you, comment on my github or send me a message there.
Known limitations
- There may be versions of ODK that the current codebook maker will not work for.
- This has not been tested with labels in non-latin characters
Issues should be infrequent, but will be addressed in future versions. Find the source code for this app under a GNU license at https://github.com/jwilliamrozelle/figuredio.
Instructions
- Upload your .xls or .xlsx odk form. For now, the survey worksheet must have columns called `type`, `name`, `relevant` and `calculation`. The choices tab must have columns labelled `list_name` and `name`. Both the survey and choices tab must have at least one column that includes `label` text. Named languages should have the `label::` prefix.
- Select options. If you have multiple languages, select one or more languages you would like to include in the codebook. If you do not select any language - all languages with `label` in the survey tab will be included in the codebook
- Download the generated sample in xlsx format by clicking 'Download Codebook'.