Tuesday, 12 May 2015

Using ODK to collect data. Part 1

Introduction
About 15 years ago I started collecting data using PDAs. Compared to paper-based surveying this was a massive improvement in terms of efficiency and costs. However, I have not run individual level surveys which require mobile data collection for a number of years now and I have lost touch with current techniques. In anticipation of a survey we will be running in July 2015 I have been investigating current mobile data collection technologies. It seems like Open Data Kit (ODK) is the best fit for our needs: low cost, robust, runs on Android, and can be used with no, or limited, internet connectivity.

The ODK tutorials are useful but not basic enough for our needs - it took me a while to get ODK working (and I have been involved in this type of data collection, albeit with different software, before) and those coordinating our survey are likely to have less experience than me. This set of posts has two aims: first, to document the steps I have gone through so I have a reference point when I do it again; and second, to provide a reference for other members of the team.

Step 1
Install ODK Collect following the instructions here. This is the application which will sit on the Android device and which will be used for data collection. I installed it through Google Play which then pushed it to my phone which was connected to the internet at the time. At this stage I am not clear on whether you need separate Google Play accounts for each device/user. I suspect you do. Once installed there are a number of existing surveys you can play around with by selecting the 'Get Blank Form' button.

Step 2
Build a form (questionnaire) using the XLSForm format. This can be done in excel, and allows for the easy incorporation of skip patterns.Then submit it to this page for conversion to a format which can be uploaded. This requires internet access.

Step 3
Install ODK Aggregate following the instructions here. If installing on the Google AppEngine you will need an account. I encountered a couple of challenges at this step including an error which read 'java could not reserve enough space for object heap.' Doing the following sorted it out:
Go to Start->Control Panel->System->Advanced system settings-> advanced(tab) ->Environment Variables->System Variables->New:
Variable name: _JAVA_OPTIONS Variable value: -Xmx512M

Step 4
Upload the form created in Step 2 using Form management->Add New Form in the ODK Aggregate/App Engine account created in Step 3.

Step 5
Change the settings in ODK Collect on your Android device to point to where the form has been uploaded (General Settings->Configure platform settings->URL and 'youraggregatename.appspot.com').

Step 6
'Get Blank Form' in ODK Collect, select the form you uploaded and commence the survey. Once you are done you can 'Send Finalized Form'.

Step 7
The results can be seen at 'youraggregatename.appspot.com'. These can then be exported to a csv file, for example.