-
Notifications
You must be signed in to change notification settings - Fork 16
/
ui.R
executable file
·453 lines (396 loc) · 32.6 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
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
library(shiny)
#models <- list("Geometric"="GM", "Jelinski-Moranda"="JM", "Goel-okumoto"="GO","Delayed-S"="DSS", "Weibull"="Wei","Example New Model"='ZZZZ')
#source("custom_functions.R")
#tags$head(includeScript("analytics/google-analytics.js"))
tags$head()
shinyUI(navbarPage("Software Reliability Assessment in R",
tabPanel("Select, Analyze, and Filter Data",
sidebarLayout(
sidebarPanel(h4("Select, Analyze, and Subset Failure Data"),
fluidRow(
column(10,
h5("Specify the input file format"),
radioButtons("type", label = "",
choices = list('Excel (.xlsx)' = 1, " CSV (.csv)" = 2), inline = TRUE, selected = 1)
)
),
fluidRow(
column(8, fileInput("file", label = h5("Select a failure data file"),
accept=c('text/csv','text/comma-separated-values,text/plain','Excel Spreadsheet','.csv','.xlsx')))
),
fluidRow(
column(10,
uiOutput("sheetChoice")
)
),
fluidRow(
column(11,
h5("Choose a view of the failure data."),
selectInput("dataPlotChoice", label = "",
choices = list("Times Between Failures" = "IF", "Cumulative Failures" = "CF",
"Failure Intensity" = "FI"), selected = "CF")
)
),
fluidRow(
column(11,
radioButtons("DataPlotType", label = h6("Draw the plot with data points and lines, points only, or lines only?"),
choices = list("Both" = "points_and_lines", "Points" = "points", "Lines" = "lines"),
inline=TRUE,
selected = "points_and_lines")
)
),
fluidRow(
column(10,
radioButtons("PlotDataOrTrend", label = h6("Plot Data or Trend Test?"),
choices = list("Data" = 1, "Trend test" = 2), inline = TRUE,
selected = 1)
)
),
fluidRow(
column(11,
h5("Does data show reliability growth?"),
selectInput("trendPlotChoice", label = "",
choices = list("Laplace Test" = "LP", "Running Arithmetic Average" = "RA"))
),
column(11,
conditionalPanel(
condition = "input.trendPlotChoice == 'LP'",
numericInput("confidenceLP",
label = h6("Specify the confidence level for the Laplace Test"),
min = 0, max=1, value = 0.9, step=0.01)
)
),
column(8, textOutput("trendMessage"))
),
fluidRow(
column(12,
radioButtons("saveDataFileType", label = h6("Choose the type of file to save plots. Tables are saved as CSV files."),
choices = list("JPEG" = "JPG", "PDF" = "PDF", "PNG" = "PNG", "TIFF" = "TIFF"), inline = TRUE,
selected = "JPG")
),
column(8, downloadButton('saveDataOrTrend', 'Save Display'))
),
fluidRow(
column(8,
uiOutput("message")
)
),
fluidRow(
br(),
column(9, h5("Subset the failure data by data range")),
# column(9,
# sliderInput("sliderDataSubsetChoice", h6("Select one or more failure categories to retain"),
# min = 1, max = 5, value = c(1, 5), step = 1)),
column(9,
sliderInput("modelDataRange", h6("Specify the data range to which models will be applied."),
min = 1, max = 5, value = c(1, 5), step = 1))
)
),
mainPanel(
tabsetPanel(
tabPanel("Plot", textOutput("InputFileError"), textOutput("DataSubsetError"), plotOutput("DataAndTrendPlot",width="100%",height="50%",dblclick="DTPdblclick", brush=brushOpts(id="DTP_brush", resetOnNew=TRUE))),
tabPanel("Data and Trend Test Table", DT::dataTableOutput("dataAndTrendTable")),
id="DataPlotAndTableTabset")
)
)
),
tabPanel("Set Up and Apply Models",
sidebarLayout(
sidebarPanel(h4("Configure and Apply Models"),
h5("Specify the number of failures for which the models will make predictions"),
fluidRow(
# column(12,
# uiOutput("ParameterInterval")
# ),
column(12,
numericInput("modelNumPredSteps",
label = h6("Specify for how many failures into the future the models will predict"),
min = 1, value = 1)
),
column(12,
selectInput(
"modelsToRun", label = h6("Choose one or more models to run, or exclude one or more models."),
choices=list("Open a data set to run models"="None"),
multiple=TRUE, selected="None"
)
)
),
fluidRow(
column(12,
actionButton("runModels", label = "Run Selected Models")
)
),
fluidRow(
br(),
h4("Display Model Results")
),
fluidRow(
column(12,
#<<<<<<< HEAD
selectInput(
"modelResultChoice", label = h6("Choose one or more sets of model results to display."),
choices=list("No model results to display"="None"),
multiple=TRUE, selected="None"
)
#=======
# br(),
# h5("Choose the model results to display."),
# selectInput("modelResultChoice", label = h6("Choose one or more sets of model results"),
# choices= models,
# multiple=TRUE
# )
##>>>>>>> lfiondella/master
)
),
fluidRow(
#column(12,
# h5("Choose the type of plot for model results."),
# selectInput("modelPlotChoice", label = h6("Choose a plot type"),
# choices = list("Times Between Failures" = "MTTF", "Cumulative Failures" = "MVF",
# "Failure Intensity" = "FI", "Reliability" = "R","Reliability Growth"="R_growth"), selected = "MVF")
#),
column(12,
h5("Choose the type of plot for model results."),
selectInput("modelPlotChoice", label = h6("Choose a plot type"),
choices = list("Times Between Failures" = "MTTF", "Cumulative Failures" = "MVF",
"Failure Intensity" = "FI", "Reliability Growth"="R_growth"), selected = "MVF")
),
column(12,
conditionalPanel(
condition = "input.modelPlotChoice == 'R_growth'",
numericInput("modelRelMissionTime",
label = h6("Specify the length of the interval for which reliability will be computed"),
min = 0, value = 1)
# numericInput("modelTargetReliability",
# label=h6("Specify the reliability to be achieved"),
# min=0, max=1, step=0.01, value=0.9)
)
),
column(12,
numericInput("modelCurveAdditionalTime",
label=h6("Enter the duration for which the model results curves should extend beyond the last prediction point."),
min=0, value=100, step=1000)
)
),
fluidRow(
column(12,
checkboxInput("checkboxDataOnPlot", label = "Show data on plot", value = TRUE)
),
column(12,
checkboxInput("checkboxDataEndOnPlot", label = "Show end of data on plot", value = TRUE)
)
),
# ModelPlotType was used .. may thats more right but changed it to rapid functionality programming
fluidRow(
column(12,
radioButtons("ModelDataPlotType", label = h6("Draw the plot with data points and lines, points only, or lines only?"),
choices = list("Both" = "points_and_lines", "Points" = "points", "Lines" = "lines"),
inline=TRUE,
selected = "points_and_lines")
)
),
fluidRow(
column(12,
radioButtons("saveModelResultsType", label = h6("Choose the type of file to save plots. Tables are saved as CSV files."),
choices = list("JPEG" = "JPG", "PDF" = "PDF", "PNG" = "PNG", "TIFF" = "TIFF"), inline = TRUE,
selected = "JPG")
),
column(8, downloadButton(outputId = "saveModelResults", label = "Save"))
),width=4
),
mainPanel(
tabsetPanel(
tabPanel("Model Result Plot", textOutput("ModelConfigError"), textOutput("UnsuccessfulModels"), plotOutput("ModelPlot", dblclick="MPdblclick", brush=brushOpts(id="MP_brush", resetOnNew=TRUE))),
tabPanel("Model Result Table",
selectInput(
"AllModelsRun", label = h6("Choose one or more sets of model results to display."),
choices=list("No model results to display"="None"),
multiple=TRUE, selected="None"),
DT::dataTableOutput("ModelResultTable")),
id="ModelPlotAndTableTabset"), width=8
)
)
),
tabPanel("Query Model Results",
sidebarLayout(
sidebarPanel(h4("Make Detailed Predictions From Model Results"),
fluidRow(
column(12,
selectInput(
"modelDetailChoice", label = h6("Choose one or more sets of model results to display."),
choices=list("No model results to display"="None"),
multiple=TRUE, selected="None"
)
# br(),
# h5("Choose one or more models for which detailed predictions will be made."),
# selectInput("modelDetailChoice", label = h6("Choose one or more sets of model results"),
# choices=models,
# multiple=TRUE,
# )
),
column(12,
h5("How much time will be required to observe the next N failures")
),
column(12,
numericInput("modelDetailPredFailures",
label = h6("Specify the number of failures that are to be observed."),
min = 1, value = 1)
),
column(12,
h5("How many failures will be observed over the next N time units?")
),
column(12,
numericInput("modelDetailPredTime",
label = h6("Specify the amount of additional time for which the software will run."),
min = 1, value = 1)
),
column(12,
h5("How much more test time to achieve a specified reliability?")
),
column(12,
numericInput("modelTargetReliability",
label = h6("Specify the desired reliability."),
min = 0, max = 1, value = 0.9, step = 0.01)
),
column(12,
numericInput("modelRelMissionTime2",
label = h6("Specify the length of the interval for which reliability will be computed"),
min = 0, value = 1)
),
column(12,
radioButtons("saveModelDetailsType", label = h6("Save detailed model results as PDF or CSV?"),
choices = list("CSV" = "CSV", "PDF" = "PDF"), inline = TRUE,
selected = "PDF"),
downloadButton('downloadData', 'Save Model Predictions')
)
)
),
mainPanel(
DT::dataTableOutput('mytable1')
)
)
),
tabPanel("Evaluate Models",
sidebarLayout(
sidebarPanel(h4("Evaluate Model goodness of fit and Applicability"),
fluidRow(
column(12,
br(),
h5("Choose one or more models for which the results will be evaluated."),
selectInput(
"modelResultsForEval", label = h6("Choose one or more sets of model results"),
choices=list("No model results to display"="None"),
multiple=TRUE, selected="None"
)
)
),
fluidRow(
# column(12,
# h5("Select a model evaluation technique to apply"),
# selectInput("modelEvalChoice", label = h6("Choose a model evaluation test"),
# choices = list("Kolmogorov-Smirnov GOF Test" = "KS", "-ln Prequential Likelihood" = "LPL",
# "Prequential Likelihood Ratio" = "PLR", "Akaike Information Criterion" = "AIC",
# "Predictive Sum Of Squares" = "PSSE"
# ), selected = "PSSE")
# ),
column(12,
# numericInput("numericEvalSigValue",
# label = h6("Specify the significance level for the selected test"),
# min = 0, max = 1, step = 0.001,
# value = .05),
numericInput("percentData",
label = h6("Specify the Percent Data for PSSE"),
min = 0.1, max = 1.0, step = 0.001,
value = .90)
),
column(12,
radioButtons("saveModelEvalType", label = h6("Save model evaluations as PDF or CSV?"),
choices = list("CSV" = "CSV", "PDF" = "PDF"), inline = TRUE,
selected = "PDF"),
downloadButton('saveModelEvals', 'Save Model Evaluations')
)
)
),
# sidebarLayout(
# sidebarPanel(h4("Evaluate Model Goodness-of-Fit and Applicability"),
# fluidRow(
# column(12,
# br(),
# h5("Choose the model results to display."),
# selectInput("EvalResultChoice", label = h6("Choose one or more sets of model results"),
# models,
# multiple=TRUE
# )
# )
# ),
# fluidRow(
# column(12,
# radioButtons("radioEvalPlotType", label = h6("Draw the plot with data points and lines, points only, or lines only?"),
# choices = list("Both" = 1, "Points" = 2, "Lines" = 3), inline = TRUE,
# selected = 1)
# )
# ),
# fluidRow(
# column(12,
# radioButtons("radioEvalPlotType", label = h6("Draw the plot with data points and lines, points only, or lines only??"),
# choices = list("Both" = 1, "Points" = 2, "Lines" = 3), inline = TRUE,
# selected = 1)
# )
# ),
# fluidRow(
# h5("Rank models by evaluation criteria"),
# column(1, ""),
# column(11,
# radioButtons("radioGOFRankEvalOrder", label = h6("Goodness of Fit"),
# choices = list("1" = 1, "2" = 2, "3" = 3, "4" = 4, "5" = 5),
# selected = 1, inline = TRUE)
# ),
# column(2, ""),
# column(10,
# checkboxInput("checkboxGOFScreen", label = "Use GOF test as screen", value = TRUE)
# )
# ),
# fluidRow(
# column(1, ""),
# column(11,
# radioButtons("radioAICRankEvalOrder", label = h6("Akaike Information Criterion"),
# choices = list("1" = 1, "2" = 2, "3" = 3, "4" = 4, "5" = 5),
# selected = 2, inline = TRUE)
# )
# ),
# fluidRow(
# column(1, ""),
# column(11,
# radioButtons("radioPLRankEvalOrder", label = h6("Prequential Likelihood"),
# choices = list("1" = 1, "2" = 2, "3" = 3, "4" = 4, "5" = 5),
# selected = 3, inline = TRUE)
# )
# ),
# fluidRow(
# column(1, ""),
# column(11,
# radioButtons("radioBiasRankEvalOrder", label = h6("Model Bias"),
# choices = list("1" = 1, "2" = 2, "3" = 3, "4" = 4, "5" = 5),
# selected = 4, inline = TRUE)
# )
# ),
# fluidRow(
# column(1, ""),
# column(11,
# radioButtons("radioBiasTrendRankEvalOrder", label = h6("Model Bias Trend"),
# choices = list("1" = 1, "2" = 2, "3" = 3, "4" = 4, "5" = 5),
# selected = 5, inline = TRUE)
# )
# )
# ),
mainPanel(
tabsetPanel(
tabPanel('Table',DT::dataTableOutput('mytable2'))
#tabPanel("Plot",plotOutput("Evalationplot"))
)
)
)
)
#tags$footer(includeHTML("analytics/clustrmaps.html")),
#tags$footer(includeHTML("analytics/statcounter.html"))
))