This is an Exploratory Data Analysis (EDA) project on a vehicle sales dataset to identify patterns in pricing, vehicle characteristics etc. over time. It involves data cleaning, feature engineering and visual exploration using Python.
-
Source: Vehicle Sales Data
-
Link: https://www.kaggle.com/datasets/syedanwarafridi/vehicle-sales-data
-
Platform: Kaggle
-
Description: Contains vehicle sales records including:
- Vehicle attributes (make, model, body type, transmission, color, interior)
- Pricing information (selling price, MMR)
- Metrics (odometer, condition)
- Location data (state)
- Sale date
pandas– data manipulation and analysisnumpy– numerical operationsmatplotlib– data visualization
The dataset was preprocessed in following ways:
- Rows with missing critical identifiers ('year', 'make', 'model', 'vin', 'sellingprice', 'saledate') are removed.
- Categorical columns are standardized by converting text to lowercase and empty values are filled with 'unknown'.
- Invalid numeric entries in the 'color' column are removed and missing values are replaced with 'unknown'.
- State values are validated against a two-letter abbreviation pattern and invalid entries are labeled as 'unknown'.
- Missing values in 'condition', 'odometer', and 'mmr' columns are imputed using values of appropriate central tendencies.
- 'Sale date' is converted to datetime format.
The following features are extracted to support analysis:
- Condition categories: Very Poor, Poor, Average, Good, Very Good
- Odometer categories: Low, Medium, High, Very High
- Month–Year: Used for time-series aggregation
- Vehicle Count by Make (Bar chart): shows the manufacturers of most frequently sold vehicles
- Vehicle Count by Body Type (Bar chart): highlights distribution of vehicles across different body styles
- Number of Vehicles by Transmission Type (Pie chart): shows the proportion of vehicles by transmission type
- Condition vs Odometer (Scatter plot): showcases the relationship between vehicle usage and condition
- Number of Vehicles per State by Top Vehicle Type (Stacked bar chart): compares proportion of vehicle types across states
- MMR vs Selling Price (Scatter plot): shows the relationship between market value and actual sale price
- Selling Price by Body Type (Box plot): compares price ranges across different body styles
- Selling Price by Condition Category (Box plot): shows how vehicle condition affects pricing
- Average Selling Price by Condition Category (Line plot): tells average price variation across condition levels
- Average Selling Price by Odometer Category (Line plot): shows pricing trends with increasing usage
- Total Sales Over Time (Line plot): monthly total sales
- Average Selling Price Over Time (Line plot): monthly average selling prices
- A small number of manufacturers dominate the dataset, indicating higher market presence compared to others. Sedan and SUV body types appear most frequently, suggesting stronger demand or higher resale turnover for these categories.
- Automatic transmissions constitute a significantly large share of vehicles, reflecting consumer preference for ease of driving.
- Vehicle condition generally declines as odometer readings increase, as expected by wear and tear. Those with lower odometer readings command higher average prices, indicating depreciation with usage. Vehicles in better condition categories exhibit higher price ranges and medians, showing the value of vehicle maintenance.
- MMR is a reliable predictor of selling price as a strong positive relationship is observed.
- Larger or premium body types tend to have higher median selling prices compared to compact vehicle types.
- Monthly sales volumes fluctuate over time, suggesting possible seasonal effects. Average prices show variation across months, indicating changes in demand, supply or economic conditions.