The descriptive report¶
Exercise descriptive-report-annex.pdf · PDF
Before you download a game, what do you read? The store page. What it is, who made it, how big the download is, what the reviews say, whether it runs on your machine. One minute, and you decide.
Now think about games_clean. You have spent five weeks cleaning it and one lesson measuring it. You know that the price has a tail, that nine games in ten have no Metascore, that "owners" is the bottom of a range. Nobody else knows any of that. If a classmate opens your table tomorrow, they see 26,685 rows and no warnings.
Today you write the page that tells them. It is the last piece of the "prepare" stage: the label on the crate before it goes to the people who will build with it.
What you will learn
- What a descriptive report is, and the six parts it always has
- How to turn a query result into a sentence with a number, a unit and a meaning
- How to cite the source so that someone else can get the same data again
- Why you write the median for a skewed column, and say so
- How to write the limits of a dataset: what it cannot tell you
- The trap: why a report is not all your query results pasted one after another
The store page of a dataset¶
A descriptive report is a short text that tells someone who has never opened a dataset what is in it, where it comes from, how good it is and what it cannot be used for.
It is the store page of your data. You read it before you "install" the data in a chart. And like a store page, it has the same sections every time, so a reader knows where to look. We keep the store page for the whole lesson.
| Part | Question it answers | On the store page |
|---|---|---|
| 1 · Source | Who collected it, where, when? Who cleaned it? | Developer and release date |
| 2 · Size | How many rows and columns? What is one row? What period? | Download size |
| 3 · Variables | What are the important columns, their type and unit? | Features list |
| 4 · Quality | What is missing, estimated or doubtful? How much? | Known issues |
| 5 · Key figures | Centre, spread and distribution of what matters | Review score and tags |
| 6 · Limits | What can this data not tell you? | System requirements: where it will not run |
flowchart LR
subgraph CTX ["Can I trust it?"]
direction TB
P1["<b>1 · Source</b><br>who, where, when"] --> P2["<b>2 · Size</b><br>rows, columns, period"] --> P3["<b>3 · Variables</b><br>columns, types, units"]
end
subgraph FIG ["What does it say?"]
direction TB
P4["<b>4 · Quality</b><br>missing, estimated, doubtful"] --> P5["<b>5 · Key figures</b><br>centre, spread, distribution"]
end
subgraph LIM ["Where does it stop?"]
P6["<b>6 · Limits</b><br>what it cannot tell you"]
end
CTX --> FIG --> LIM
The whole thing fits in 250 words. That limit is not a punishment. It is the exercise.
Two reports, same data¶
Two students describe the same table. Which one would you trust?
| Report A | Report B |
|---|---|
| "The dataset has a lot of games. Most are cheap. The average price is 7.91. Some scores are missing. Games are getting more popular." | "26,685 Steam games released 2004–2018. Half cost 4.99 USD or less (median); the mean is 7.91 USD because of a few items up to 595.99 USD. Only 10.7% have a Metascore." |
Now point at the exact words that make the difference:
| Report A says | Report B says | What B has |
|---|---|---|
| "a lot of games" | "26,685 Steam games" | A count |
| (nothing) | "released 2004–2018" | A period |
| "7.91" | "7.91 USD" | A unit |
| "the average price" | "half cost 4.99 USD or less (median); the mean is 7.91 USD because..." | Which centre, and why |
| "some scores are missing" | "only 10.7% have a Metascore" | A percentage |
| "games are getting more popular" | (nothing) | No claim it cannot prove |
That last row matters. The table shows 53 games released in 2004 and 8,845 in 2018. That is more games released. It is not more players: the table does not count players at all. Report A went beyond the data. Report B knew when to stop.
Careful: a report is not a log
"A report is all my query results, pasted one after another." No. That is a log. A store page does not show the game's source code: it shows the handful of things you need in order to decide. A report selects: one sentence per number, and every number has to earn its place. More numbers do not make a better report. Usually they make a worse one.
Parts 1 to 3: what is this?¶
These three need almost no queries. They answer "what am I looking at?".
Part 1 · Source¶
Say who collected the data, where it was published and when, and who cleaned it. For our table: the data was collected by Liza Wood from the site Steam Spy, and published by the TidyTuesday project on 30 July 2019 as video_games.csv (the file on the Resources page). We cleaned it in class into games_clean.
| Weak | Strong |
|---|---|
| "Data from the internet." | "Steam store data collected by Liza Wood from Steam Spy, published by TidyTuesday on 30/07/2019 as video_games.csv. Cleaned in class (Unit 2) into the table games_clean." |
A report is reproducible when another person, with only what you wrote, can get the same data and reach the same numbers.
A file stays the same. An API does not: it can answer differently tomorrow. So when your data comes from an API, as some of your own project datasets do, "source" must name three more things, or nobody can ever get the same rows again:
| If the source is... | The report must name |
|---|---|
| A file | Who published it, where, the publication date and the file name |
| An API | All of that, plus the endpoint (the address you asked), the parameters you sent and the date you extracted the data |
APIs come from Data sources: you ask a web address and it answers with data. Writing "source: PokéAPI" is like citing a book as "source: the library".
Part 2 · Size¶
One query gives you most of it:
SELECT COUNT(*) AS n_games, MIN(release_date) AS first_release,
MAX(release_date) AS last_release
FROM games_clean;
| n_games | first_release | last_release |
|---|---|---|
| 26,685 | 2004-01-11 | 2018-12-31 |
Add the number of columns (the table has 15) and, above all, say what one row is. It sounds too obvious to write. It is the single most useful sentence of the report.
| Weak | Strong |
|---|---|
| "It is a big table." | "26,685 rows and 15 columns. One row is one game. Releases run from 11/01/2004 to 31/12/2018." |
Part 3 · Variables¶
Do not list all 15 columns. Group the important ones and give each its type and its unit.
| Weak | Strong |
|---|---|
| "It has price, owners, playtime and score." | "Price in USD, with a free flag and a price band. Minimum estimated owners, with a tier (Niche, Mid, Hit). Playtime in minutes. Metascore, from 0 to 100." |
Without the unit, "playtime 110" could be minutes, hours or sessions. In this dataset it is minutes.
Parts 4 and 5: what does it say?¶
Here you reuse the stat card from Exploratory statistics. Every sentence is built the same way.
Number + unit + meaning. "4.99" is a query result. "The typical game costs 4.99 USD (median)" is a sentence.
Part 4 · Quality¶
Name what is missing, estimated or doubtful, and how much. A count or a percentage, always.
SELECT COUNT(*) AS games, COUNT(metascore) AS with_score,
ROUND(100.0 * COUNT(metascore) / COUNT(*), 1) AS pct_with_score
FROM games_clean;
| games | with_score | pct_with_score |
|---|---|---|
| 26,685 | 2,849 | 10.7 |
| Weak | Strong |
|---|---|
| "Some scores are missing." | "Metascore exists for only 2,849 games (10.7%). It was left empty on purpose: see has_metascore." |
Notice the second sentence of the strong version. In Imputation you decided not to fill the Metascore. The report is where you tell the reader about your decisions: what you filled, with what, and what you refused to fill.
Part 5 · Key figures¶
Centre, spread and one distribution. For the distribution, the share-of-the-total pattern from Synthetic variables does the work:
SELECT price_band, COUNT(*) AS n,
ROUND(100.0 * COUNT(*) / SUM(COUNT(*)) OVER (), 1) AS pct
FROM games_clean GROUP BY price_band ORDER BY n DESC;
| price_band | n | pct |
|---|---|---|
| Under 5 | 11,613 | 43.5 |
| 5 to 15 | 9,046 | 33.9 |
| Free | 3,094 | 11.6 |
| 15 to 30 | 2,367 | 8.9 |
| 30 or more | 565 | 2.1 |
| Weak | Strong |
|---|---|
| "The average price is 7.91." | "The typical price is 4.99 USD (median). The mean is 7.91 USD because a few items cost up to 595.99 USD. 43.5% of games cost under 5 USD and 11.6% are free." |
Careful: say which centre, and why
price is skewed: a few very expensive items pull the mean up and leave the median where it was. If you write only "the average price", your reader will imagine a typical game at 7.91 USD, and most games cost less. Write the median, or both, and one clause that explains the gap. That clause is worth more than a third decimal.
Part 6: what the data cannot tell you¶
This is the part beginners skip, and the part that makes a report trustworthy.
The limits of a dataset are the questions it cannot answer and the conclusions it does not support.
Ask yourself: what would a journalist in a hurry wrongly conclude from this table? Then write the warning. A good limit often starts with "This data cannot tell..." or "Careful: ...".
| Tempting conclusion | Why the data does not support it | The limit, written |
|---|---|---|
| "PUBG sold 50 million copies." | owners_min is the lower end of an estimated range, not a sales figure |
"Owners is the lower end of an estimate, not sales." |
| "Steam is more popular every year." | The table counts releases, not players | "This data cannot tell how many people play: it counts games released." |
Three more columns hide a limit each: metascore, price and release_date. Think about which games get a review score, on which day the price was read, and what the last date in the table is. Finding those limits is your job in the practice below.
Careful: limits do not make your report look weak
They make it trustworthy. A store page without system requirements gets refunds. A report without limits gets charts that claim things the data never said, with your name on them.
Try it: write the report¶
Write the descriptive report of games_clean: six headed parts, 250 words maximum, so that a classmate from another group could use the table without asking you anything.
Step 1 — Parts 1 to 3. Source and variables come from your notes of this unit. Size needs the one query above.
Step 2 — Parts 4 and 5. Reuse your stat card. Minimum: two quality problems, each with a count or a percentage; the centre and spread of price; and one distribution (price_band or owners_tier).
Step 3 — Part 6. No queries at all. At least two limits.
Step 4 — Attach the SQL. Paste the queries behind every figure below the report. They do not count towards the 250 words. They are what makes it reproducible.
Step 5 — Swap. Give your report to a classmate and take theirs. Tick this checklist. The rule: every "No" must point at the line it refers to. No marks and no adjectives, only yes, no and where.
| # | Check | Yes / No |
|---|---|---|
| 1 | The six parts are there, in order, each with its heading | |
| 2 | Source says who collected the data, from where, and which years it covers. For an API: endpoint, parameters and extraction date | |
| 3 | Size gives rows and columns, and says what one row is | |
| 4 | Every figure has a unit, and its query is attached | |
| 5 | For price, the centre is the median (or both), and the text says why |
|
| 6 | Quality names at least two problems, each with a count or a percentage | |
| 7 | Limits has at least two things the data cannot tell | |
| 8 | No claim goes beyond the data. 250 words or fewer |
Then fix one "No" in your own report. Reading a report you did not write is the fastest way to see what is missing in yours.
Stop querying, start writing
The usual way to run out of time is to keep running queries because they feel like progress. You already have the numbers. The work today is the sentences.
Key takeaways¶
- A descriptive report is the store page of a dataset: read it before you use the data.
- It has six parts: source, size, variables, quality, key figures, limits. Always in that order, each with its heading.
- Every figure is number + unit + meaning, and the query that produced it is attached.
- The source must make the report reproducible. For an API that means endpoint, parameters and extraction date.
- For a skewed column such as
price, write the median (or both centres) and say why. - Limits say what the data cannot tell. They make the report trustworthy, not weak.
- A report selects. All your query results pasted together are a log, not a report.
Quick check¶
1. Which list has the six parts of a descriptive report, in order?
- Title, queries, charts, results, opinion, signature
- Source, size, variables, quality, key figures, limits
- Size, source, limits, variables, key figures, quality
- Introduction, method, mean, median, charts, conclusion
First what it is (source, size, variables), then what it says (quality, key figures), then where it stops (limits). The order is fixed so that a reader always knows where to look, like the sections of a store page.
2. Which sentence belongs in a good report?
- "The average price is 7.91."
- "Most games are quite cheap."
- "The typical price is 4.99 USD (median); the mean is 7.91 USD because a few items cost up to 595.99 USD."
- "The price column has many different values."
It has a number, a unit and a meaning, and it says which centre is used and why the two disagree. "7.91" alone has no unit and hides the skew; "quite cheap" has no number at all.
3. Report A says: games are getting more popular. Why does this claim go beyond the data?
- Because the table only has games from one year
- Because the table counts games released, not players
- Because popularity cannot be measured with numbers
- Because the claim is missing a unit
The table shows 53 releases in 2004 and 8,845 in 2018: more games released. Nothing in it counts how many people play. A report must stop where the data stops.
4. Your project data comes from a public API. What must the Source part include, besides who publishes it?
- Only the name of the API
- The programming language the API is written in
- The endpoint, the parameters you sent and the date you extracted the data
- A screenshot of the API's home page
An API is a live source: it can answer differently tomorrow. Without the endpoint, the parameters and the extraction date, nobody can get the same rows again, and the report is not reproducible.
5. Which sentence is a limit of games_clean?
- "The table has 26,685 rows and 15 columns."
- "43.5% of games cost under 5 USD."
- "Owners is the lower end of an estimate, not sales."
- "One row is one game."
A limit says what the data cannot tell you. The others are size and key figures: true and useful, but they describe what is there, not where it stops.
6. A classmate says: more numbers make a better report. What is the best answer?
- True: a report should include every query result
- True, as long as each number has two decimals
- False: a report selects, and every number must earn its place
- False: a good report contains no numbers, only words
All the results pasted together are a log. A store page shows the few things you need to decide, not the source code. That is why the report is capped at 250 words: the limit forces you to choose.
7. You are reviewing a report on a table of flat rentals. It says: Data from a housing website. 4,000 rows. Average rent 1,190. Pick the two problems the checklist would catch.
- The figure has no unit, and the text does not say which centre it is or whether rents are skewed
- The source does not say who collected the data, when, or which period it covers
- The report is too short: it should be at least 250 words
- The number of rows should not appear in a report
Checks 4 and 5: a figure needs a unit, and for a column with a tail (one mansion is enough) the reader must know if 1,190 is the mean or the median. Check 2: "a housing website" is not a source. And 250 words is a maximum, not a minimum.
That closes the "prepare" stage. Your table is clean, measured and described. It has also never been drawn. Time to build the HUD: Unit 3 · Data visualisation.