๐Ÿ Car Sales Data Analysis (Python)

157 rows ยท 16 columns ยท Standard library + Matplotlib

Python CSV Matplotlib Statistics Data Quality
โ† Back to Portfolio

Dataset Overview

157
Car Models
16
Columns
30
Manufacturers
2
Vehicle Types

Data Quality

ColumnMissing Values
Sales_in_thousands0
Price_in_thousands2
Engine_size1
Horsepower1
Fuel_efficiency3
Power_perf_factor2
__year_resale_value36
Note: __year_resale_value has the most missing data (36 of 157 rows = 23%) โ€” common in real-world resale datasets where not all models have recorded resale prices.

Top 10 Manufacturers by Total Sales

Top 10 manufacturers by total sales

Total sales in thousands of units

RankManufacturerTotal Sales (thousands)
1Ford2,022.63
2Dodge910.15
3Toyota740.21
4Honda592.67
5Chevrolet554.37
6Nissan399.63
7Pontiac370.53
8Jeep293.15
9Buick242.02
10Mercury238.00
Insight: Ford dominates with 2M+ units โ€” more than double second-place Dodge. The top 3 manufacturers (Ford, Dodge, Toyota) account for roughly half of total market volume.

Price Distribution by Vehicle Type

Price distribution by vehicle type

Boxplot showing price spread across vehicle categories

Vehicle TypeAvg Price (thousands)
Car$26.32K
Passenger$27.76K
Insight: Passenger vehicles carry a slight premium over Cars on average, but the spread within each category is wide โ€” pricing strategy should account for model-level variance, not just type.

Horsepower vs Price

Horsepower vs Price scatter plot

Each dot = one car model ยท Red line = linear trend

Sales Volume vs Price

Sales vs Price scatter plot

Each dot = one car model ยท Red line = linear trend

Correlation Results

r = 0.840
Horsepower โ†” Price
Strong positive โ€” higher-performance cars are priced higher. n = 155
r = โˆ’0.305
Sales โ†” Price
Weak negative โ€” lower-priced cars tend to sell more volume. n = 155

Business Takeaways

Limitations & Next Steps

How to Run

Original analysis (stdlib only โ€” no dependencies)

python analysis.py

Outputs insights.md and top_manufacturers.csv.

Regenerate charts

pip install matplotlib
python make_charts.py

Saves all 4 charts to portfolio_report_assets/.

Tech Stack

Python 3 csv (stdlib) math (stdlib) Matplotlib