-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
102 lines (98 loc) · 3.9 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
ui <- navbarPage(
theme = shinythemes::shinytheme("flatly"),
"EmoGeoScope: Understanding Emotions and Behaviors Under A Geospatial Lens",
tabPanel("Data Explorer", icon = shiny::icon("table"),
fluidPage(
sidebarLayout(
sidebarPanel(
h4("Uploading Data"),
p("Select and preview the files."),
tags$hr(),
textInput(
inputId = "uid",
label = "Participant's UID",
placeholder = "This participant's uid"),
fileInput(
inputId = "gps_csv",
label = "GPS",
multiple = FALSE,
accept = ".csv"
),
fileInput(
inputId = "base_csv",
label = "Daily Baseline",
multiple = FALSE,
accept = ".csv"
),
fileInput(
inputId = "ema_csv",
label = "Ecological Momentary Assessment",
multiple = FALSE,
accept = ".csv"
),
radioButtons(
inputId = "display",
label = "Display",
choices = c(Head = "head",
All = "all"),
selected = "head"
),
fileInput(
inputId = "addr_csv",
label = "Reported Addresses",
multiple = FALSE,
accept = ".csv"
)
),
mainPanel(tabsetPanel(
tabPanel("GPS",
tableOutput("gps_table") %>% withSpinner(type = 7)),
tabPanel("Baseline",
tableOutput("base_table") %>% withSpinner(type = 7)),
tabPanel("EMA",
tableOutput("ema_table") %>% withSpinner(type = 7)),
tabPanel("Addresses",
tableOutput("addr_table") %>% withSpinner(type = 7))
))
)
)),
navbarMenu("Visualization", icon = shiny::icon("map-location-dot"),
tabPanel("Map",
fluidPage(fluidRow(
column(
2,
h5("Selected Time Range:"),
div(strong("From: "), textOutput("from", inline = TRUE)),
div(strong("To: "), textOutput("to", inline = TRUE)),
br(),
helpText("Click and drag to zoom in (double click to zoom back out).")
),
column(
10,
dygraphOutput("dygraph", height = 200) %>% withSpinner(type = 7)
)
)),
hr(),
fluidPage(fluidRow(
column(
2,
h5(div(strong("Show alcohol density:"))),
actionButton("show", "Show", style='padding:4px; font-size:85%'),
actionButton("hide", "Hide", style='padding:4px; font-size:85%')
),
column(10,
leafletOutput("map", height = 700) %>% withSpinner(type = 7))
))),
tabPanel("Timeline",
plotlyOutput("plotly", height = 600) %>% withSpinner(type = 7),
)
),
tabPanel("ReadMe", icon = shiny::icon("readme"),
fluidPage(
tags$iframe(src = './readme.html',
width = '100%', height = '900px',
frameborder = 0, scrolling = 'auto'
)
)
)
)