-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui_map.R
69 lines (64 loc) · 2.46 KB
/
ui_map.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
# #--------------------------------------------------------------------------#
# # UI for Map Page #
# #--------------------------------------------------------------------------#
# # Version | Name | Remarks #
# #--------------------------------------------------------------------------#
# # 1.0 | Paddy | Initial Version #
# #--------------------------------------------------------------------------#
library (shinyWidgets)
ui <- fluidPage(
style = "background-color: #33b07a" ,
titlePanel(tags$h1("Map")),
sidebarLayout(
sidebarPanel(width = 3,
#Input the Topic
fluidRow(
selectInput("map_topic_input",
"Select Topic",
choices = c("Life Expectancy", "Drug Abuse","Smoking")
)),
fluidRow(
selectInput("map_area_input",
"Select Data Zones",
choices = c("NHS Health Board", "Local Authority")
)),
fluidRow(
selectInput("map_breakdown_input",
"Select Breakdown:",
choices = c("None", "Age", "Gender")
)),
fluidRow(
selectInput("map_group_input",
"Select Group:",
choices = NULL
)),
fluidRow(HTML("
<p style='text-align:justify; color:black; font-weight:bolder'>Summary Statistics for Current View:</p>
")),
fluidRow(style = "color:black",
tableOutput("map_stats")
),
fluidRow(style = "color:black",
textOutput("map_units")
),
fluidRow(tags$br()),
fluidRow(HTML("
<p style='text-align:justify; color:black'>Data shown reflects the latest available data only.</p>
<p style='text-align:justify; color:black'>Life Expectancy: 2017-2019</p>
<p style='text-align:justify; color:black'>Drug Abuse: 2017/18</p>
<p style='text-align:justify; color:black'>Smoking: 2019</p>
")),
fluidRow(tags$br())
),
mainPanel(width = 9,
#Content to display the map
fluidRow(
leafletOutput("my_map", height = 620)
),
#Content to display the table
fluidRow(style = "padding-top: 2%",
dataTableOutput("map_table")
)
)
)
)