Page 1: Interactive Data Visualization

Row

Car Miles per gallon Analysis

Miles Per Gallon

Total number of cars

32

3 gears

15

4 gears

12

5 gears

5

6 cylinders

7

Row

Failures By State

Failures By State

Row

Failures By State

Failures By State

---
title: "Nasir Try to Present"
output: 
  flexdashboard::flex_dashboard:
    navbar:
       - { title: "About", href: "http://myinference.tk", align: left }
    orientation: rows
    vertical_layout: fill
    social: [ "twitter", "facebook", "menu"]
    source_code: embed
---

```{r setup, include=FALSE}
library(flexdashboard)
library(knitr)
library(DT)
library(rpivotTable)
library(ggplot2)
library(plotly)
library(dplyr)
library(openintro)
library(highcharter)
library(ggvis)
```

```{r}
data(mtcars)
```

```{r}
mycolors <- c("blue", "#FFC125", "darkgreen", "darkorange")
```


Page 1: Interactive Data Visualization
=====================================

Row
-------------------------------------

### Car Miles per gallon Analysis

```{r}
valueBox(paste("Miles Per Gallon"),
         color = "warning")
```

### Total number of cars

```{r}
valueBox(length(mtcars$mpg),
         icon = "fa-user")
```


### 3 gears

```{r}
valueBox(sum( mtcars$gear== 3),
         icon = 'fa-app-store')
```

### 4 gears

```{r}
valueBox(sum( mtcars$gear== 4),
         icon = 'fa-bus-school')
```

### 5 gears

```{r}
valueBox(sum( mtcars$gear== 5),
         icon = 'fa-archway')
```

### 6 cylinders

```{r}
valueBox(sum(mtcars$cyl == 6),
         icon = 'fa-building')
```

Row
-------------------------------

### Failures By State

```{r}
p1 <- mtcars %>%
         group_by(cyl) %>%
         summarise(count = n()) %>%
         plot_ly(x = ~cyl,
                 y = ~count,
                 color = "blue",
                 type = 'bar') %>%
layout(xaxis = list(title = "Failures By State"),
yaxis = list(title = 'Count'))
p1
```


### Failures By State

```{r}
p1 <- mtcars %>%
         group_by(cyl) %>%
         summarise(count = n()) %>%
         plot_ly(x = ~cyl,
                 y = ~count,
                 color = "blue",
                 type = 'bar') %>%
layout(xaxis = list(title = "Failures By State"),
yaxis = list(title = 'Count'))
p1
```

Row
-------------------------------

### Failures By State

```{r}
p1 <- mtcars %>%
         group_by(cyl) %>%
         summarise(count = n()) %>%
         plot_ly(x = ~cyl,
                 y = ~count,
                 color = "blue",
                 type = 'bar') %>%
layout(xaxis = list(title = "Failures By State"),
yaxis = list(title = 'Count'))
p1
```

### Failures By State

```{r}
p1 <- mtcars %>%
         group_by(cyl) %>%
         summarise(count = n()) %>%
         plot_ly(x = ~cyl,
                 y = ~count,
                 color = "blue",
                 type = 'bar') %>%
layout(xaxis = list(title = "Failures By State"),
yaxis = list(title = 'Count'))
p1
```