Yoad22/craigslist-used-cars-eda
Craigslist Used Cars and Trucks: EDA Overview This dataset and notebook contain an Exploratory Data Analysis (EDA) of real Craigslist used-car listings scraped across the United States. Main Question: What factors most influence the price of a used car listed on Craigslist? Target Variable: price — the seller's asking price for each vehicle listing. About the Dataset Property Details Source Kaggle — Austin Reese (scraped from Craigslist)… See the full description on the dataset page: https://huggingface.co/datasets/Yoad22/craigslist-used-cars-eda.
Craigslist Used Cars and Trucks: EDA
<video src="https://huggingface.co/datasets/Yoad22/craigslist-used-cars-eda/resolve/main/EDA_video.mp4" controls="controls" style="max-width: 720px;"></video>
Overview
This dataset and notebook contain an Exploratory Data Analysis (EDA) of real Craigslist used-car listings scraped across the United States.
Main Question: What factors most influence the price of a used car listed on Craigslist?
Target Variable: price — the seller's asking price for each vehicle listing.
About the Dataset
Features include: year, manufacturer, condition, cylinders, fuel, odometer, transmission, drive, type, paint_color, state, and more.
Repository Contents
Part 1: Data Cleaning
Raw Craigslist data required substantial cleaning. Rather than a single blanket strategy, we matched each column to the approach that fits it best.
Columns Dropped
The following columns were removed as they add no value to price analysis:
Two columns (id and model) were kept temporarily through the relevant cleaning steps and dropped only once their job was done: id protected against false duplicates during deduplication, and model enabled the manufacturer recovery described below.
Missing Values Strategy
Smart Manufacturer Recovery
Filling every missing manufacturer with unknown would create a large fake brand that pollutes later analysis. Instead, we build a lookup from rows where both model and manufacturer are present, then use it to recover manufacturers when only the model is known. For example, a listing with model = civic becomes a Honda; model = f-150 becomes a Ford. Only rows missing both fields fall back to unknown.
The model column is kept alive for now because it is also used in the Smart Cylinder Recovery step below.
Smart Cylinder Recovery
The cylinders column is filled in four passes, from most specific to least specific:
- Most common cylinder count for each
(manufacturer, model)pair — the most reliable match, since a given model is very consistent on cylinders regardless of year. - Most common cylinder count for each
(manufacturer, year)pair, for rows still missing. - Most common cylinder count for the manufacturer alone, as a further fallback.
- Overall median, as a final safety net.
This hierarchy produces much more realistic values than a single dataset-wide median. After this step, the model column has finished its job (helping recover both manufacturer and cylinders) and is dropped.
Unrealistic Value Filters
Smart Duplicate Detection
Because we dropped id and VIN, the default duplicate check could incorrectly merge two genuinely different listings. We keep id through the dedup step, then identify re-posts by matching across nine content fields: price, year, manufacturer, odometer, state, condition, cylinders, fuel, paint_color. Matching all nine by coincidence is implausible, so we treat such pairs as the same car posted twice. id is dropped right after this step.
Outlier Detection
After the unrealistic-value filter, we apply IQR-based outlier removal to price:
- Lower bound = Q1 - 1.5 × IQR
- Upper bound = Q3 + 1.5 × IQR
Before/after box plots confirm the distribution becomes much cleaner.
Feature Engineering
A new column car_age was created from the year column:
car_age = 2026 - yearPart 2: Research Questions and Visualizations
Guiding question: What factors determine the price of a used car on Craigslist?
Question 1: What does the price distribution look like?

Insight: The distribution is right-skewed. Most cars are priced at lower values, but a long tail of more expensive vehicles pulls the mean above the median. This is typical of used car markets, where a few luxury or collector cars co-exist with many affordable listings.
Question 2: Which manufacturers are most commonly listed?

Insight: American brands — Ford, Chevrolet, GMC, Dodge — dominate Craigslist listings. This reflects their popularity in the US market and the sheer volume of American used cars in circulation.
Question 3: Which manufacturers have the highest average prices?

Insight: Even among the most-listed brands, there is a meaningful spread in average price. Brands like GMC and Ram tend to skew higher, largely due to trucks, while others cluster at lower price points. Brand alone is already a useful signal of expected price range.
Question 4: How does vehicle condition affect price?

Note: the unknown category is excluded from this plot, since it dominates the count as a fallback fill for missing conditions and would obscure the pattern across real condition values.
Insight: Condition is one of the strongest price signals in the dataset. "New" and "like new" vehicles command the highest prices, while "salvage" cars are the cheapest. Salvage cars have been in accidents and written off by insurance companies, significantly reducing their market value.
Question 5: Is there a relationship between odometer reading and price?

Insight: There is a clear negative correlation between odometer and price. More miles means lower price, exactly as expected from the used-car market. The scatter plot also reveals high variance at low odometer readings, meaning newer low-mileage cars vary much more widely in price than high-mileage ones.
Question 6: Does fuel type influence price?


Insight: Gas cars dominate in quantity, but diesel and electric vehicles carry clear price premiums. Diesel engines are mostly found in trucks and commercial vehicles, which ties back to our drivetrain finding that 4WD vehicles are the priciest. Electric vehicles belong to a newer and generally higher-trim market segment, which explains their elevated average price.
Question 7: How does car age relate to price?

Insight: There is a clear downward trend. As cars get older, their average price falls. There are interesting bumps at very high ages (30 to 35 years): these are classic cars, which can spike in price, revealing a small but real collector-car market even on Craigslist.
Question 8: Does drive type affect price?

Insight: 4WD vehicles have the highest median price, followed by RWD, then FWD. 4WD is common in trucks and SUVs, and RWD is typical in luxury and sports cars. FWD sedans and hatchbacks dominate the lower price range.
Question 9: What do the numeric correlations look like overall?

Key Observations:
All correlations match domain intuition, which gives confidence that the cleaned data is solid.
Summary of Findings
Conclusion: Used car pricing on Craigslist is driven by a combination of factors. Condition, age, mileage, and drivetrain are the strongest individual signals.
Used Car Price Calculator
As a practical application of the EDA findings, the notebook includes a simple price calculator. Given five inputs (manufacturer, year, odometer, condition, drive type), the calculator finds similar listings in the cleaned dataset and returns an estimated price, a typical price range, and a qualitative confidence level (High, Medium, or Low) based on how many similar cars were found and how consistent their prices are.
