Car Price Checker is a web application designed to estimate the market value of used cars in Spain. By scraping data from coches.com, the application trains a machine learning regression model to predict the price of any specified vehicle. This project serves as a demonstration of data science and machine learning capabilities, and is part of my open portfolio on GitHub.
Access the live application here: https://car-price-checker.lopezrbn.com/
- User-Friendly Interface: Input vehicle details to receive an estimated market price.
- Comprehensive Data Collection: Aggregates data from a leading Spanish used car marketplace.
- Machine Learning Integration: Utilizes a regression model trained on real-world data for price predictions.
The application scrapes listings from coches.com, extracting relevant details such as:
- Selling price
- Car model
- Fuel type
- Location
- Year of manufacture
- Mileage
- Transmission type
- Power (HP)
- Number of doors
The scraping process involves:
- Gathering Listing URLs: Constructing search URLs for each car model and iterating through available pages to collect individual listing links.
- Extracting Data: Visiting each listing to extract detailed information, especially attributes not available on summary pages.
For implementation details, refer to the cars_scraper.py
script in the repository.
Collected data undergoes cleaning and preprocessing to ensure quality and consistency:
- Handling Missing Values: Imputing or removing incomplete records.
- Data Transformation: Converting categorical variables into numerical formats suitable for modeling.
- Feature Engineering: Creating new features or modifying existing ones to enhance model performance.
A multivariate linear regression model is employed to predict car prices. Key steps include:
- Model Training: Fitting the regression model using the processed dataset.
- Evaluation: Assessing model performance using metrics such as Mean Absolute Error (MAE) and R-squared.
- Prediction: Deploying the trained model to estimate prices based on user input.
The model accounts for various factors influencing car prices, including age, mileage, brand, model, and additional features.
To run the application locally:
- Clone the Repository:
git clone https://github.com/lopezrbn/car-price-checker.git cd car-price-checker
- Install Dependencies: Ensure you have Python 3.7 or higher installed. Then, install required packages:
pip install -r requirements.txt
- Run the Application: Start the web application using Reflex:
reflex run
The application will be accessible at http://localhost:3000
Contributions are welcome! If you have suggestions or improvements, please open an issue or submit a pull request. Ensure that your contributions align with the project's objectives and maintain code quality.
This project is licensed under the MIT License. See the LICENSE file for details.
For inquiries or feedback, please contact me at [email protected].