An analysis of car brands and their average horsepower

Author

Chase

Introduction

I will be performing an analysis on the car manufacturers data set, outlining the information of different manufacturers and models of cars. Each row is a specific model of car and the information about that vehicle is included as columns.

# Data set
#| Message: FALSE
TheUltimateCarsDataset <- read_csv("https://myxavier-my.sharepoint.com/:x:/g/personal/grayc11_xavier_edu/EehprycDX9BPsDXPLz19-CABqDX3Tlu9uyoTJkuc_vUulA?download=1")
hist(TheUltimateCarsDataset$`highway MPG`)

Research Question

Which car brand has the highest average horsepower? I think this is interesting because horsepower is something that a lot of brands use to promote their products so knowing what brand has the highest average helps see around some “creative advertising”

Steps to solve

I plan on using the group by function to group together the car manufacturers so I can utilize the summarize function to calculate the mean and remove the N/As I can then use a bar plot to illustrate the difference in values between car brands and can also observe which is the highest. After realizing there were a lot of different car manufacturers, so I added a filter at 500 horsepower and above to weed out some of he manufacturers that are clearly not going to be in hte running for most horsepower

Visualize it

TheUltimateCarsDataset %>%
  group_by(`Make`) %>%
  filter(`Engine HP` > 500) %>%
  summarize(`Engine HP` = mean(`Engine HP`, na.rm = TRUE)) %>% 
  ggplot(aes(x = Make, y = `Engine HP`)) +
  geom_bar(stat = "identity")

Using this bar plot, it can be observed that Bugatti is the leader in average horsepower

and it is not even close. The analysis that was done was a group and filter for car brands,

and calcuate the average horsepower. When thinking about the results, almost all of the cars

that Bugatti produces are or if not close to being hyper cars, so it makes sense. However,

I expected brands like Aston Martin, Ferrari, Lamborghini, and Maserati to give Bugatti more

of a run for its money.