How To: Creating Random test records

This is a helpful “How To” for KoBo users.

KoBoSync can help you prepare for your data collection by making fake test records for you. One thing that is difficult to accomplish is seeing how well you have structured your data, looking at it in a database, and preparing for analysis. One reason it’s so tricky to do this is that your survey might have a lot of questions, and completing it is time consuming. Therefore, it is difficult to create test data.

There is a solution, which is to have KoBoSync take your survey automatically and create a large number of fake records. You can then better plan how you are going to analyze this data by deciding on things like what measures of central tendency will best illustrate the story behind the questions.

You will need to complete your survey one time in advance, this instance will act as a “seed” for the random records generator. Be warned that creating random records will require you to type commands into the command line, but all the details and some examples follow here:

Random Record Generator

To be able to test the system under the weight of hundreds of records, we included a randomizer. You point it at a completed KoBo form and tell it to make random records, how many and where to put them, and it churns them out. In a second it will make you 100 fake records. 100 is the default, but you can do more. The data is random strings, longs, ints, & date stamps which are generated by inspecting the completed ODK form to determine the data type for each question.

From the command line, run java -cp KoboPostProc.jar org.oyrm.kobo.postproc.test.KoboXMLGen

XMLFile should refer to an instance, a completed form as is stored in the ODK/Instances/ directory after a survey is completed.

DestinationDirectory should refer to any nice empty folder. It doesn’t have to be empty, but this will make 100 files, so it’s a good idea to put them someplace.

Example: java -cp KoboPostProc.jar org.oyrm.kobo.postproc.test.KoboXMLGen …/Instance/CAR_2009-09-27_17-41-53.xml …/test/

That’s it. Now you have a bunch of completed records that you could let KoBoSync aggregate into a CSV. Then, you will be able to import them into your favorite analysis software, like SPSS, SAS, R, or even Excel. Looking at data like this is an amazing way to find flaws in your survey design before they actually cause trouble with your data collection. Forewarned is Forearmed.