---
title: "Friction Stir Weld: Virtual Screen"
output:
flexdashboard::flex_dashboard:
orientation: rows
theme: lumen
source_code: embed
---
```{r setup, include=FALSE}
library(flexdashboard)
library(crosstalk)
library(dplyr)
library(plotly)
library(DT)
library(ggplot2)
setwd("~/pmd/nldpTest")
results <- read.csv(file = 'vscreen1results.csv')
my_colnames <- colnames(results)
minvals <- read.csv(file = 'pminPlots.csv')
maxvals <- read.csv(file = 'pmaxPlots.csv')
maxpropspaceset <- read.csv(file = 'maxpropspaceset.csv')
sd <- SharedData$new(results)
```
Inputs {.sidebar}
-----------------------------------------------------------------------
```{r}
filter_slider("sl1", my_colnames[1], sd, my_colnames[1], round = 1)
filter_slider("sl2", my_colnames[2], sd, my_colnames[2], round = TRUE)
filter_slider("sl3", my_colnames[3], sd, my_colnames[3], round = TRUE)
filter_slider("sl4", my_colnames[4], sd, my_colnames[4], round = 1)
filter_slider("sl5", my_colnames[5], sd, my_colnames[5], round = TRUE)
```
Row {data-height=200}
-------------------------------------
### Plot
```{r}
fig <- plot_ly(sd, x = ~get(my_colnames[1]), y = ~get(my_colnames[6]), type = 'scatter', mode = 'markers')
fig <- fig %>% layout(xaxis = list(title = paste(my_colnames[1]), range = list(as.numeric(minvals[1]), as.numeric(maxvals[1]))), yaxis = list(title = paste(my_colnames[6])))
fig
```
### Plot
```{r}
fig <- plot_ly(sd, x = ~get(my_colnames[2]), y = ~get(my_colnames[6]), type = 'scatter', mode = 'markers')
fig <- fig %>% layout(xaxis = list(title = paste(my_colnames[2]), range = list(as.numeric(minvals[2]), as.numeric(maxvals[2]))), yaxis = list(title = paste(my_colnames[6])))
fig
```
Row {data-height=200}
-------------------------------------
### Plot
```{r}
fig <- plot_ly(sd, x = ~get(my_colnames[3]), y = ~get(my_colnames[6]), type = 'scatter', mode = 'markers')
fig <- fig %>% layout(xaxis = list(title = paste(my_colnames[3]), range = list(as.numeric(minvals[3]), as.numeric(maxvals[3]))), yaxis = list(title = paste(my_colnames[6])))
fig
```
### Plot
```{r}
fig <- plot_ly(sd, x = ~get(my_colnames[4]), y = ~get(my_colnames[6]), type = 'scatter', mode = 'markers')
fig <- fig %>% layout(xaxis = list(title = paste(my_colnames[4]), range = list(as.numeric(minvals[4]), as.numeric(maxvals[4]))), yaxis = list(title = paste(my_colnames[6])))
fig
```
Row {data-height=200}
-------------------------------------
### Plot
```{r}
fig <- plot_ly(sd, x = ~get(my_colnames[5]), y = ~get(my_colnames[6]), type = 'scatter', mode = 'markers')
fig <- fig %>% layout(xaxis = list(title = paste(my_colnames[5]), range = list(as.numeric(minvals[5]), as.numeric(maxvals[5]))), yaxis = list(title = paste(my_colnames[6])))
fig
```
Row {data-height=175}
-------------------------------------
### Table
```{r}
library(DT)
datatable(maxpropspaceset, extensions="Scroller", style="bootstrap", class="compact",
width="100%", rownames=NULL,
options=list(
deferRender=TRUE, scrollY=300, scroller=FALSE, paging=FALSE,
columnDefs = list(list(className = 'dt-right', targets=c(0)))
)
)
```