This project is a Python-based web scraping and data analysis tool designed to collect vehicle listings from the Autoscout24 website. It aims to perform polynomial regression on the average prices of vehicles, binned by thousands of miles, and select the best polynomial degree using k-fold cross-validation.
Autoscout24 is a popular platform for buying and selling vehicles. This project allows you to gather vehicle listings and perform polynomial regression analysis on the average prices, categorized by mileage. By scraping Autoscout24's web pages, extracting metadata, and running regression analysis, you can gain insights into how mileage affects vehicle prices.
- Web scraping of Autoscout24 listings.
- Extraction of metadata from the HTML web code.
- Polynomial regression analysis on average prices.
- Selection of the best polynomial degree via k-fold cross-validation.
Before using this project, ensure you have the following dependencies installed:
- Python 3.x
- Libraries in
requirements.txt
To install the required libraries, you can run the following command:
pip install -r requirements.txt
- Clone the repository to your local machine:
git clone https://github.com/lorenzoelia/autoscout24_scraping.git
- Navigate to the project directory:
cd autoscout24_scraping
- Create the
listings
folder (if it doesn't already exist):
mkdir listings
- Run the Python script to perform the scraping and polynomial regression:
python main.py
-
The script will collect listings, preprocess the data, run regression analysis, and select the best polynomial degree.
-
The results will be saved to files within the
listings
folder. -
Review the generated CSV files for listings and processed data.
This project is licensed under the MIT License - see the LICENSE file for details.