Analysis of mtcars data

Leykun Getaneh

2/20/2022

Reproducible Pitch

In this project, I prepared a shiny application and the link is :

https://likuta.shinyapps.io/developing_data_products_week_4_assignment/?_ga=2.263236559.276545136.1645386714-1215946911.1645386714

And also, the codes of ui.R and server.R are on the link:

https://github.com/leykunget/Developing-Data-Products-Week-4-Course-Project-

Overview of mtcars Dataset

Motor Trend Car Road Tests

head(mtcars, 4)
##                 mpg cyl disp  hp drat    wt  qsec vs am gear carb
## Mazda RX4      21.0   6  160 110 3.90 2.620 16.46  0  1    4    4
## Mazda RX4 Wag  21.0   6  160 110 3.90 2.875 17.02  0  1    4    4
## Datsun 710     22.8   4  108  93 3.85 2.320 18.61  1  1    4    1
## Hornet 4 Drive 21.4   6  258 110 3.08 3.215 19.44  1  0    3    1

UI code

library(shiny)

shinyUI(
navbarPage("Developing Data Products Week 4 Assignment",
  tabPanel("Simple Regression Analysis",
  (fluidPage(
    titlePanel("Estimate Miles per Gallon (mpg) with Simple Regression Models (SRM)"),
    sidebarLayout(
     sidebarPanel(
        selectInput("variable", "Select Independent variables for SRM",
                c('cyl', 'disp', 'hp', 'drat','wt', 'qsec', 'vs', 'am', 'gear', 'carb')),
        checkboxInput("simple_model","show the model", value=FALSE),
        submitButton("Submit")
                                    
    ), # ...
    

Server Code

library(shiny)
library(ggplot2)
library(olsrr)
data(mtcars)

mtcars$cyl <- factor(mtcars$cyl)
mtcars$vs <- factor(mtcars$vs)
mtcars$gear <- factor(mtcars$gear)
mtcars$carb <- factor(mtcars$carb)
mtcars$am <- factor(mtcars$am,labels=c("Automatic","Manual"))

#...