-
Notifications
You must be signed in to change notification settings - Fork 0
/
shinyapp.R
155 lines (147 loc) · 7.11 KB
/
shinyapp.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
source("global.R")
#### UI #####
ui <- dashboardPagePlus(skin = "yellow", md = FALSE,
dashboardHeaderPlus(
fixed = TRUE,
title = tagList(
span(class = "logo-lg", "Causal Sim")),
enable_rightsidebar = TRUE,
rightSidebarIcon = "microscope",
left_menu = tagList(
dropdownBlock(
id = "select_num_samples",
title = "Number of Samples",
icon = "sliders",
badgeStatus = "warning",
sliderInput(
inputId = "n_sim_samples",
label = "Number of observations",
min = 50,
max = 1000,
value = 100
)
),
dropdownBlock(
id = "select_plotting",
title = "Plotting",
icon = "chart-bar",
badgeStatus = "warning",
prettyRadioButtons(
inputId = "plotting_library",
label = "Plotting Library",
thick = TRUE,
choices = c("Plotly", "Bokeh"),
animation = "pulse"
)
),
dropdownBlock(
id = "upload_file",
title = "Attach Data",
icon = "file-upload",
badgeStatus = "warning",
fileInput("file1", "Choose CSV File",
multiple = TRUE,
accept = c("text/csv",
"text/comma-separated-values,text/plain",
".csv")),
# Horizontal line ----
tags$hr(),
prettyRadioButtons(
inputId = "header",
label = "Header",
thick = TRUE,
choices = c("True", "False"),
animation = "pulse"
)
)
),
dropdownMenu(
type = "notifications",
icon = icon("question-circle"),
badgeStatus = NULL,
headerText = "Causal Sim (by Metonymize)",
messageItem("", "A tool to do blah, blah. Find out more at ... ", icon=icon("info"))
)
),
dashboardSidebar(
sidebarMenu(
id="my_left_tabs",
menuItem(
text = "Causal Simulate",
tabName = "sim",
icon = icon("dice-two")
),
menuItem(
text = "Causal Query",
tabName = "query",
icon = icon("question")
),
menuItem(
text = "View Data",
tabName = "data",
icon = icon("database")
)
)
),
rightsidebar = rightSidebar(
background = "dark",
rightSidebarTabContent(
id = 1,
title = "Not Implemented",
icon = "project-diagram",
active = TRUE#,
#sliderInput(
# inputId = "inputsidebar1",
# label = "Number of observations:",
# min = 0,
# max = 1000,
# value = 500
#)
),
rightSidebarTabContent(
id = 2,
icon = "paint-brush",
title = "Not Implemented"#,
#numericInput(
# inputId = "inputsidebar3",
# label = "Observations:",
# value = 10,
# min = 1,
# max = 100
# )
)
),
dashboardBody(
tags$head(
tags$style(HTML(".main-sidebar { font-size: 16px; }"),
HTML(".sidebar-menu li { margin-bottom: 10px; }"))
),
# use a bit of shinyEffects
setShadow(class = "dropdown-menu"),
setShadow(class = "box"),
shiny::tags$head(
shiny::tags$style(
rel = "stylesheet",
type = "text/css",
href = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/qtcreator_dark.min.css"
),
shiny::tags$script(
src = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"
)
),
# All tabs
tabItems(
simulate_tab,
query_tab,
data_tab
# buttons_tab,
# box_elements_tab,
# extra_elements_tab
)
),
title = "shinyDashboardPlus",
footer = dashboardFooter(
left_text = "Metonymize, Inc",
right_text = "© 2019"
)
)