Welcome back. This unit is about data — and the only new syntax is one way to read a file. Everything else is Unit 3’s lists, loops, and procedures, pointed at bigger inputs. Today: what a dataset actually is, and who decides its shape.
Skim it for one idea: data on the web is just text a program can read. Enrolled in our Runestone course? Open it from there so your progress counts.
Big Data lights up for the first time. Unit 1 was the first half of Big Idea 2 — how bits represent things. This unit is the second half: what you can learn from a pile of them, and what you can’t.
Now compare it to this: location every few minutes, step count, screen time per app, every notification and whether you opened it, which Wi-Fi networks were nearby, battery level, and how long the screen stayed on. Most lists are badly short. Every one of those is a field someone decided to record.
A dataset is a collection of data organized so a program can work with it. Most datasets you’ll meet are tables:
Data that fits neatly into rows and columns is structured data. Photos, voicemails, and free-text comments are unstructured — before a program can count anything in them, a person has to decide what to pull out.
Five students answered three questions: grade, club, and minutes to get to school. Click any cell to see what it is. Then look hard at the rows — the design problems are already here.
1. Ben’s club is blank. Does that mean “no club,” “didn’t answer,” or “forgot”? Elena typed none. Are those the same? A program will treat them differently.
2. Dev is in two clubs. One cell, two values. Do you count him once or twice when you ask “how many in Soccer?” Someone has to decide — and the shape of the table has to allow it.
3. Who picked these three questions? Nobody asked about jobs, siblings, or whether you drive. Anything not collected can never be answered from this data. That idea comes back hard in 5.10.
Build your own 10-row, 4-column dataset from the room. Decide your columns before you collect. Write down every decision you had to make that you didn’t expect.
Five questions. Records are rows; fields are columns.
The list from the hook is only what your phone shows you. Apps you install can collect more, and each one decides its own fields. In 5.2 you’ll see that some of the most revealing data isn’t the content at all — it’s the data about the content.