← Back to course
2/6
Week 10 Β· Data, Compression and Models

Tuesday

Cleaning the log
// Shrinking photos, cleaning logs and simulating growth
⏱ about 20 min

Tuesday: Cleaning the Log

Comet wants a quick answer. "Which plant drinks the most water? Beacon has kept a log for a whole week."

She sorts the log by plant name and frowns. There are entries for Tomato, tomato, tom. and TOMATO.

"Beacon thinks we grow four kinds of tomato," she says.

Wren scrolls further. "What do you notice? Some rows have no water reading at all. And this one says the soil was 140 percent wet."

Nova circles the screen. "Data has to be cleaned before it can teach you anything," she says.

Comet sighs and opens a fresh page. "Fine. Clean first, answer second."

Data needs cleaning

Information is the facts and patterns we pull out of data. Raw data often needs work first.

Data sets can need cleaning. They can be incomplete, with missing values, or invalid, with values that make no sense.

Cleaning data makes it uniform without changing its meaning. For example, every spelling of tomato becomes the same word.

RowPlantWater reading (0 to 100)
1Tomato62
2tom.58
3Basil(blank)
4TOMATO140
5basil35

Beacon water readings run from 0 to 100. This log is invented for our story.

FIND THE PROBLEMS
  • Read the question.
  • Tap your answer.
Which row is incomplete?
Which row is invalid?
Rows 1, 2 and 4 all mean the same plant. What should cleaning do?

Data about data

Metadata are data about data. For a photo, metadata could include the date it was made or its file size.

Metadata help people find, organize and manage information.

Changing or deleting metadata does not change the primary data. Fixing a wrong date on a photo leaves the picture itself alone.

StatementTrue or false?
The date a photo was taken is metadata.?
Deleting a photo date also changes the pixels in the photo.?
Cleaning data should change what the data means.?
A missing value makes a data set incomplete.?
WHY THIS EXERCISEClean data and good metadata make every later answer more trustworthy.

Correlation is not cause

Wren notices a pattern. On days when the crew took more photos, the tomatoes were taller.

That is a correlation: two things change together. A correlation does not prove that one causes the other.

Maybe the crew takes more photos when the plants already look great. More research is needed to know.

One source is also often not enough. You may need to combine data from several sources to reach a conclusion.

CAUSE OR JUST A PATTERN?
  • Read the question.
  • Tap your answer.
More photos and taller tomatoes show up together. What can Beacon conclude?
The water log alone cannot explain why the basil wilted. What could help?

Where should the data live?

People choose how data is organized and where it is stored. Those choices affect speed, reliability, accessibility, privacy and integrity.

Beacon could keep every reading in the outpost, or send everything to mission control. Each choice trades one strength for another.

A value outside the sensor range makes data ____.
Data about data are called ____.
Two things that change together show a ____.
CLEAN THE LOG, STEP BY STEP
  • Tap a card.
  • Then tap its spot.
1First
2Second
3Third
4Last
Rows 3 and 5 both mean the same herb. After cleaning, what one word should both rows say?
WHY THIS EXERCISEUniform names let Beacon count each plant once.
Try it
Ask three family members to write the name of the same fruit on scraps of paper, without looking at each other.
Compare the spellings and capitals. How would you clean them into one uniform word?
On paper, sketch the cleaned log as a small table. Use uniform plant names, and mark any reading that needs checking.

Tidy work. Tomorrow in the Beacon Lab, you will compress a greenhouse photo by hand.

← Monday