What does "days" mean?
A library table has a field called days. Is it days on loan, days overdue, or days until the due date?
Nobody knows. Two analysts use it two ways and get two answers. A short guide that says what every field means would have stopped it.
Key words
| Word | What it means | Example |
|---|---|---|
| Data dictionary | A list that says what each field is: its name, type, length and meaning. | days: whole number, days on loan |
| Classification | Sorting data into groups by content, context or user. | Library data |
| Content | What the data holds. | Book titles and dates |
| Context | Where the data came from and what it is for. | The school library system |
| Metadata | Data about data. | Made on 3 March |
| Field | One named column in a table. | member |
| Confidence | How far you can trust the data. | High if well documented |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can say what affects trust in data and write a data dictionary entry for a field.
Starter: what you already know
Have a go
Starter: what you already know
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
What affects confidence
Three things help you trust data.
Storage: is it kept safely and without change? Classification: is it sorted by content, context and user, so the right people find it and use it for the right job? A data dictionary: does it say what each field means?
Good classification makes later analysis easier.
A data dictionary for the loan table
| Field | Type | Length | Meaning | Example |
|---|---|---|---|---|
| member | Text | 5 | Member short name | Sam |
| book | Text | No limit | Title of the book | Maps |
| days | Whole number | None | Days on loan so far | 14 |
| returned | True or false | None | Is the book back? | true |
The cells students fill in are left blank in this preview.
Try it: check a row against a dictionary
dictionary = [["member", "text", 5], ["days", "number", 0]]
row = ["Samantha", 14]
for place in range(len(dictionary)):
name = dictionary[place][0]
longest = dictionary[place][2]
value = row[place]
if type(value) == str and longest > 0 and len(value) > longest:
print(name, "is too long")
# Try it: change Samantha to Sam and press Run.
A common mistake
Warning
Many people write a data dictionary once and forget it. When the table changes, the dictionary is wrong. Update it with every change, or it spreads wrong information.