Trip Cost Estimator

Matt Baumer
7-21-16

Road trips

Everyone loves travelling but it can be SO EXPENSIVE

  • What if there was a way to figure out exactly how far you can go without going over your budget?
  • All you need to do is input your car's characteristics along with the distance you want to go and the price of gas where you're buying it
  • The power is in your hands

How it works

Using a state-of-the-art database, our experts have built a model that can predict with incredible accuracy the gas mileage of your vehicle

library(ggplot2)
data(mtcars)
model <- lm(mpg ~ cyl + disp + hp + wt + am + gear, data = mtcars)
round(coef(model)[2:7], digits = 2)
  cyl  disp    hp    wt    am  gear 
-1.09  0.01 -0.03 -3.31  1.46  0.12 

Getting the most bang for your buck

Moral of the story is get a light car!

plot of chunk unnamed-chunk-2

Other features that are accounted for include

  1. Number of cylinders in your engine
  2. Engine displacement
  3. Horsepower
  4. Transmission type
  5. Number of gears