-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp_UI.r
101 lines (99 loc) · 3.1 KB
/
app_UI.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
saveGraphUI <- function(name, TYPE) {
ns <- NS(name)
tagList(
fixedRow(
column(3, downloadButton(outputId = ns("downloadGRAPH"), label = TYPE) ),
column(3, numericInput(inputId = ns("WIDTH"),
label = "Download Width (In)",
value = 16, width = "90%" )
),
column(4, numericInput(inputId = ns("HEIGHT"),
label = "Download Height (In)",
value = 9, width = "90%" )
)
)
)
}
ui <- function(request) {fluidPage(
uiOutput('Title'),
sidebarLayout(
sidebarPanel(
selectInput(inputId = "dataSel", label = "Data to Load", selectize = FALSE,
choices = setNames(FILES, gsub("_", ":", gsub(".csv.bz2", "", FILES))), selected = DATA$Default
),
actionButton(inputId = "dataSelLOAD", label = "Load Selected Data"),
if (VIEW$UPLOAD) fileInput(inputId = "dataInput",
label = "CSV Data to Import",
accept = c(".csv", ".csv.bz2", ".csv.gz", ".csv.xz"),
placeholder = "No File Selected"
),
# bookmarkButton(),
checkboxGroupInput(inputId = "tabCOLS", label = "Statistics to show:",
choices = names(stats(Inf)),
selected = c("Mean", "Median"),
),
checkboxGroupInput(inputId = "tabROWS", label = "Parts to show:",
choices = NULL, selected = NULL,
),
width = 3
),
mainPanel(
fluidRow(
column(8, verticalLayout(
tableOutput("timeTable"),
) ),
column(4, verticalLayout(
if (is.character(VIEW$YTlink)) actionButton('tutorial', "Show YouTube Tutorial"),
if (is.character(VIEW$YTlist)) a("YouTube Playlists", href = VIEW$YTlist, target = "_blank"),
a("GitHub Repo", href = "https://github.com/GuestJim/TBOG_Data", target = "_blank")
) ),
),
tabsetPanel(
tabPanel("Table",
downloadButton(outputId = "downloadTable", label = "Download Table (CSV)"),
tableOutput("summaryTable"),
),
tabPanel("Single Part",
tabsetPanel(
tabPanel("Graph",
plotOutput("graphPART", height = 480),
saveGraphUI('PART', "Histogram (PNG)"),
plotOutput("graphCOURSE", height = 480,
brush = brushOpts(id = "COURSEbrush", resetOnNew = TRUE, direction = "x")),
strong("Click and Drag to Zoom Below"),
plotOutput("brushCOURSEzoom", height = 480),
tableOutput('brushCOURSEtable'),
),
tabPanel("Threshold",
plotOutput("aboveCOURSE", height = 480),
fluidRow(
column(3, numericInput('aboveTHRS', "Heart Rate Threshold", value = 100, min = 0, max = 150, step = 1)),
column(6, tableOutput('aboveTABL')),
),
),
type = "pills",
header = tagList(
fluidRow(
column(5, selectInput(inputId = "plotsSel", label = "Selected Part:", choices = NULL ) ),
column(7, tableOutput("statsPART") ),
),
helpText("If graphs are blank after loading data, select a different part and return to force an update"),
),
),
),
tabPanel("Multiple Parts",
tabsetPanel(
tabPanel("Faceted Graph",
saveGraphUI('FACET', "Faceted Graph (PNG)"),
plotOutput("graphFACET", height = 480),
),
id = "graphs",
type = "pills"
)
)
),
width = 9
),
)
)
}