← All missions
B rank
Mission report

Car Price Prediction

End-to-end ML project: scraping Tunisian car listing sites, cleaning and merging the data, feature engineering and regression models to predict prices in TND.

10 Dec 2025Python / BeautifulSoup / pandas
#Python#BeautifulSoup#pandas#scikit-learn

The goal: predict the price, in TND, of a car listing (used or new) from its features.

Pipeline

  1. Data collection: scrapers for several Tunisian listing sites (automobile.tn, Baniola, SparkAuto and more).
  2. Cleaning and merging: normalize prices, mileage and year, turn free text into fields, then merge the sources into one dataset.
  3. Exploratory analysis: distributions, correlations and outliers, including listings with wrong or missing prices.
  4. Feature engineering: car age, log(price), groupings and interactions.
  5. Modeling: linear and tree baselines, then stronger ensemble models.
  6. Evaluation: MAE, RMSE and R² with cross-validation.
  7. Delivery: a small prediction web app.

Data quality

Scraped listings are messy. Two of the problems the cleaning step had to handle:

Listings with missing prices

Listings with wrong prices