-
Notifications
You must be signed in to change notification settings - Fork 343
/
Copy pathui.R
74 lines (68 loc) · 3.66 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
if (!require("shiny")) {
install.packages("shiny")
library(shiny)
}
if (!require("shinyWidgets")) {
install.packages("shinyWidgets")
library(shinyWidgets)
}
if (!require("shinythemes")) {
install.packages("shinythemes")
library(shinythemes)
}
if (!require("leaflet")) {
install.packages("leaflet")
library(leaflet)
}
if (!require("leaflet.extras")) {
install.packages("leaflet.extras")
library(leaflet.extras)
}
# Define UI for application that draws a histogram
shinyUI(
navbarPage(strong("Citi Bike Study",style="color: white;"),
theme=shinytheme("cerulean"), # select your themes https://rstudio.github.io/shinythemes/
#------------------------------- tab panel - Maps ---------------------------------
tabPanel("Maps",
icon = icon("map-marker-alt"), #choose the icon for
div(class = 'outer',
# side by side plots
fluidRow(
splitLayout(cellWidths = c("50%", "50%"),
leafletOutput("left_map",width="100%",height=1200),
leafletOutput("right_map",width="100%",height=1200))),
#control panel on the left
absolutePanel(id = "control", class = "panel panel-default", fixed = TRUE, draggable = TRUE,
top = 200, left = 50, right = "auto", bottom = "auto", width = 250, height = "auto",
tags$h4('Citi Bike Activity Comparison'),
tags$br(),
tags$h5('Pre-covid(Left) Right(Right)'),
prettyRadioButtons(
inputId = "adjust_score",
label = "Score List:",
choices = c("start_cnt",
"end_cnt",
"day_diff_absolute",
"day_diff_percentage"),
inline = TRUE,
status = "danger",
fill = TRUE
),
awesomeRadio("adjust_time",
label="Time",
choices =c("Overall",
"Weekday",
"Weekend"),
selected = "Overall",
status = "warning"),
# selectInput('adjust_weather',
# label = 'Adjust for Weather',
# choices = c('Yes','No'),
# selected = 'Yes'
# ),
style = "opacity: 0.80"
), #Panel Control - Closing
) #Maps - Div closing
) #tabPanel maps closing
) #navbarPage closing
) #Shiny UI closing