Open Data Kit: Making it Work For you
Francis Smart
Video Introduction
View 5 Minute Video
Found at https://opendatakit.org/
What are the benefits of Using Mobile Data Collection?
Image from waterfortheages.org
Image from: www.poimapper.com
Benefits of Using Mobile Data Collection
• Data can be uploaded as it is collected/needed.
• Error checking can be embedded into the collections device.
• Data is both collected and digitized simultaneously, reducing labor costs and potential transmission errors.
• Media data can be easily collected and integrated: such photos, videos, audio recordings, or GPS.
• Complex data can have embedded instructions.
• Verification checks can be embedded into the device (photo of field/family/GPS etc.)
Major Benefits of Using ODK
• ODK is free. The cost of mobile data collection software is generally exorbitant.
• ODK support free. Most companies provide support for their products only at significant additional costs.
• ODK is open source. ODK is created by public research institutions for public research.
ODK Open Data Kit
Created by University of Washington‐ Computer Science and Engineering
https://opendatakit.org/
Selected ODK Users, Projects, or Funders
Implementation List
• Has projects in 37 countries and 1 at the International Space Station
• ODK is deployed on tens of thousands of devices submitting hundreds of thousands of forms a day.
• 52 Companies list ODK form building and deployment services on the ODK website.
Selected ODK Implementation Companies
Software Components Introduced in this workshop
3. Cloud Server: ODK Aggregate
2. Form Creator: XLS Form
5. Real Time Graphs: Google Fusion Tables
1. Mobile Device Software: ODK Collect
4. Data Access: ODK Briefcase
Slightly modified image from www.pma2020.org
Software Components Outline
Day 1
1. ODK Collect
2. ODK XLS Form ‐ Basic Uses
3. ODK Aggregate – Form Upload, Media Upload, Form Download
4. ODK Briefcase – Submitted forms
Day 2
1. ODK XLS Form – Advanced Uses
2. ODK Aggregate Publish/Google Fusion Tables
3. Completion ‐ Certificates
1. ODK Collect
Easy swipe right to left navigation.
Easy installation (android apps store).
Can deliver text, images, video, and sound.
Can collect text, video, sound, GPS.
Show Demo Form on Android
2. XLSForm Builder
Build forms in MS Excel.
One line per entry. (Documentation http://xlsform.org/)
2. XLSForm Builder ‐ Converter
Find XLSform.exe converter in folder xlsform. Use it to convert excel forms to xls forms.
(Drag and drop excel file into xlsform.exe)
2. XLSForm Builder ‐ Converter
XLSform.exe will display errors in pop up window.
If no errors then XLSform.exe will save xls converted file in folder ‘Workshop\xlsform\output’.
2. XLSForm Builder
Now let us look at how to build an ODK form!
2. XLSForm Builder
Find Two Documents ODK1.xlsx and ODK2.xlsx
These are sample ODK forms.
Start with odk1.xlsx
Open odk1.xlsx
2. XLSForm Builder
Tabs:
Survey – provides list of items to be given to user.
Choices – provides list of choices from which ‘select’ type items will draw.
Settings – are form specific attributes such as form title and id.
2. XLSForm Builder > Survey Tab
Many of the objects in odk1.xlsx have mouse over help available.
2. XLSForm Builder > Survey Tab
Each row is an item. Item refers to either an input or output object.
2. XLSForm Builder > Survey Tab
Each column is an item attribute.
2. XLSForm Builder > Survey Tab
Use cell coloring options to organize items. Blank rows will not be evaluated.
2. XLSForm Builder > Survey Tab
Most item attributes are optional. However, type and
name are required for all items.
2. XLSForm Builder > Survey Tab
Type is the most basic defining feature of an item. It must be selected from a list of available types. Types are case sensitive.
Name is the name an item is identified by. It may be composed of letters, numbers, and _. However, it must start with either a letter or _.
2. XLSForm Builder > Survey Tab
Some attributes allow for an alternative language option to be selected. The attribute label is an example of this. 2. XLSForm Builder > Survey Tab > Basic types
Note items display text to user. Label is the text displayed to the user. A note type item will not save any user input data. 2. XLSForm Builder > Survey Tab > Basic types
Acknowledge items give a message to the user.
2. XLSForm Builder > Survey Tab > Basic types
Integer items allow the user to input an integer (whole number: 1, 3, 12, ‐3, 9283, etc.)
2. XLSForm Builder > Survey Tab > Basic types
Decimal items allow the user to input a number with decimal places (3.14159, 92, ‐2.34, etc.).
Decimal items are more general (accept more options) than integer items.
2. XLSForm Builder > Survey Tab > Basic types
Text items allow the user to input a text value (“Joao”, “Purchase”, “34”, etc.)
Text items are the most general form of input. All other basic input class could be passed to text items.
2. XLSForm Builder > Survey Tab > Basic types
In general we want to choose the input type which accounts for all possible input needs while also being as restrictive as possible, in order to minimize errors. Therefore, text items should be the least preferred.
2. XLSForm Builder > Survey Tab > Basic types
Exercise 1
Look at Sample Household Survey ‐ Part 1. Choose your preferred item type for items A0‐A10 using the basic types:
1. note 2. acknowledge 3. decimal 4. integer 5. text
(Ignore the ODK Logic column for now.)
2. XLSForm Builder > Survey Tab > Selection types
How was that? Did any of the item types seem a poor fit for the survey questions?
2. XLSForm Builder > Survey Tab > Selection types
How was that? Did any of the item types seem a poor fit for the survey questions?
Questions A7 and A10 probably seem problematic.
A7. Gender: ___ Male ___Female
A10. Province of Residence: ___ Gaza ___ Inhambane
___ Maputo
For these types of questions we have a different item type.
2. XLSForm Builder > Survey Tab > Selection types
‘select_one listname’ type items allow items to have answers restricted to only those appearing on a defined list.
In this case a list named ‘yes_no’. 2. XLSForm Builder > Survey Tab > Selection types
In order to see what list of choice available for list ‘yes_no’ we look at the ‘choices’ tab.
We can see there is really only two options available, ‘Yes’ and ‘No’, unsurprisingly. In this case ‘name’ is the value returned to the data for each choice.
2. XLSForm Builder > Survey Tab > Selection types
Sometimes we want to have a specific list of options as well as the option of a more general response ‘select_one
listname’ combined with ‘text’ type items make this possible.
Note: There is special logic relating to the text item which allows it to appear only conditional upon a6 being ‘other’. We will introduce this later.
2. XLSForm Builder > Survey Tab > Selection types
In order to see what list of choice available for list ‘yes_no’ we look at the ‘choices’ tab.
We can see there is now three options available now: ‘Yes’, ‘No’, and ‘other’.
2. XLSForm Builder > Survey Tab > Selection types
Sometimes we want to allow multiple choices from out selection list to be selected. ‘select_multiple list_name’ makes this feature possible. Note: There is special logic relating to the text item A8 which allows it to appear only conditional upon a7 having ‘other’ selected. More on this this later.
2. XLSForm Builder > Survey Tab > Select types
Exercise 2
Look at Sample Household Survey ‐ Part 2. Choose your preferred item type for items B0‐B3 using the basic types:
1. select_one listname
2. select_one listname_other
3. select_multiple listname
4. select_multiple listname_other
(Ignore the ODK Logic column for now.)
2. XLSForm Builder > Survey Tab > Form Logic
One of the major benefits of being able to do digital data collection is use of internal logic to control inputs. ODK has several object attributes available to provide input controls.
2. XLSForm Builder > Survey Tab > Form Logic
constraint attribute is used to restrict input options available. The constraint must be true in order for the input to be accepted.
For b3 this means that the input value must be greater than 0. The (.) is a placeholder for the value of b3.
2. XLSForm Builder > Survey Tab > Form Logic
odk uses macro type notation (${name}) to reference input values in different items.
For b5 this means that the input value must be less than the value input for b3. 2. XLSForm Builder > Survey Tab > Form Logic
required attribute works similar to the constraint except that it requires the current item to have a value in order to advance the survey
It can also take logical operators.
2. XLSForm Builder > Survey Tab > Form Logic
relevant attribute specifies a condition under which item is not displayed. By default all items are displayed. If relevant is false then the current item is not displayed.
In this case, b9 asks whether to skip the next question. If the answer is no (0) then display the next question.
2. XLSForm Builder > Survey Tab > Form Logic
calculation attribute combined with calculate
type allows for impendent evaluation of math or logic. In this case, b7 is equal to b3+b4+b5.
2. XLSForm Builder > Survey Tab > Form Logic
Odk uses common logical operators.
x=y ‐> x is equal to y
x>y ‐> x is greater than y
x>=y ‐> x is greater than or equal to y
x<y ‐> x is less than y
x<=y ‐> x is less than or equal to y
As well as special a lookup function for select_multiple.
selected(x, y) ‐> y is in x
Logical operators can also be combined with the modifiers.
x=y and x>z ‐> x is equal to y and x is greater than z
x<y or x>z ‐> x is less than y or x is greater than z
not(x=y) ‐> x is not equal to y
x!=y ‐> x is not equal to y
2. XLSForm Builder > Survey Tab > Form Logic
Exercise ‐ Express in ODK sytax for the following logic:
1.
2.
3.
4.
5.
6.
7.
8.
The current value is greater than 0. .>0 .>0
The current balue is less than item a4. .<${a4}
The current value is greater than or equal to 18 and less than 120. .>=18 and .<120
The current value is not equal 10. not(.=10)
The current value is equal to a5 or a6. .=${a5} or .=${a6}
The current value is greater than a5 plus a6. .>${a5}+ ${a6}
The current value is not equal to a5 or a6. not(.=${a5} or .=${a6})
One of the current selections is “other”. selected(., “other”)
2. XLSForm Builder > Survey Tab > Form Logic
Exercise ‐ Express in ODK sytax for the following logic:
1.
2.
3.
4.
5.
6.
7.
8.
The current value is greater than 0. .>0
The current balue is less than item a4. .<${a4}
The current value is greater than or equal to 18 and less than 120. .>=18 and .<120
The current value is not equal 10. not(.=10)
The current value is equal to a5 or a6. .=${a5} or .=${a6}
The current value is greater than a5 plus a6. .>${a5}+ ${a6}
The current value is not equal to a5 or a6. not(.=${a5} or .=${a6})
One of the current selections is “other”. selected(., “other”)
2. XLSForm Builder > Survey Tab > Form Logic
Logical Attributes Excercise
Use the following attribute types to define appropriate logic for household survey part 1 and part 2.
Attributes:
relevant ‐
constraint ‐
required ‐
calculate ‐
2. XLSForm Builder > Survey Tab
Final Exercise of the Day
Code all of household survey Part 1 and Part 2 as and ODK excel form. (Hint, use odk1 as a starting place.)
© Copyright 2026 Paperzz