-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.r
155 lines (100 loc) · 4.03 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
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
154
155
# ui.R
shinyUI(navbarPage(
title = "OWL: Optimal Warehouse Locator", theme = "css/ygtheme.css", id = "nav",
tabPanel(
title = "Analytic View",
div(
class = "main",
tags$head(
includeCSS("www/css/styles.css") # include the custom CSS
),
leafletOutput(outputId = "map", width = "100%", height = "100%"),
absolutePanel(
id = "pan", class = "panel panel-default", fixed = TRUE, draggable = TRUE,
top = 70, left = "auto", right = 40, bottom = "auto", width = 400, height = "auto",
HTML('<div align="center">'),
h4("Optimization Objective"),
HTML('</div>'),
HTML('<div align="left">'),
selectInput(inputId = "obj", label = "Minimize: ", choices = dobj[["nam"]]),
selectInput(inputId = "wgt", label = "Weighted By: ", choices = dwgt[["nam"]]),
selectInput(inputId = "pfx", label = "Prefixed On: ", choices = c("Prefixed On" = "", dsrc[["id"]]), multiple = TRUE),
numericInput(inputId = "kwh", label = "Toward #WH: ", value = 10L, min = 1L, max = 51L),
br(),
numericInput(inputId = "nas", label = "Advanced Option - # Random Start: ", value = 100L, min = 1L, max = 1000L),
HTML('</div>'),
HTML('<div align="right">'),
actionButton(inputId = "fnd", label = "Find Warehouse Locations"),
HTML('</div>'),
conditionalPanel(
condition = "input.fnd",
br(),
br(),
HTML('<div align="center">'),
h4("Optimal Warehouse Locations"),
HTML('</div>'),
HTML('<div align="left">'),
numericInput(inputId = "otk", label = "Optimality Rank: ", value = 1L, min = 1L, max = 1000L),
selectInput(inputId = "oms", label = "Map Color Measure: ", choices = dobj[["nam"]]),
HTML('</div>'),
HTML('<div align="right">'),
actionButton(inputId = "ovw", label = "View Warehouse Locations"),
HTML('</div>')
)
),
conditionalPanel(
condition = "input.fnd",
absolutePanel(
id = "cpan", class = "panel panel-default", fixed = TRUE, draggable = TRUE,
top = "auto", left = "auto", right = 540, bottom = 70, width = 200, height = "auto",
DT::dataTableOutput("tbk")
)
),
conditionalPanel(
condition = "input.fnd",
absolutePanel(
id = "cpan", class = "panel panel-default", fixed = TRUE, draggable = TRUE,
top = "auto", left = 40, right = "auto", bottom = 70, width = 200, height = "auto",
DT::dataTableOutput("cpan_tb")
)
),
tags$div(
id = "cite", tags$em('OWL: Optimal Warehouse Locator'), ' - a demonstration on the use case of ', tags$em('skm R package'), ' by ', tags$em('Guang Yang @gyang274.')
)
),
div(
class = "msgs", textOutput(outputId = "msgs")
)
),
tabPanel(
title = "Data Explorer",
fluidRow(
h4("Explore U.S. ZIP2012 Data: "),
column(
width = 4L,
selectInput(inputId = "pdeStt", label = "States: ", choices = c("All States" = "", dstt), multiple = TRUE)
),
conditionalPanel(
condition = "input.pdeStt",
column(
width = 4L,
selectInput(inputId = "pdeCit", label = "Cities: ", choices = c("All Cities" = ""), multiple = TRUE)
)
)
),
fluidRow(
column(
width = 2L, actionButton(inputId = "shw", label = "Show Table")
)
),
hr(),
DT::dataTableOutput("pdeDEV")
),
tabPanel(
title = "HOWTO", includeMarkdown("HOWTO.md")
),
tabPanel(
title = "README", includeMarkdown("README.md")
)
# , conditionalPanel("false", icon("crosshair"))
))