Preserve raw data and define fields
Identify the observational unit, column units, missing-value codes and whether repeated rows per person are permitted. Preserve the raw file instead of overwriting it during exploratory cleaning.
UK Data Service reproducibility materials emphasise recording data, tools, decisions and results. The workflow below is an original teaching suggestion; follow your project’s access, ethics and data-management requirements.
Inspect an original four-row dataset
Take fictional rows (A,10), (B,blank), (B,12) and (C,999), where the second field is weekly study hours. The exercise dictionary defines both blank and 999 as missing. Treating 999 as observed hours would ignore that definition.
Keep the original column and derive a cleaned column with missing markers. Investigate B using the observational unit and timestamps: the rows might be a duplicate import or separate measurements. Flag uncertainty rather than deleting without evidence.
Make decisions explicit
Treating each row as a record for now, the observed values are 10 and 12. Their mean is 11 with an observed denominator of 2. Replacing missing entries with zero yields 5.5 but imposes a different substantive assumption.
If evidence later shows that B’s blank row was imported twice, document the evidence and before-and-after row counts. This small exercise does not establish a universal deletion or imputation method.
Rebuild outputs from the original input
Record the input version, rules, execution order, row counts, output location and software environment. Use scripts or traceable steps to generate derived files from a read-only original. Keep outputs separate from raw data.
Self-check: close the current results and regenerate the same missing flags, observed count and mean from the original four rows. Explain why removing B requires evidence. Use fictional or authorised data and retain responsibility for your assessed analysis.
References
Your next step
Describe your university module, learning goal and attempted steps to discuss appropriate academic support.
