← Back to course
1/6
Week 06 Β· Cleaning Data

Monday

A messy column
// Fixing messy data without changing what it means
⏱ about 20 min

Monday: A Messy Column

Comet is ready to code the Q3 column. She reads the first answer and writes 3. She reads the second and stops.

"Longer evening hours with a capital L," she says. "And here is longer evenings. Are those the same answer?"

Wren looks over her shoulder. "And here is bike rack with an exclamation mark. And one that just says bikes. What do you notice?"

Comet sighs. "I printed Q3 as an open box. Everyone wrote it their own way."

"That was a fair mistake," Wren says. "Now we get to fix it carefully."

Nova hovers over the column. "Would you like a hint?" she asks. "Before you change anything, sort the answers you see into kinds of problems."

This week's driving question

How do we fix messy data without changing what it means?

This week you will spot messy answers, write cleaning rules, clean all 40 Q3 answers and filter the sheet.

Why open boxes get messy

When people type answers into an open box, they spell, shorten and capitalize things in different ways. So the data may not be uniform.

Data sets of any size have challenges. They need cleaning. They can be incomplete or invalid, or need combining with other data.

IDRaw Q3 answer
M01repair table
M02Longer evening hours
M03a quiet room to study
M04longer evenings
M05a quiet room to study
M06repair bench
M07Repair Bench
M08quiet study room
M09bike rack
M10open later
M12Bike rack
M14bike rack!
M18(blank)
M19a launch pad
M22a rack for bikes

This is made-up data from the Commons Count story: 15 of the 40 raw answers.

KINDS OF PROBLEMS
  • Read the question.
  • Tap your answer.
M07 wrote "Repair Bench" and M06 wrote "repair bench." What is the difference?
Which answer is incomplete?
Which answer is invalid?
Which raw answers mean bike rack?
StatementTrue or false?
People who type into an open box often spell the same answer in different ways.?
A blank answer is an example of incomplete data.?
Only very large data sets need cleaning.?
"bike rack!" and "Bike rack" mean the same thing.?
WHY THIS EXERCISESeeing the kinds of problems first tells you which cleaning rules you need.
Data written the same way every time are called ____. Type one word.
WHY THIS EXERCISEUniform data can be counted and coded without mistakes.
On paper, make three boxes labeled same meaning, incomplete and invalid. Sort the 15 raw answers into them.

Strong start, data analyst. Tomorrow you will write the rules for cleaning without changing meaning.