20 de mayo de 2017

Preview

This is a Basic R Markdown presentation for the asignment week 3 of developing data Products. It shows the efficiency of cars in fuel consumption depending on: Number cylinders, gears, Carburetors and if they are automatics or manuals.

The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973–74 models)

Considered cases

  • Miles Per Gallon vs Number of cylinders
  • Miles Per Gallon vs Number of forward gears
  • Miles Per Gallon vs Automatic/Manual Transmission
  • Miles Per Gallon vs Number of Carburetors

Miles Per Gallon vs Cylinders

library(plotly)
plot_ly(mtcars, y = ~mpg, color = ~as.factor(cyl), type = "box")

Miles Per Gallon vs Forward Gears

library(plotly)
plot_ly(mtcars, y = ~mpg, color = ~as.factor(gear), type = "box")

Miles Per Gallon vs Trans. (A/M 0/1)

library(plotly)
plot_ly(mtcars, y = ~mpg, color = ~as.factor(am), type = "box")
## Warning in RColorBrewer::brewer.pal(N, "Set2"): minimal value for n is 3, returning requested palette with 3 different levels

Miles Per Gallon vs Carburetors

library(plotly)
plot_ly(mtcars, y = ~mpg, color = ~as.factor(carb), type = "box")

Conclusion

According the results, the most efficient car would be the one with:

  • 4 Cylinders
  • 4, 5 Forward gears
  • 1 Carburetors
  • Manual transmission