-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
123 lines (118 loc) · 3.03 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
library(shiny)
library(semantic.dashboard)
library(DT)
library(leaflet)
library(plotly)
data_loading <- function() {
ships <<- readRDS("ships_calculated.Rds")
choices_table <<- ships %>% dplyr::select(ship_type, SHIP_ID)
}
data_loading()
ui <- dashboardPage(
dashboardHeader(disable = TRUE),
dashboardSidebar(disable = TRUE, collapsed = TRUE, sidebarMenu()),
dashboardBody(tabItems(
selected = 1,
tabItem(
tabName = "main",
fluidRow(
box(
width = 8,
color = "blue",
ribbon = TRUE,
column(
width = 8,
img(
src = 'https://i.ibb.co/fYdDP5k/1.png',
width = "100%",
height = "50%"
)
)
),
box(
width = 8,
color = "blue",
ribbon = TRUE,
column(
width = 8,
selectInput(
inputId = "type",
label = "Select a vessel type",
choices = unique(choices_table$ship_type),
selected = c("Cargo"),
multiple = FALSE,
selectize = TRUE,
width = NULL,
size = NULL
),
selectInput(
inputId = "vessel",
label = "Select a vessel",
choices = unique(choices_table$SHIP_ID),
selected = c("3615"),
multiple = FALSE,
selectize = TRUE,
width = NULL,
size = NULL
)
)
)
),
fluidRow(
box(
width = 8,
title = "Longest distance - time",
color = "blue",
ribbon = TRUE,
title_side = "top right",
column(width = 8, textOutput("dates"))
),
box(
width = 8,
title = "Longest distance - distance",
color = "blue",
ribbon = TRUE,
title_side = "top right",
column(width = 8, textOutput("distance"))
)
),
fluidRow(
box(
width = 8,
title = "Longest distance - map",
color = "blue",
ribbon = TRUE,
title_side = "top right",
column(width = 8, leafletOutput("map"))
),
box(
width = 8,
title = "Longest distance map (all vessels)",
color = "blue",
ribbon = TRUE,
title_side = "top right",
column(width = 8, leafletOutput("map_all"))
)
),
fluidRow(
box(
width = 8,
title = "Top vessels (according to max. distance)",
color = "blue",
ribbon = TRUE,
title_side = "top right",
column(width = 8, plotlyOutput("top_vessels"))
),
box(
width = 8,
title = "Average max. distance per vessel type",
color = "blue",
ribbon = TRUE,
title_side = "top right",
column(width = 8, plotlyOutput("top_types"))
)
)
)
)),
theme = "solar"
)