This repository has been archived by the owner on Nov 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
125 lines (114 loc) · 6.53 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
#mute warnings
options(warn=-1)
prv = data.frame(names(providers))
colnames(prv) = c('Providers')
navbarPage(HTML('<img src="logo.png"/>'), id="nav", collapsible = FALSE,
tabPanel(HTML('<b>Map</b>'), icon = icon("map-marked-alt"),
div(class="outer",
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "style.css"),
tags$link(rel = "stylesheet", type = "text/css", href = "typicons.css")
),
leafletOutput('map', width = "100%", height = "100%"),
absolutePanel(
draggable = TRUE,
class= "map-controls", left = 10, fixed = TRUE,
div(class="panelbar", HTML('<h4><span class="typcn typcn-image display-icon"></span>Display<span class="minimise"><i class="typcn typcn-arrow-minimise"></i></span></h4>')),
div(class="control-elements",
selectInput('sch', 'School', toTitleCase(tolower(sort(schdata@data$school_name))), toTitleCase(tolower(sort(schdata@data$school_name)[[1]]))),
hr(),
h5(strong('Isochrone'), style="color:white;"),
checkboxInput("isochrone", "Show isochrone", TRUE),
conditionalPanel(
condition = "input.isochrone == true",
div(
class = 'inner',
checkboxInput("isochronechart", "Include distribution chart", TRUE)
)
),
hr(),
h5(strong('Hansen Accessibility'), style="color:white;"),
checkboxInput("hansenduration", "Show duration accessibility", FALSE),
conditionalPanel(
condition = "input.hansenduration == true",
div(
class = 'inner',
checkboxInput("hansendurationpoints", "Include accessibility points", FALSE)
)
),
checkboxInput("hansendistance", "Show distance accessibility", FALSE),
conditionalPanel(
condition = "input.hansendistance == true",
div(
class = 'inner',
checkboxInput("hansendistancepoints", "Include accessibility points", FALSE)
)
),
hr(),
h5(strong('Residential'), style="color:white;"),
checkboxInput("kernel", "Show kernel density of HDB", FALSE),
checkboxInput("residential", "Show HDB points", FALSE),
hr(),
h5(strong('Misc'), style="color:white;"),
checkboxInput("legend", "Show legend", TRUE),
selectInput('maptype', 'Map Type', prv, 'CartoDB.DarkMatter')
)
),
conditionalPanel(
condition = "input.isochrone == true && input.isochronechart == true",
absolutePanel(class = "graph-output", right = 10, bottom = 10, width = 330, draggable = TRUE,
plotOutput('gg_graph', height = 300, width = 330)
)
),
tags$body(
tags$script(type = "text/javascript", src = "extend.js")
)
)
),
tabPanel(HTML('<b>Dataset</b>'), icon = icon("database"),
div( class='dataset-page container-fluid',
fluidRow(class='row',
div(class="col-md-6",
div(class="panel panel-info",
div(class="panel-heading",
h3(class="panel-title",
span(class='fa fa-map-marker-alt'),
'Location Information')
),
div(class="panel-body",
div(class="normal-inputs",
selectInput("selectTable", "Select Table",
c("Residential HDB information" = 1,
"School information" = 2 ) ,
selected = 1
)
),hr(),
div(class='table-outer',
DT::dataTableOutput("table", height = "100%")
)
)
)
),div(class="col-md-6",
div(class="panel panel-info",
div(class="panel-heading",
h3(class="panel-title",
span(class='fa fa-braille'),
'Accessibility Information')
),
div(class="panel-body",
div(class="normal-inputs",
selectInput("selectTableHansen", "Accessibility to:",
toTitleCase(tolower(sort(schdata@data$school_name))),
toTitleCase(tolower(sort(schdata@data$school_name)[[1]]))
)
),hr(),
div(class='table-outer',
DT::dataTableOutput("tablehansen", height = "100%")
)
)
)
)
)
)
)
)