Intermediate level · Module 1: Data Collection and Survey Data · Lesson 3 of 3
Cleaning Survey Exports
Prepare exported survey data: codes and labels, skipped questions, multiple-choice columns and quality checks.
In this lesson you will
- Convert coded responses and handle skipped questions
- Run consistency and quality checks
Key concepts
codes and labelsnot applicable vs missingselect-multiple columnsconsistency checks
The lesson
Survey exports often store codes (1, 2, 99) with a separate label list. Map them to labels, and treat codes like 99 'don't know' or 98 'refused' as missing for calculations — never as real numbers.
Questions skipped by design are 'not applicable', which differs from 'missing'. Keep the distinction so denominators are correct.
Check consistency: children's ages should be below parents', school attendance should only be asked for school-age children. Track enumerator IDs and interview durations to spot suspicious data.
Step by step
- Map codes to labels.
- Convert 98 and 99 codes to missing.
- Split a select-multiple question into columns.
- Run three consistency checks.
Practice activity
Clean the provided survey export and document every rule applied.
Expected result: A clean data set and a cleaning rule list that another analyst could apply.
Check your understanding
-
Why must a 99 'don't know' code not be averaged?
Show answer
It is not a real value and would distort results.
-
How does 'not applicable' differ from 'missing'?
Show answer
Not applicable was skipped by design; missing should have an answer but does not.
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.