How to optimize export settings

Dear ODK-Experts :wink:

I am currently working on an ODK Form to collect field data in a case study. Therefore i need to count cycles in a certain area in different time slots throughout the day.

Logicwise i have the form to set up to collect basic information about the location and the available parking spaces for bikes first and after that a repeat group with date/time and the count of cycles. It all works fine, but in the data handling after collecting i ran into some issue / inconvinience that i want to fix.

While exporting via ODK briefcase i get 2 different .csv tables (1 for the basic information, 1 for the repeated group). The tables content following:

Basic Information: 1 line per location (available spaces, damages, etc.)
Timeslots: 1 line per Timeslot (so e.g. 5 lines per location with counted cycles)

Ideal would be: 1 Table with locations and columns per timeslot (location, timeslot1, timeslot2, ...)

I can link them in QGIS via the UUID / PARENT KEY, but is there a way to link it via the ODK-Form so i get only one table in the Briefcase-Export?

I will later add some screenshots as i have the project file on another machine and can not access it at this moment.

Thank you in advance!

1 Like

Welcome to the ODK forum, @jok! We're glad you're here. When you get a chance, please introduce yourself on this forum thread. I'd also encourage you to add a picture as your avatar because it helps build community!

The 2 tables is the expected behavior. It's not possible to configure briefcase to return one table. You could script a data processing workflow.

  • If using Central, there are tools such as ruODK and pyODK.
  • And then odkr says it interfaces with Briefcase and states there is a functionality to "Merge nested datasets for ODK forms with a repeat argument". (:exclamation:Note that it doesn't appear to be maintained and I don't know if it's in working condition.)

Or, the docs on repeats gives suggestions for modifying your survey design:

Using repetition in a form is very powerful but can also make training and data analysis more time-consuming. Repeats exported from Central or Briefcase will be in their own files and will need to be joined with their parent records for analysis.

Before adding repeats to your form, consider other options:

  • if the number of repetitions is small and known ahead of time, consider "unrolling" the repeat by copying the same questions several times.
  • if the number of repetitions is large and includes many questions, consider building a separate form that enumerators fill out multiple times and link the forms with some parent key (e.g., a household ID).

If repeats are needed, consider adding some summary calculations at the end so that analysis will not require joining the repeats with their parent records. For example, if you are gathering household information and would like to compute the total number of households visited across all enumerators, add a calculation after the repeats that counts the repetitions in each submission.

Welcome to the forum, @jok!

Further to what Dan said, take a look at the ruODK vignette "odata" for an example of linking parent - child tables. Your form will indeed generate two tables you need to link via submission_id and id, respectively.

Anither idea is to look at the new Entities concept which may lend itself to your data model. Bike stops could be entities.

Apologies for brevity, typing from mobile.

1 Like