Making a linear model based on points

Alexander Klonov
11.10.2020

Miles per gallon based on horse power

Most of people use cars these days and cars can be very different from big family car to personal hypercar. And based on type of car it's fuel consumption may vary. A huge Toyota LandCruser definitely will use more fuel for a same distance than Volkswagen beetle. What's why it's important to predict how many miles auto can ride with some amount of the fuel.

Some summary of the cars

library(ggplot2)
summary(cars)
     speed           dist       
 Min.   : 4.0   Min.   :  2.00  
 1st Qu.:12.0   1st Qu.: 26.00  
 Median :15.0   Median : 36.00  
 Mean   :15.4   Mean   : 42.98  
 3rd Qu.:19.0   3rd Qu.: 56.00  
 Max.   :25.0   Max.   :120.00  

Complex and non-interactive plot

plot of chunk unnamed-chunk-2

Easy and interactive plot

By creating this app, with shiny, we can achieve simplicity, yet useful predictions about fuel consumption on our cars. Shiny app can be found here: https://zennoma.shinyapps.io/Coursera_Project/