Module 9 - Developing Data Products: Course Project

Hasmirah Hassan

March 25, 2016

Description

The shiny application allows a user to enter some basic information about their vehicle, and obtain a prediction for its MPG. Input 7 variables to get 1 output, Vehicle MPG.

The application can be viewed at:

The application

Components in the application

The app relies on a simple GLM algorithm and a data set “auto MPG” from the UCI Machine Learning Repository located here.

The R Code

library(RCurl)
library(caret)
mpg <- getURL("http://robertkevinackerman.com/wp-content/uploads/2014/08/mpg.csv")
mpg <- read.csv(text = mpg)
modFit <- train(mpg ~ cyl + disp + horse + weight + accel + year + origin, method="glm", data=mpg)

*Credit to robertkevinackerman for hosting the dataset

Using the application and the Output

Input

Output

The calculated Vehicle MPG