Used Car Dashboard
The Story Behind It
This project began during my MSc in Data Science as an end-to-end exercise in doing everything a data scientist actually does — not just training a model in a clean notebook, but collecting the raw data, wrestling it into shape, understanding it, modelling it, and putting the result somewhere people can use. I picked the UK used car market because it is messy, real, and full of the kind of noise that makes a project honest.
Built together with Mark Stent, it covers the complete pipeline: scraping roughly 60,000 live listings from AutoTrader.co.uk across 39 manufacturers, cleaning the tangled HTML into structured features, exploring the market with statistics and NLP, and training a regression model that predicts a car's asking price from its attributes. The whole thing was originally served through a Plotly Dash app on Heroku.
Years later I reopened it. The Heroku dashboard had long since retired, so I rebuilt it as a lightweight static dashboard that runs entirely in the browser off generated CSV files — hosted on GitHub Pages, mirroring the approach I used for my Music League dashboards. This page documents that revived project.
Technical Details
-
Scraping
BeautifulSoup & urllib — Around 6,000 AutoTrader.co.uk result pages were visited across 39 makes and both transmission types, yielding roughly 60,000 individual listings. Discovered URLs were cached to avoid re-running the slow discovery step.
-
Cleaning
Pandas — Raw listings arrive wrapped in HTML. Tags are stripped and the combined specification string is parsed positionally into registration year, body type, mileage, engine size, horsepower, transmission, and fuel type, with careful handling of missing fields.
-
Analysis
EDA & NLP — Per make/model summary statistics (mean, min, max price and mileage) drive the dashboard's error bars, while listing text is run through a custom stop-word list and the VADER lexicon to produce word-frequency counts and word clouds.
-
Modelling
scikit-learn & statsmodels — Ten regressors were compared with 5-fold cross-validation. A BaggingRegressor won with a cross-validation R² of 0.909 and a test-set R² of 0.880, serialised with joblib. An OLS model was also inspected for feature significance.
-
Dashboard
Static, client-side — The original Plotly Dash / Heroku app was rebuilt as an interactive dashboard that runs entirely in the browser off exported CSV files and is hosted on GitHub Pages — no server required.
What It Represents
This is the project where I first strung the entire data science pipeline together myself — from the awkward reality of scraping a live commercial website to a deployed, interactive result. Reviving it years later, and swapping a retired cloud app for a static browser-based dashboard, made it a nice bridge between where I started and how I build things now.