-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathui.R
90 lines (74 loc) · 4.55 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
library(leaflet)
library(shiny)
navbarPage("Warehouse Determination", id="nav",
tabPanel("Interactive map",
div(class="outer",
tags$head(
# Include our custom CSS
includeCSS("styles.css"),
includeScript("google-analytics.js"),
includeScript("gomap.js"),
includeScript("toggle_script.js")
),
# If not using custom CSS, set height of leafletOutput to a number instead of percent
leafletOutput("map", width="100%", height="100%"),
absolutePanel(id = "toggle_bt", class = "panel panel-default mobileShow", fixed = TRUE,
draggable = TRUE, top =100, left = 120, right = "auto", bottom = "auto",
width = 120, height = "auto",
includeHTML('html_button.html')
),
# Shiny versions prior to 0.11 should use class = "modal" instead.
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = 160, left = 20, right = "auto", bottom = "auto",
width = 330, height = "auto",
h4("Find Best Warehousing Locations"),
radioButtons("sample_or_own","I Want to use sample data.",
choices = c("Yes","No"),
selected = "No",
inline=T),
conditionalPanel("input.sample_or_own == 'No'",
h4("Download "),
downloadButton("downloadData", "Download the File Template"),
fileInput("file1", "Choose CSV File",
accept = c(
"text/csv",
"text/comma-separated-values,text/plain",
".csv")
)),
tags$hr(),
sliderInput(inputId = "no_of_wh",label = "No of Warehouse",value=4,min = 1,max=10),
numericInput("seed","Seed for K-Means",100,min=0,max=101),
actionButton("run_cluster","Run Clustering"),
tags$hr(),
actionButton("find_cog","Find COG Locations")
)
)
)
# tabPanel("Data explorer",
# fluidRow(
# column(3,
# selectInput("states", "States", c("All states"="", structure(state.abb, names=state.name), "Washington, DC"="DC"), multiple=TRUE)
# ),
# column(3,
# conditionalPanel("input.states",
# selectInput("cities", "Cities", c("All cities"=""), multiple=TRUE)
# )
# ),
# column(3,
# conditionalPanel("input.states",
# selectInput("zipcodes", "Zipcodes", c("All zipcodes"=""), multiple=TRUE)
# )
# )
# ),
# fluidRow(
# column(1,
# numericInput("minScore", "Min score", min=0, max=100, value=0)
# ),
# column(1,
# numericInput("maxScore", "Max score", min=0, max=100, value=100)
# )
# ),
# hr(),
# DT::dataTableOutput("ziptable")
# ),
)