/
ui.R
200 lines (197 loc) · 6.28 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
################################################################################
#
#
# This is a Shiny web application to support the implementation of health and
# nutrition coverage surveys in Liberia.
#
# This is the code for the user interface (UI) of the Shiny web application.
#
#
################################################################################
################################################################################
#
# UI for web application
#
################################################################################
## Define UI for application
ui <- dashboardPage(
skin = "red",
## Header
dashboardHeader(
title = "Liberia Coverage Surveys",
titleWidth = 300),
## Sidebar
dashboardSidebar(
width = 300,
sidebarSearchForm(
textId = "searchText",
buttonId = "searchButton"
),
## Sidebar menu
sidebarMenu(
id = "tabs",
menuItem(text = "Urban Montserrado",
tabName = "gm",
icon = icon(name = "pencil",
lib = "font-awesome",
class = "fa-lg")),
menuItem(text = "Grand Bassa",
tabName = "gb",
icon = icon(name = "tablet",
lib = "font-awesome",
class = "fa-lg"))
)
),
## Body
dashboardBody(
## Specify a custom.css
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "custom.css")
),
## Body outputs for every menu item on sidebar
tabItems(
## Body output when 'gm' menu is selected
tabItem(tabName = "gm",
fluidRow(
box(title = "Options",
status = "primary",
solidHeader = TRUE,
width = 4,
radioButtons(inputId = "round",
label = "Select round",
choices = c("Round 1" = "r1",
"Round 2" = "r2"),
selected = "r2"
),
selectInput(inputId = "varLabel",
label = "Select indicator",
choices = c("At least one ANC visit" = "ifa1",
"Know/heard about iron-folic acid" = "ifa2",
"Received/purchased iron-folic acid" = "ifa3",
"Consumed iron-folic acid" = "ifa4",
"Mean number of days of iron-folic acid consumption" = "ifa5",
"Consumed iron-folic acid for at least 90 days" = "ifa6",
"Consumed iron-folic acid for 180 days" = "ifa7"),
selected = "ifa1"
)
),
box(title = "Map",
status = "primary",
solidHeader = TRUE,
width = 8,
leafletOutput(outputId = "mapGM")
),
tabBox(id = "gm",
selected = "ifaGM",
title = "",
width = 12,
tabPanel(title = "IFA",
value = "ifaGM",
fluidRow(
box(title = "Overall estimates",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "ifaPlot")
),
box(title = "Reasons for non-coverage",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "ifaReasons")
)
)
),
tabPanel(title = "IYCF",
value = "iycfGM",
fluidRow(
box(title = "Overall estimates",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "icfPlot")
),
box(title = "Reasons for non-coverage",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "icfReasons")
)
)
),
tabPanel(title = "MNP",
value = "mnpGM",
fluidRow(
box(title = "Overall estimates",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "mnpPlot")
),
box(title = "Reasons for non-coverage",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "mnpReasons")
)
)
),
tabPanel(title = "Vitamin A",
value = "vitGM",
fluidRow(
box(title = "Overall estimates",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "vitPlot")
),
box(title = "Reasons for non-coverage",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "vitReasons")
)
)
),
tabPanel(title = "Nutrition Screening",
value = "screenGM",
fluidRow(
box(title = "Overall estimates",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "screenPlot")
)
)
),
tabPanel(title = "IMAM",
value = "cmamGM",
fluidRow(
box(title = "Overall estimates",
status = "warning",
solidHeader = TRUE,
plotlyOutput(outputId = "cmamPlot")
),
box(title = "Reasons for non-coverage",
status = "warning",
solidHeader = TRUE
)
)
),
tabPanel(title = "Stunting",
value = "stuntGM"
),
tabPanel(title = "Underweight",
value = "underweightGM"
),
tabPanel(title = "Wasting (WHZ)",
value = "whzGM"
),
tabPanel(title = "Wasting (MUAC)",
value = "muacGM"
),
tabPanel(title = "Oedema",
value = "oedemaGM"
)
)
)
),
## Body output when 'gb' menu is selected
tabItem(tabName = "gb",
fluidRow(
)
)
)
)
)