# excel file
data <- read_excel("../00_data/MyData.xlsx")
data
## # A tibble: 100 × 12
## Brand Model Year Kilometers_Driven Fuel_Type Transmission Owner_Type Mileage
## <chr> <chr> <dbl> <dbl> <chr> <chr> <chr> <dbl>
## 1 Toyo… Coro… 2018 50000 Petrol Manual First 15
## 2 Honda Civic 2019 40000 Petrol Automatic Second 17
## 3 Ford Must… 2017 20000 Petrol Automatic First 10
## 4 Maru… Swift 2020 30000 Diesel Manual Third 23
## 5 Hyun… Sona… 2016 60000 Diesel Automatic Second 18
## 6 Tata Nexon 2019 35000 Petrol Manual First 17
## 7 Mahi… Scor… 2018 45000 Diesel Automatic Second 15
## 8 Volk… Polo 2020 25000 Petrol Automatic First 18
## 9 Audi A4 2017 30000 Diesel Automatic First 18
## 10 BMW X1 2019 20000 Diesel Automatic Second 20
## # ℹ 90 more rows
## # ℹ 4 more variables: Engine <dbl>, Power <dbl>, Seats <dbl>, Price <dbl>
Does the price of the cars price decline with more kilometers driven.
ggplot(data = data, mapping = aes(x = Kilometers_Driven, y = Price)) +
geom_point(mapping = aes(Brand = Year)) +
geom_smooth()
There seems to be no real evidence that car prices decline after more kilometre’s driven. We would need to look further investigation into brand and model to give a more concrete answer.