---
title: "Iris Dashboard"
output:
flexdashboard::flex_dashboard:
orientation: rows
vertical_layout: fill
source_code: embed
self_contained: true
social: menu
---
```{r setup, include=FALSE}
library(flexdashboard)
library(tidyverse)
```
Iris {data-width=650}
-----------------------------------------------------------------------
# Dataset
### Dataset Preview
```{r}
head(iris)
```
### Number of Species
```{r}
valueBox(
length(unique(iris$Species)),
"Number of Species"
)
```
### Number of Sample
```{r}
valueBox(
nrow(iris),
"Total Flower Samples"
)
```
Length Comparison {data-width=350}
-----------------------------------------------------------------------
# Species Comparison
## Length Comparison
### Sepal Length
```{r}
ggplot(iris, aes(x = Species, y = Sepal.Length)) +
geom_boxplot() +
labs(
title = "Sepal Length by Species",
x = "Species",
y = "Sepal Length (cm)"
)
```
### Petal Length
```{r}
ggplot(iris, aes(x = Species, y = Petal.Length)) +
geom_boxplot() +
labs(
title = "Petal Length by Species",
x = "Species",
y = "Petal Length (cm)"
)
```
## Width Comparison
### Sepal Width
```{r}
ggplot(iris, aes(x = Species, y = Sepal.Width)) +
geom_boxplot() +
labs(
title = "Sepal Width by Species",
x = "Species",
y = "Sepal Width (cm)"
)
```
### Petal Width
```{r}
ggplot(iris, aes(x = Species, y = Petal.Width)) +
geom_boxplot() +
labs(
title = "Petal Width by Species",
x = "Species",
y = "Petal Width (cm)"
)
```