Datasets
The foundations extract
The same pricing question as the main London file, asked in the mathematics workshop that runs before the four days.
The file, and the notebooks that read it
data
folder beside the notebook. Every notebook reads data/london_foundations.csv
and is run from its own folder.What this data answers
It exists so the workshop can show a sampling distribution. The whole frame is loaded and treated as a population, which is the one thing a real project never has.
Dataset overview
| Question | The same pricing question as the main London file, asked in the mathematics workshop that runs before the four days. |
| Observation | One listing, as advertised in the snapshot of 19 June 2026. |
| Target | price. Quoted price per night, in pounds. |
| Inputs | guests, bedrooms, bathrooms, km_to_centre, min_nights, reviews_pm, rating, location_score |
| Size | 20,740 rows and 17 columns. |
| Held back | superhost, used as a treatment in the causal part, not as a feature. |
How the rows are divided
No split column. The workshop draws its own sample of 400 inside the notebook, with a fixed seed, so that the sample mean can be compared with the frame mean.
Data dictionary
Every column in london_foundations.csv. The
fourth column is the one to read before modelling: a variable that is not
known when the prediction is needed cannot be used, however well it
predicts.
| Column | Type | What it means | When is this known? |
|---|---|---|---|
listing_id | text id | Inside Airbnb identifier. | Assigned by the platform. |
host_id | text id | Host identifier. | Assigned by the platform. |
borough | category | London borough. 33 levels. | Fixed by where the property is. |
room_type | category | entire_home or private_room. | Set by the host. |
guests | whole number | Guests the listing accommodates, 1 to 8. | Set by the host. |
bedrooms | whole number | Bedrooms, 0 to 4. | Set by the host. |
bathrooms | number | Bathrooms, 0.5 to 4. | Set by the host. |
km_to_centre | number, km | Great-circle distance to Charing Cross. | Computed for this course from the recorded coordinates. |
min_nights | whole number | Shortest stay the host accepts, 1 to 14 nights. | Set by the host. |
reviews_total | whole number | Reviews since the listing was created. | Accumulates over the life of the listing. |
reviews_pm | number | Recent review rate, reviews per month. | Accumulates over the life of the listing. |
rating | number, 1 to 5 | Overall guest rating. | Written by guests after they stay. |
location_score | number, 1 to 5 | Guest rating of the location. | Written by guests after they stay. |
availability | whole number, nights | Nights bookable in the next year. | A forward-looking calendar setting, known at the scrape. |
superhost | 0 or 1 | 1 if the host holds the Superhost badge. | Awarded on review performance. Used as a treatment on the workshop, not as an input. |
last_review | date (YYYY-MM-DD) | Date of the most recent review. | Known at the scrape. |
price | number, GBP (target) | Quoted price per night, in pounds. | Returned with the quote. This is the thing being predicted. |
Source and preparation
The source is Inside Airbnb, London detailed listings, snapshot of 19 June 2026, released under CC BY 4.0. Built from the same download as the main London file, under different filters, because it answers a different question.
A tighter extract than the four-day file. It keeps entire homes and private rooms with a summer 2026 check-in, at least three reviews and complete review scores, so that every review column is present for every row.
| Step | Rows left | Why |
|---|---|---|
| Downloaded rows | 92,638 | |
| Entire homes and private rooms, available, GBP 25 to 500 | 55,862 | the price band is narrower than the four-day file |
| Check-in between 1 June and 31 August 2026 | 50,085 | one stated booking window |
| At least three reviews and complete review scores | 32,678 | so the rating and review-rate columns exist everywhere |
| 1 to 8 guests, 0 to 4 bedrooms, 0.5 to 4 bathrooms, 1 to 14 minimum nights | 20,740 | plausible ranges, so averages are not driven by typos |
There are no missing values anywhere in this file, which is a convenience for a first practical and also a decision with consequences: listings without reviews are absent, and they are not a random subset of London.
What this data does not establish
- The price is a quote and includes fees, exactly as in the four-day file.
- Treating the frame as a population is a teaching device. It is a stand-in that makes a sampling distribution visible; it is not a claim that these 20,740 listings are all of London.
- The Superhost badge is awarded on review performance, so a comparison of badged and unbadged listings is not an estimate of what the badge does.
Where it is used
- Day 1a. Day 1a uses it for sampling distributions, standard errors and least squares at a realistic sample size.