Intro

plot of chunk unnamed-chunk-1

There are lots of cars on roads nowadays. Most of them are typical and boring. Some of them are fancy and expensive. Yes, there are few manufacturers that managed to catch people's sight and imagination. Those are very expensive. But it is almost for sure you'll turn around when you see old school mustang or chevy. Especially if you are a grown up man and that was your dream…

Data Loading and processing

Auto MPG data was taken from the Machine Learning Repository and can be found here. The data set is a bit outdated but I'm a big fan of oldscool cars.

The original dataset (wiht NA values) is used in the anlysis.

Main tasks are:

  • Create an app to be able to visually explore MPG and other characteristics in the dataset
  • Use linear regression model to fill in NA values to mpg and horsepower columns

Data transformations steps summary

  • Inspecting NA values shows that there are 8 observation in mpg column and 6 observation in horsepower column are missing
  • Since mpg is dependent from the number of cylinders the linear regression model to fill missing values was build with the regard of cylinders values.
  • Manufacturer name as a separate column; It appears that there are couple of misspelling in names ( e.g. : toyouta instead of toyota, chevroelt instead of chevrolet). In total 5 such misspelling were corrected.
  • Removed records: 1 record with unknown car manufacturer ("hi"); 7 records that represent 3 and 5 cylinder cars.

Output structure

Control Parameters Requirements

  • To select multiple brands for comparison
  • To select custom year range

Expected Output

  • MPG Boxplot by car maufacturer (ordered)
  • Hoursepower vs acceleration scatterplot by cylinders
  • MPG by country of origin during time period
  • Table with the details

Explore app here