1. Home
  2. Documentation
  3. Exporting data
  4. Repeat groups and the long format

Exporting data

Repeat groups and the long format

Partly built

Wide and long layouts for repeated questions, how the long files link to each other, and what has not been compared with real exports.

Joripo documentation · https://joripo.com/docs/exporting/long-format

On this page

A repeat group (household members, plots, visits) can be exported two ways.

Wide

The default. One row per submission; each repeated question becomes one column per instance, name_1, name_2 and so on, as in the WIDE layout. Simple to read, but a household of twelve makes twelve columns of every member question.

Long

Repeat groups: long writes one file for the submissions and one for each repeat group, nested repeats included, zipped together (long.zip):

  • each row of a repeat group's file is one instance;
  • KEY identifies the row and PARENT_KEY names the row it belongs to (the submission, or the instance of the enclosing repeat), so the files join back together;
  • each file comes in the format you choose (.csv, .xlsx, .sav or .dta), with the import do-file and its .dta for each label language.

What is not proven

Not compared with a real SurveyCTO long export. The long format follows SurveyCTO's documented layout, and its do-files and .dta files are tested in Stata, but no real SurveyCTO long export was available to compare it with cell by cell, as the WIDE export was.