9/28/2017

Introduction

Welcome to visit us.

The site is providing you a free tool to illustrate the Fuel-efficiency ratings of your Dream automobile.

How to use the app

You can sort the table according to the variable you want by clicking the arrows at the top of the table.

First, provide your trip detail like distance and the price od gasoline in your region, it's needed to calculate the Gasoline Expenditure for each car.

Second, provide your budget on gasoline, so we can filtered and show the cars with has Miles per Gallon (MPG) that best fits your budget and needs.

Third, you can choose your desire cars characteristic in term of: Cylinders, Displacement, Horse Power and Transmission.

The result contains filters selected cars will show in a table on the main content with using the mtcars dataset from [R].

server calculations

library(shiny) library(datasets) library(dplyr) shinyServer(function(input, output) {
output\(table <- renderDataTable({ disp_seq <- seq(from = input\)disp[1], to = input\(disp[2], by = 0.1) hp_seq <- seq(from = input\)hp[1], to = input\(hp[2], by = 1) data <- transmute(mtcars, Car = rownames(mtcars), MilesPerGallon = mpg, GasolineExpenditure = input\)dis/mpg*input\(cost, Cylinders = cyl, Displacement = disp, Horsepower = hp, Transmission = am) data <- filter(data, GasolineExpenditure <= input\)gas, Cylinders %in% input\(cyl, Displacement %in% disp_seq, Horsepower %in% hp_seq, Transmission %in% input\)am)
data <- mutate(data, Transmission = ifelse(Transmission==0, "Automatic", "Manual"))
data <- arrange(data, GasolineExpenditure)
data
}, options = list(lengthMenu = c(5, 15, 30), pageLength = 30))
})

Github repository

Customer service

Any comments?,
please send it to Carlos