-
Notifications
You must be signed in to change notification settings - Fork 2
/
ui.R
42 lines (33 loc) · 1.25 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
# code for rendering the application
library(leaflet) # base for shiny map display
ui <- fluidPage(
# add the title to the top of the page
titlePanel("BART Passenger Heatmap"),
# the main portion of the app
fluidRow(
# the rendered map
column(width = 10,
leafletOutput("basemap", height = 1000)
),
# the buttons, all together in one centered column
column(width = 2, align = "center",
# selector for the desired date range
# minimums and maximums are determined from the input data
dateRangeInput("dateRange",
label = "Date Range (YYYY-MM-DD)",
start = minDate,
end = maxDate,
min = minDate,
max = maxDate),
# checkboxes for the desired times
# we use checkboxes so users can pick non-contiguous ranges
checkboxGroupInput("timeRange",
label = "Hours",
choiceNames = twelveHour,
choiceValues = seq(from = 0, to = 23, by = 1),
selected = seq(from = 0, to = 23, by = 1)),
# update button, attempts to update the map when pressed
actionButton("updateDatetime", label = "Update")
)
)
)