-
Notifications
You must be signed in to change notification settings - Fork 16
/
ui.R
83 lines (70 loc) · 1.74 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
###############################################################################
# UI Access for Dashboard
#
# Author: Vivek Katial
# Created 2019-01-30 20:32:15
###############################################################################
ui = shiny::htmlTemplate(
# Index Page
"www/index.html",
# Number of trips
number_of_trips = textOutput(
"num_trips",
inline = T
),
# Number of hours
num_hours_text = textOutput(
"num_hours",
inline = T
),
# Longest Trip
longest_trip_time = textOutput(
"longest_trip_time_text",
inline = T
),
# Number of Kms
num_distance_text = textOutput(
"num_distance",
inline = T
),
longest_trip_distance = textOutput(
"longest_trip_distance_text",
inline = T
),
# Expensive Trip
num_dollars_spent = textOutput(
"num_distance",
inline = T
),
expensive_trip = textOutput(
"most_expensive_trip_text",
inline = T
),
# City Selector
city_selector = selectInput(
"city",
label = "Select City",
choices = d_clean$city %>%
unique(),
selected = "Auckland"
),
# Selector for Time
time_selector = material_card(
title = "",
sliderInput(
"time",
"Date",
min(d_routes$request_time) %>% as.Date(),
max(d_routes$request_time) %>% as.Date(),
value = max(d_routes$request_time) %>% as.Date(),
step = 30,
animate = animationOptions(
playButton = HTML("<img src='images/icons/play-button.png' height='20' width='20'>"),
pauseButton = HTML("<img src='images/icons/pause-button.png' height='20' width='20'>")
)
)
),
# Leaflet map
leaflet_map = leafletOutput(outputId = "map") %>%
withSpinner(color="#0dc5c1")
)