-
Notifications
You must be signed in to change notification settings - Fork 0
/
SLviz_ts.R
145 lines (133 loc) · 8.58 KB
/
SLviz_ts.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
time_series <- tabPanel(
"Time series",
titlePanel("Visualise editing as a time series"),
tabsetPanel(type = "tabs",
tabPanel("One Film",
fluidRow(style = "padding-top: 12px",
sidebarLayout(
column(4,
sidebarPanel(
width = 12,
# select data set
uiOutput("select_one_ts"),
# Horizontal line
tags$hr(style = "border-color: purple;"),
# select plot type
selectInput("one_ts_plot_type", "Select a visualisation:",
choices = c(Choose = '', "Counting process",
"Cut density",
"Multiple loess smoothers")),
# add action button
actionButton("runScript_one_ts", "Plot time series"),
# Horizontal line
tags$hr(style = "border-color: purple;"),
# download button
downloadButton("one_ts_plot_download", label = "Download plot as pdf file")
)
),
column(8,
mainPanel(
width = 12,
plotOutput("one_ts_plot") %>% withSpinner(color = "#008080")
)
)
)
)
),
tabPanel("Two films",
fluidRow(style = "padding-top: 12px",
sidebarLayout(
column(4,
sidebarPanel(
width = 12,
# select data set
uiOutput("select_two_ts"),
# Horizontal line
tags$hr(style = "border-color: purple;"),
# select plt type
selectInput("two_ts_plot_type", "Select a visualisation:",
choices = c(Choose = '', "Counting process",
"Cut density"
)
),
# add action button
actionButton("runScript_two_ts", "Plot time series"),
# Horizontal line
tags$hr(style = "border-color: purple;"),
downloadButton("two_ts_plot_download", label = "Download plot as pdf file")
)
),
column(8,
mainPanel(
width = 12,
plotOutput("two_ts_plot") %>% withSpinner(color = "#008080")
)
)
)
)
),
tabPanel("Three to six films",
fluidRow(style = "padding-top: 12px",
sidebarLayout(
column(4,
sidebarPanel(
width = 12,
# select data set
uiOutput("select_multi_ts"),
# Horizontal line
tags$hr(style = "border-color: purple;"),
# select plot type
selectInput("multi_ts_plot_type", "Select a visualisation:",
choices = c(Choose = '', "Counting process",
"Cut density"
)
),
# add action button
actionButton("runScript_multi_ts", "Plot time series"),
tags$hr(style = "border-color: purple;"),
downloadButton("multi_ts_plot_download", label = "Download plot as pdf file")
)
),
column(8,
mainPanel(
width = 12,
plotOutput("multi_ts_plot", width = "100%", height = "670px") %>% withSpinner(color = "#008080")
)
)
)
)
),
tabPanel("Two groups of films",
fluidRow(style = "padding-top: 12px",
sidebarLayout(
column(4,
sidebarPanel(
width = 12,
p("If group names are not provided, the default names are used."),
uiOutput("select_group_one_ts"),
textInput("group_one_name_ts", label = "Enter a name for group A", value = "Group A"),
tags$hr(style = "border-color: #008080"),
uiOutput("select_group_two_ts"),
textInput("group_two_name_ts", label = "Enter a name for group B", value = "Group B"),
tags$hr(style = "border-color: purple;"),
selectInput("group_ts_plot_type", "Select a visualisation:",
choices = c(Choose = '', "Counting process"
)
),
# add action button
actionButton("runScript_group_ts", "Plot time series"),
tags$hr(style = "border-color: purple;"),
downloadButton("group_ts_plot_download", label = "Download plot as pdf file")
)
),
column(8,
mainPanel(
width = 12,
plotOutput("group_ts_plot", width = "100%", height = "670px") %>% withSpinner(color = "#008080")
)
)
)
)
)
)
)