-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
51 lines (51 loc) · 1.89 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
ui <- bootstrapPage(
tags$head(tags$style(HTML(
'html, body {width:100%;height:100%; font-family:Consolas, "Ubuntu Mono", monospace;}',
"#dropdown-menu-controls {background-color:rgba(255,255,255,0.7) !important;padding:15px;border-radius:10px;}",
'div.info.legend.leaflet-control {margin-bottom:37px; font-family:Consolas, "Ubuntu Mono", monospace;}',
'.loading-spinner { position:absolute !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important; margin: 0px auto !important;}'
))),
addSpinner(leafletOutput("map", width = "100%", height = "100%")),
absolutePanel(
top = 20, right = 20,
dropdownButton(
titlePanel("COVID-19 Community Mobility Reports"),
inputId = "controls",
tooltip = tooltipOptions(placement = "left", title = "Controls"),
right = T, circle = T, icon = icon("gear"),
sliderInput(
"dat", "Select Date",
min = min(dat$date), max = max(dat$date), value = max(dat$date),
animate = animationOptions(interval = 1250)
),
selectInput(
"cat", "Select Category",
choices = unique(dat$category), selected = "Retail And Recreation"
),
helpText(
"See ", a(
href = "https://www.google.com/covid19/mobility/data_documentation.html",
"data documentation",
target="_blank"
),
" for category definitions. Note: Location accuracy and the understanding",
" of categorized places varies from region to region."
),
selectInput(
"pal", "Choose Palette",
choices = rownames(subset(brewer.pal.info, category == "div")), selected = "PiYG"
)
)
),
absolutePanel(
top = 20, right = 80,
circleButton(
inputId = "about", icon = icon("question"),
onclick ="window.open('https://www.oliverfritz.de/portfolio/covid-19-community-mobility/', '_blank')"
)
),
absolutePanel(
bottom = 10, right = 15,
materialSwitch(inputId = "leg", label = "Legend", width = 120)
)
)