RMResearch Metrics AfricaNGO data operations← All guides

Survey data cleaning & analysis

How to prepare Kobo, ODK or Excel survey data for analysis

A step-by-step workflow for preparing KoboToolbox, ODK, Excel or CSV survey data for analysis without losing raw records, labels, cleaning decisions or important limitations.

8-minute guideUpdated September 8, 2026

Analysis-ready data is not merely a spreadsheet with blanks removed. It is a versioned dataset whose structure, coding, exclusions and cleaning decisions are documented well enough for another analyst to understand and reproduce the result.

1. Preserve the raw source and define the analysis unit

Save a read-only copy of the original export with its source, date, project, form version and checksum. Never make undocumented edits directly inside the only copy. Define what one row represents and how repeat groups, households, facilities or follow-up visits relate to each other.

Confirm the reporting period and inclusion rules before filtering. Deleting records because they look inconvenient can change the answer and make the final sample impossible to explain.

2. Build a usable data dictionary

For every field, record the source name, readable label, type, units, choice codes, missing-value meaning and any derived-variable formula. Keep the deployed form and codebook close to the data; a variable name alone rarely captures enough context.

When exporting to SPSS, keep stable variable names, labels and value labels. When using Excel or CSV, provide the dictionary as a separate sheet or file so codes such as 1, 2 and 99 are not guessed later.

3. Clean through explicit rules and review decisions

Run checks for duplicates, missing required values, invalid codes, ranges, skip logic, inconsistent dates and broken relationships. Each correction should identify the record, field, original value, proposed value, rule, reviewer, decision and timestamp.

Do not turn every outlier into a missing value. Some unusual observations are genuine and important. Review them against the instrument, source notes and programme context before deciding whether to correct, retain or exclude them.

4. Create derived variables reproducibly

Calculate scores, categories, denominators and indicator flags from written definitions. State how missing components are handled and test edge cases. For multi-select questions, preserve the distinction between not selected, not asked and missing.

Keep the transformation logic in code or a structured cleaning log. Manual spreadsheet formulas can be valid, but they should be visible, checked and protected from accidental overwriting.

5. Pass an analysis-readiness gate

Before modelling, reconcile the final row count, missingness, exclusions, key outcome distributions and required group sizes. Check whether the planned test or model fits the design, measurement level, sample and assumptions.

If an assumption fails, do not force the planned analysis because it appeared in a proposal. Use a suitable alternative, revise the question or withhold the result and explain why. A defensible non-result is better than a confident but invalid claim.

Review these:
  • Approved dataset version
  • Final sample and exclusions reconciled
  • Outcome and predictor coding checked
  • Assumptions reviewed
  • Limitations ready for the report

6. Package the data so it can be reviewed

Deliver the raw reference copy, approved analysis dataset, data dictionary, cleaning log, issue register and analysis code or syntax where applicable. Make the report reference the same dataset and analysis version used to generate its numbers.

Use secure, time-limited downloads for private files and remove participant identifiers from any public sample or report. Apply the agreed retention period after acceptance, while preserving only the documentation the data controller has authorised.

FROM GUIDANCE TO AN AUDITABLE WORKFLOW

Explore Managed Research Data Operations

We can review your actual form, dataset and reporting requirement, then scope the smallest service that solves the risk.

Explore the service ↗