Computer Science and Digital Literacy · 35 minutes
Suggested grades 9–12 · Unit 2: Data quality and representation · Lesson 1 of 2
Data Cleaning with a Decision Log
Preserve missingness and document transformations in a fictional data table.
Mr. S Teaches · Original starter lesson · HS-CS-03 · Grade range is planning guidance.Watch, notice, discuss
Video choices for this lesson
Preview a video, then choose what fits your learners. “Show to class” opens a larger view; use the player’s play and full-screen controls when you’re ready.
Teacher preview needed. Check the language, level and length before showing. YouTube may show ads or related videos.
Code.org Lesson 3 Filtering and Cleaning Data Tutorial | Unit 9 Data C.S. Principles + CodeAI
By Mr. Kaiser
Use a data-cleaning and filtering walkthrough as a tool-based comparison; the lesson’s decision log is done on its own supplied data.
Open on YouTube: Code.org Lesson 3 Filtering and Cleaning Data Tutorial | Unit 9 Data C.S. Principles + CodeAI (opens a new tab) ↗Big Data Problems: Crash Course Statistics #39
By CrashCourse
Give broader context for bias and transparency in data decisions; it does not demonstrate the lesson’s missing-versus-zero rule.
Open on YouTube: Big Data Problems: Crash Course Statistics #39 (opens a new tab) ↗Which cleaning decision could change the result, and how would another analyst reproduce it?
An external player loads only after you choose Preview or Show to class. Playback connects to YouTube. Videos belong to their creators; availability and embedding can change.
Learning objective
Apply stated cleaning rules and write a reproducible technical report distinguishing missing from zero.
Before you begin
- Tables
- Mean calculation
Gather your materials
- Paper and pencil
- The fictional table supplied here
- Optional offline spreadsheet
Language to know
- missing value
- A measurement not recorded or unavailable, distinct from a measured zero.
- validation rule
- A stated test for whether a value fits the intended format or range.
- provenance
- The record of where data came from and how it changed.
Understand the concept
Fictional weekly reading table: A:20 minutes; B: blank; C:0 minutes; D:“15 min”; E:−4 minutes. A documented rule accepts nonnegative numerical minutes, parses an explicit“min”suffix and flags negatives for review; blanks stay missing. Converting all problematic entries to 0 would invent observations and bias a mean. Keep the original table and a change log so another person can reproduce the work.
Teach it step by step
- Copy the original table without overwriting its entries.
- Apply the rules to each row, labeling accepted,parsed,missing or flagged.
- Calculate a mean only for the three valid recorded values 20,0,15 and state the denominator.
- Write a short method report with the rules,change log,result and unresolved rows; ask a partner to reproduce it.
Make the thinking visible
Worked example or model response
Accepted values are 20,0 and 15, sum 35 over 3 recorded observations, mean 35/3≈11.67 minutes. B remains missing and E is flagged, not silently corrected. Treating both as 0 would instead give 7 minutes and imply two unsupported measurements.
Guided practice
Apply the same rules to 7,“8 min”,blank,−2 and 0. Write the cleaned values and status labels.
Independent practice
1. Find the valid-record mean for the guided data. 2. Write a two-sentence report explaining why blank and 0 require different labels. 3. Identify what must be asked before correcting−2.
Quick assessment
Why should the original values remain available after cleaning?
Answer key & assessment criteria
Answers and teaching guidance
- Guided: Valid 7,8,0; one missing and one flagged.
- Independent 1:15/3=5 minutes. 2: Zero records a measured absence of minutes; blank records no measurement, so it should not enter the same denominator. 3: Check the source or collection process rather than guessing the intended value.
- Quick check: They preserve provenance,allow review of decisions and help correct an erroneous transformation.
Look for: Require the learner to explain the interpretation and check, not only state a result. Assess the written trace or evidence record; do not request real passwords, accounts or personal data.
Make it work for your learner
More support
Provide separate original,value,status andreason columns; use a calculator after classification.
Extension challenge
Compare two justified handling policies and explain how each changes what the resulting statistic means.
Verified references · Selected contributions
Standards connections
Subject-content alignment not yet verified
Supporting literacy connections
These records apply to the specified reading, writing or communication task. They do not establish subject-content alignment.
Supporting Common Core connection
WHST.9-10.2
Common Core · Grades 9–10
Write an explanatory technical method and result report with definitions and concrete examples.
Read the official standard ↗Supporting grades 9–10 technical-literacy practice in the stated task, not a verified computer-science content alignment or full text-complexity assessment.
Verified 2026-11-04. Selected contribution, not full attainment.
