-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
67 lines (63 loc) · 2.17 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
# Sourcing global.R file ----
source("global.R")
# Define UI for dashboard ----
ui <- dashboard_page(
dashboardHeader(title = tags$b("Bike Collisions in London [2005 - 2019]"),
titleWidth = "wide",
color = "grey",
inverted = TRUE),
dashboardSidebar(size = "thin",
sidebarMenu(
menuItem(tabName = "home", text = "Home", icon = icon("home")),
menuItem(tabName = "data", text = "Data", icon = icon("table"))
)
),
dashboardBody(
# Tab: Home ----
tabItem(
tabName = "home",
# Input Box ----
box(
title = "Inputs", title_side = "top left", width = 16,
split_layout(cell_widths = c("25%, 25%, 25%, 25%"),
cell_args = "padding: 6px;",
style = "border: none;",
selectInput("borough", "Borough",
c("All", unique(collision_data$Borough))),
selectInput("severity", "Severity",
c("All", unique(collision_data$Severity))),
selectInput("ward", "Ward",
c("All", unique(collision_data$Ward))),
selectInput("type", "Casuality Type",
c("All", unique(collision_data$Casualties_Types))))
),
# Value Boxes ----
valueBoxOutput("slight_value_box"),
valueBoxOutput("serious_value_box"),
valueBoxOutput("fatal_value_box"),
# First plot - Bar chart ----
fluidRow(
echarts4rOutput("bar_plot")
),
# Second plot - Heat map ----
fluidRow(
echarts4rOutput("heat_map")
)
),
# Tab: Data ----
tabItem(
tabName = "data",
div(
downloadBttn("downloadData", "Download",
style = "simple",
color = "primary",
icon = icon("download"))
),
fluidRow(
reactableOutput("data_table")
)
),
# Disconnect message on disconnection on App ----
disconnectMessage()
)
)