Maintenance price vs Car Acceptability
library(ggplot2)
car_data$maint = factor(car_data$maint,levels = c("vhigh","high","med","low"))
ggplot(data=car_data, aes(x=car_data$maint, fill=car_data$Class.Value)) +geom_bar () +theme()
Chitra V
August 22 2015
Total no. of Observations: 1728
Input Variable:
Buying price (vhigh, high, med, low)
Price of the maintenance (vhigh, high, med, low)
Number of doors (2, 3, 4, 5more)
Persons capacity in terms of persons to carry (2, 4, more)
Size of luggage boot (small, med, big)
Estimated safety of the car (low, med, high)
Output Variable:
## 'data.frame': 1728 obs. of 7 variables:
## $ buying : Factor w/ 4 levels "high","low","med",..: 4 4 4 4 4 4 4 4 4 4 ...
## $ maint : Factor w/ 4 levels "high","low","med",..: 4 4 4 4 4 4 4 4 4 4 ...
## $ doors : Factor w/ 4 levels "2","3","4","5more": 1 1 1 1 1 1 1 1 1 1 ...
## $ persons : Factor w/ 3 levels "2","4","more": 1 1 1 1 1 1 1 1 1 2 ...
## $ lug_boot : Factor w/ 3 levels "big","med","small": 3 3 3 2 2 2 1 1 1 3 ...
## $ safety : Factor w/ 3 levels "high","low","med": 2 3 1 2 3 1 2 3 1 2 ...
## $ Class.Value: Factor w/ 4 levels "acc","good","unacc",..: 3 3 3 3 3 3 3 3 3 3 ...
All the variables are factor variables
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.2.2
p<-ggplot(data=car_data, aes(x=car_data$persons, fill=car_data$Class.Value)) + geom_bar()
p+ theme()+ggtitle("Seating capacity")
Conclusion: Seating capacity is an important factor for customers in accepting or rejecting a car
Minimum required seating capacity of a car is 4 or more.
library(ggplot2)
car_data$safety = factor(car_data$safety,levels = c("low", "med", "high"))
ggplot(data=car_data, aes(x=car_data$safety, fill=car_data$Class.Value)) +geom_bar () +theme()
Conclusion: Safety is an important factor for Customers in accepting or rejecting a car
Low safety cars are not accepted by the customers
Seating capacity and Safety of the car are two important factors for accepting or rejecting a car
Minimum required seating capacity for a car is 4 or above to be at the acceptable level
Low safety cars are straightaway rejected by the customers
library(ggplot2)
car_data$buying = factor(car_data$buying,levels = c("vhigh","high","med","low"))
ggplot(data=car_data, aes(x=car_data$buying, fill=car_data$Class.Value)) +geom_bar () +theme()
library(ggplot2)
car_data$maint = factor(car_data$maint,levels = c("vhigh","high","med","low"))
ggplot(data=car_data, aes(x=car_data$maint, fill=car_data$Class.Value)) +geom_bar () +theme()
library(ggplot2)
car_data$doors = factor(car_data$doors,levels = c("2","3","4","5more"))
ggplot(data=car_data, aes(x=car_data$doors, fill=car_data$Class.Value)) +geom_bar () +theme()
library(ggplot2)
car_data$lug_boot = factor(car_data$lug_boot,levels = c("big","med","small"))
ggplot(data=car_data, aes(x=car_data$lug_boot, fill=car_data$Class.Value)) +geom_bar () +theme()