Import data
# excel file
data <- read_excel("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>
Plot prices
data %>%
ggplot(aes(Brand)) +
geom_bar()

data %>%
ggplot(aes(Transmission)) +
geom_bar()

data %>%
ggplot(aes(Mileage)) +
geom_bar()
