Used Car Sales Analysis

Posted on Feb 8, 2021

Shiny App

All across the United States people get in a car and go somewhere on a daily basis. Whether the destination is work, the store or a friend’s house, the car is one of the primary means of transportation. In 2019 alone Americans drove over 3 trillion miles. Odds are good those miles were driven in a used car. In 2019, Americans bought 40 million used cars, more than twice as many as new cars. Clearly, the used car market is very important in the United States and making sure you have complete background knowledge of the market is very important for both buyers and sellers.

Looking around the internet I was able to find data on used car sales on eBay from 2017-2019. I dug into and analyzed what factors had the greatest impact on the price of a used car. Using R I was able to develop a Shiny App to help visualize the data.

Upon first acquiring the data the first step was to clean and filter the data to remove. anomalous data. Cars with very large mileage numbers such as over 1 billion or a year made in the 1800’s or after 2020 were immediately filtered out.The next category to be  filtered out was  cars made before 1950. Cleaning the data involved adding a grouping of the decade a car was made, as well as grouping the mileage into groups of 25,000 miles up to 275,000.

The first piece of data I looked into was the impact of the mileage and year of the car. It became clear very quickly that both factors had a significant impact on the cost of a used car. There’s an inverse correlation between the mileage of a car and its sale price, and the price of a car increased for more recent models.

One interesting thing about this is while both trends generally held true there were outliers where the cost of a car would increase or hold steady even with high mileage numbers or being a much older car. This would make sense in cases where certain car models have value beyond just being a means of transportation, as many people collect cars so they may not be as concerned with mileage, and the older the car may be may have additional value to them. While I was not able to delve to much into this in my initial analysis it is something to look into more going forward.

Another area of interest is specific attributes of the car such as the drive type and number of cylinders in the car. When looking at these attributes there was not a correlation between the price of the car.

This makes sense as these features can be in cars that are new and old as well as having high and low mileage numbers.

While the data was valuable and I was able to extract many insights there is definitely room for additional exploration. Looking into the impact of collector cars as well as being able to see how specific car amenities such as GPS and music playing devices available could significantly aid the analysis.

About Author

Ethan Zien

Data Analyst with a background in Social Media Advertising and a strong interest in sports analytics
View all posts by Ethan Zien >

Leave a Comment

No comments found.

View Posts by Categories


Our Recent Popular Posts


View Posts by Tags

#python #trainwithnycdsa 2019 airbnb Alex Baransky alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus API Application artist aws beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep Bundles California Cancer Research capstone Career Career Day citibike clustering Coding Course Demo Course Report D3.js data Data Analyst data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization Deep Learning Demo Day Discount dplyr employer networking feature engineering Finance Financial Data Science Flask gbm Get Hired ggplot2 googleVis Hadoop higgs boson Hiring hiring partner events Hiring Partners Industry Experts Instructor Blog Instructor Interview Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter lasso regression Lead Data Scienctist Lead Data Scientist leaflet linear regression Logistic Regression machine learning Maps matplotlib Medical Research Meet the team meetup Networking neural network Neural networks New Courses nlp NYC NYC Data Science nyc data science academy NYC Open Data NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time Portfolio Development prediction Prework Programming PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn Selenium sentiment analysis Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau team TensorFlow Testimonial tf-idf Top Data Science Bootcamp twitter visualization web scraping Weekend Course What to expect word cloud word2vec XGBoost yelp