Visit project site at http://vehicle-aging.herokuapp.com
Part 1: How Long Will A Nameplate Last?
Python (BeautifulSoup, Pandas, Lifelines, Plotly Dash)
A nameplate is the part of a car’s name that appears year after year: think Corvette, Camry, Caravan.
With this project, I wanted to visualize a nameplate’s chance of survival over time. Furthermore, I wanted to see how this differed by brand or brand type (ex. Luxury, Japanese, etc).
To accomplish this, I first web-scraped the names of every car that was made new for sale in the USA for each year 1997-2020 from a used-car site that listed this information.
Next, I used Pandas to clean, rearrange, and manipulate this data into a format appropriate for Survival Analysis. This included actions such as defining a “death” as a nameplate being discontinued, and determining if/when deaths occured.
Then, I applied a Kaplan-Meier Survival Analysis to the data using the module Lifelines. The Kaplan-Meier curve estimates the probability of surviving to a point from the cumulative probability of surviving each preceding interval.
Then, I used Dash to build an interactive dashboard where users can compare survival curves between different brands/types.