This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathui.R
57 lines (48 loc) · 1.7 KB
/
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
rm(list=ls())
library(shiny)
library(plotly)
library(shinycssloaders) # withSpinner() calculation/rendering in progress
library(shinythemes)
options(shiny.maxRequestSize = 75*1024^2) # increase allowable filesize
# a more elegant solution than multiple br()
linebreaks <- function(n){HTML(strrep(br(), n))}
shinyUI(fluidPage(
theme = shinytheme("sandstone"),
# Application title
titlePanel("Label Anomalies"),
# tabset
tabsetPanel(
# data input tab
tabPanel(
"Read/Write Data",
fileInput("file1", "Choose CSV File",
accept = c(".csv")
),
checkboxInput("header", "Header", TRUE),
downloadButton("download_data", "Download Data")
),
# plotting tab
tabPanel(
"View/Label Data",
br(),
shinycssloaders::withSpinner(plotlyOutput('plotgroup')),
# use linebreak to adjust
linebreaks(22),
fluidRow(
column(3, offset=1,
h4("Data Removal Log Entry"),
selectInput('label_type', 'Label',
choices = c('Anomaly' = 'anomaly',
'Normal' = 'normal'),
selected = 'Anomaly'
),
actionButton("update_labels", "Update Labels"),
br()
),
column(6,
DT::dataTableOutput('removal_selected')
)
)
)
)
))