Data Collection Tools and Approaches Round III
CAPACITY BUILDING FRAMEWORK
Presented by Dahir Ali– Statistician
TRAINING WORKSHOP
Held in Galmudug, Somalia
18-26th Nov, 2024
Statistical Development Support Project (2023 - 2025)
for Somali National Bureau of Statistics (SNBS) -
Introduction to ODK
XLSforms – Form Logic
Statistical Development Support Project (2023 - 2025)
for Somali National Bureau of Statistics (SNBS) -
Contents
• Constraints
• Relevancies and Skip Patterns
• Grouping questions
• Repeating questions
• Best practices
• External Links
Statistical Development Support Project (2023 - 2025)
for Somali National Bureau of Statistics (SNBS) -
Constraints
• Constraints are an easy way to make sure the data you collect is valid. E.g. age should not be above 120.
• Constraints are written into the “constraint” column of the survey sheet.
• In the example below, respondents are shown a list of 5 activities and asked what their 1 st, 2nd and 3rd most important activities are to a
holiday. However, we have set constraints to ensure no answer is selected multiple times.
• You can also include messages in the “constraint_message:[language]” column explaining why a certain answer is not allowed.
• .!=${holiday.activity.1} This means that .(holiday.activity.2) cannot be equal to holiday.activity.1
Constraints
Operator: not equal to
Refers to the variable being
created in the current row
(in this case,
. !=$
holiday.activity.2)
{holiday.activity.1}
Name of the variable we are referring to
Constraints
. !=$
{holiday.activity.1}
This means that .holiday.activity.2 cannot be equal to
holiday.activity.1
Constraints
. !=$
{holiday.activity.1} Used around variable names
This means that .holiday.activity.2 cannot be equal to
holiday.activity.1
Relevancies and skip patterns
• Relevancies are basically a handy way of including traditional skip patterns automatically into
your form.
• With the “relevant” column you can code in automatic skipping of questions based on answers to
other questions.
• In the example below, we ask which of a list of 10 countries has the respondent been to. But this
question only appears if they answered “yes” to the previous question – “Have you ever travelled
abroad?”
Relevancies and skip patterns
Operator: equal to
Refers to the variable ever.abroad
The answer must be yes for
$ this question to appear
{ever.abroad} = “yes
”
Grouping questions
• You can also group questions together
• This could be useful for a number of reasons including: grouping similar
questions together (i.e. question modules), overall appearance or skip
patterns.
• You start a group with “begin group” in the type column (you do not
have to include anything in the name or label column though it could be
useful to do so).
• You close the group by typing “end group” into the same column.
Statistical Development Support Project (2023 - 2025)
for Somali National Bureau of Statistics (SNBS) -
Grouping questions
• In the example, we have moved around some of the questions shown on the previous slides, grouping two questions together.
• We have also moved the relevancy to the “begin group” line. The whole group will only appear if the condition is met.
• The “field-list” text in the “appearance” column means that all questions in the group will appear on the same page.
Repeating Questions
• As part of your survey, you may wish to repeat a question/group of questions a certain
number of times. You can do this by nesting questions between a “begin repeat” and
an “end repeat”
• There are multiple ways to set how many times these repeat.
• You could have it fixed, say 3 times by typing 3 into the “repeat_count” column.
• Alternatively, you could set it dynamically to the value of another variable e.g. for
every member of a household
• This is done by typing the name of the variable in the column instead (e.g. $
{planned.holidays} – number of planned holidays in next 12 months).
Statistical Development Support Project (2023 - 2025)
for Somali National Bureau of Statistics (SNBS) -
Repeating Questions
• In the example below, we are asking which continent the respondent is travelling to for each of their trips over the next
12 months.
• The first calculate helps us dynamically input the trip number into the question label; i.e. on the device, it will show “trip
number 1”, “trip number 2” etc.
• This repeat group will repeat based on how many times the respondent has said they plan to travel over the next 12
months, using the planned.holidays variable.
• Make good use of the constraint column; this
will aid greatly in ensuring data quality and
validity.
• In the “required” column, you can type in “yes”,
this means the question must be answered in
Best Practices order to proceed. This protects against missing
data and you can add alternative codes/options
and Key for a non-response.
• Limit the use of text fields; select questions are
Reminders much better for data consistency and analysis.
• Make sure your hints and labels are clear and
easy to understand .
• You can also use the appearance column to
alter how questions appear. E.g. field-list will
group a bunch of questions onto a single page
rather than separating them.
Statistical Development Support Project (2023 - 2025)
for Somali National Bureau of Statistics (SNBS) -
• REMEMBER: when referring to a variable in a
constraint, calculation or relevancy, use the
format ${name}.
Best • Ensure the name you are using is the one in
the name column; if your survey is being
Practices and translated do NOT translate the variable
name in instances such as these.
Key • Use a . instead of ${name} when referring to
Reminders
a variable in its own constraint column
(e.g. .>100).
• REMEMBER: you cannot include any spaces
in your “name” column
• Colour your begin group and end group rows
to easily keep track of your structure
Statistical Development Support Project (2023 - 2025)
for Somali National Bureau of Statistics (SNBS) -
THANK YOU
FOR LISTENING
Statistical Development Support Project (2023 - 2025)
for Somali National Bureau of Statistics (SNBS) -