-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.R
558 lines (434 loc) · 24.2 KB
/
server.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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
library(shiny)
library(shinydashboard)
library(SnowballC)
library(tm)
library(ggplot2)
library(plotly)
library(plyr)
library(session)
library(dplyr)
library(wordcloud)
shinyServer(
function(input,output, session)
{
# output$plot <- renderPlot(
# {
# inFile <- input$file1
# if (is.null(inFile))
# {
# return(NULL)
# }
# else(inFile =="stats_3.csv")
# {
# booksDS <- read.csv(inFile$datapath, header = input$header)
# booksDS <-data.frame(booksDS)
# }
# }
# )
mydata <- reactive({
req(input$file1)
inFile <- input$file1
df <- read.csv(inFile$datapath, header = T, sep = ',')
####################################### WORD CLOUD ##########################################################
output$plot <- renderPlot({
text <- readLines(inFile$datapath)
docs<- Corpus(VectorSource(text))
inspect(docs)
toSpace<- content_transformer(function(x,pattern)gsub(pattern,"",x))
docs<-tm_map(docs,toSpace,"/")
docs<-tm_map(docs,toSpace,"@")
docs<-tm_map(docs,content_transformer(tolower))
docs<-tm_map(docs,removeNumbers)
docs<-tm_map(docs,removeWords,stopwords("english"))
docs<-tm_map(docs,removeWords,c("blabla1","blabla2"))
docs<-tm_map(docs,removePunctuation)
docs<-tm_map(docs,stripWhitespace)
docs<-tm_map(docs,stemDocument)
dtm<-TermDocumentMatrix(docs)
m<-as.matrix(dtm)
v<-sort(rowSums(m),decreasing = TRUE)
d<-data.frame(word=names(v),freq=v)
head(d,2)
set.seed(1234)
wordcloud(words=d$word,freq=d$freq,min.freq=1,max.words=1000,
random.order=FALSE,rot.per=0.30,
colors=brewer.pal(8,"Dark2"))
})
#############################################################################################################
updateSelectInput(session,inputId = 'goalazo', label='Team Names', choices = df$team, selected = df$team)
updateSelectInput(session,inputId = 'barcs', label='Team Names', choices = df$team, selected = df$team)
updateSelectInput(session,inputId = 'barst', label='Team Names', choices = df$team, selected = df$team)
updateSelectInput(session,inputId = 'bargc', label='Team Names', choices = df$team, selected = df$team)
updateSelectInput(session,inputId = 'barsvs', label='Team Names', choices = df$team, selected = df$team)
updateSelectInput(session,inputId = 'barib', label='Team Names', choices = df$team, selected = df$team)
updateSelectInput(session,inputId = 'ddgoals', label='Seasons', choices = df$season, selected = df$season)
updateSelectInput(session,inputId = 'ddcs', label='Seasons', choices = df$season, selected = df$season)
return(df)
})
observe({
results17_18 <- lm(wins~goals+clean_sheet,mydata())
results217_18 <- lm(goals~ontarget_scoring_att+att_ibox_goal,mydata())
results317_18 <- lm(clean_sheet~goals_conceded+saves,mydata())
ind <- sample(2, nrow(stats_3), replace = TRUE, prob = c(0.8,0.2))
traindata <- stats_3[ind==1,]
testdata <- stats_3[ind==2,]
output$sct_goals_text <- renderPrint({"The x-axis of scatter plot have wins and y-axis have goals. From the scatter plot we can conclude the relation between wins & goals. Wins is directly proportional to Goals i.e higher the number of goals scored, higher are the chances of winning."})
output$don_goals_text <- renderPrint({"The Donut chart shows the total number of goals scored by each team across all the 3 seasons. It also shows that, out of the total number of goals scored in 3 seasons how many percent of goals are scored by each team."})
output$dd_goals_text <- renderPrint({"The Dot Plot shows the number of 'shots on target' and 'shots from inside the box' for a team in a particular season. As 'shots on target' and 'shot from inside box' are the two main factor to determine the goals; this visualization helps to understand the pattern for goals."})
output$sct_cs_text <- renderPrint({"The x-axis of scatter plot have wins and y-axis have clean sheets. From the scatter plot we can conclude the relation between wins & clean sheets. Wins is directly proportional to clean sheets i.e higher the number of clean sheets, higher are the chances of winning."})
output$don_cs_text <- renderPrint({"The Donut chart shows the total number of clean sheets kept by each team across all the 3 seasons. It also shows that, out of the total number of clean sheets kept in 3 seasons how many percent of clean sheets are kept by each team."})
output$dd_cs_text <- renderPrint({"The Dot Plot shows the number of 'saves' and 'goals conceded' for a team in a particular season. As 'saves' and 'goals conceded' are the two main factor to determine the clean sheets; this visualization helps to understand the pattern for clean sheets. Goals conceded and clean sheets are inversely proportional to each other i.e the more number of goals conceded the less clean sheets are kept."})
output$don_st_text <- renderPrint({"The Donut chart shows the total number of shots on target made by each team across all the 3 seasons. It also shows that, out of the total number of shots on target made in 3 seasons how many percent of shots on target are made by each team."})
output$don_ib_text <- renderPrint({"The Donut chart shows the total number of shots from inside the box made by each team across all the 3 seasons. It also shows that, out of the total number of shots from inside the box made in 3 seasons how many percent of shots from inside the box are made by each team."})
output$sct_gc_text <- renderPrint({"The x-axis of scatter plot have wins and y-axis have goals conceded. From the scatter plot we can conclude the relation between wins & goals conceded. Wins is inversely proportional to goals conceded i.e higher the number of goals conceded, less are the chances of winning."})
output$pie_gc_text <- renderPrint({"The Pie chart shows the total number of goals conceded by each team across all the 3 seasons. It also shows that, out of the total number of goals conceded in 3 seasons how many percent of goals are conceded by each team. "})
output$sct_svs_text <- renderPrint({"The x-axis of scatter plot have wins and y-axis have saves. From the scatter plot we can conclude the relation between wins & saves. If the teams saves are higher in number it indicates the team's defence is relatively weak, which further says that the chance of winning is less. Hence, it's safe to say that higher the number of saves, less are the chances of winning."})
output$pie_svs_text <- renderPrint({"The Pie chart shows the total number of saves made by each team across all the 3 seasons. It also shows that, out of the total number of saves made in 3 seasons how many percent of saves are made by each team."})
######################################### GOALS #######################################################
#Scatter Plot
output$p0 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
#data(), x = ~wins
p <- plot_ly(mydata(), x = ~wins, y = ~goals,
marker = list(size = 10,
color = 'rgba(255, 182, 193, .9)',
line = list(color = 'rgba(152, 0, 0, .8)',
width = 2))) %>%
layout(title = 'Goals vs Wins',
yaxis = list(zeroline = FALSE),
xaxis = list(zeroline = FALSE))
})
output$bar_goalazo <- renderPlot({
a<-mydata()%>%filter(mydata()$team==input$goalazo) %>%select(season,goals,team)
b<-data.frame(list(c(a)))
print(b)
ggplot(b,aes(x=season,y=goals)) + geom_bar(stat = 'identity',fill="#FF9999", colour="black")
})
#Donut Chart
output$p02 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
goals_data17_18 <- ddply(mydata(), .(team,season), summarize, goals_mean=mean(goals))
p <- goals_data17_18 %>%
group_by(team) %>%
plot_ly(labels = ~team, values = ~goals_mean) %>%
add_pie(hole = 0.6) %>%
layout(title = "Goals data ", showlegend = T,
xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
})
##DDPlot
output$dd_goalazo <- renderPlotly({
a<-mydata()%>%filter(mydata()$season==input$ddgoals) %>%select(ontarget_scoring_att,att_ibox_goal,season,team,goals)
b<-data.frame(list(c(a)))
print(b)
p <- plot_ly(b, x = ~team, y = ~ontarget_scoring_att, name = "on target", type = 'scatter',
mode = "markers", marker = list(color = "red")) %>%
add_trace(x = ~team, y = ~att_ibox_goal, name = "inbox shots",type = 'scatter',
mode = "markers", marker = list(color = "blue")) %>%
layout(
title = "Goals",
xaxis = list(title = "teams"),
yaxis = list(title = "count"),
margin = list(l = 100)
)
})
###################################### CLEAN SHEETS ##########################################################
#Scatter Plot
output$p1 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
p <- plot_ly(mydata(), x = ~wins, y = ~clean_sheet,
marker = list(size = 10,
color = 'rgba(255, 182, 193, .9)',
line = list(color = 'rgba(152, 0, 0, .8)',
width = 2))) %>%
layout(title = 'Clean Sheets vs Wins',
yaxis = list(zeroline = FALSE),
xaxis = list(zeroline = FALSE))
})
#Pie Chart
# output$p11 <- renderPlotly({
# # inFile <- input$file1
# # a <- read.csv(inFile$datapath, header = input$header)
# clean_sheet_data17_18 <- ddply(mydata(), .(team,season), summarize, clean_sheet_mean=mean(clean_sheet))
# pie_cs <- plot_ly(clean_sheet_data17_18, labels = ~team, values = ~clean_sheet_mean, type = 'pie') %>%
# layout(title = 'Clean Sheets data ',
# xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
# yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
#
# pie_cs
#
# })
#BAR CHART
output$bar_cs <- renderPlot({
a<-mydata()%>%filter(mydata()$team==input$barcs) %>%select(season,clean_sheet,team)
b<-data.frame(list(c(a)))
print(b)
ggplot(b,aes(x=season,y=clean_sheet)) + geom_bar(stat = 'identity',fill="steelblue")
})
#Donut Chart
output$p12 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
clean_sheet_data17_18 <- ddply(mydata(), .(team,season), summarize, clean_sheet_mean=mean(clean_sheet))
p <- clean_sheet_data17_18 %>%
group_by(team) %>%
plot_ly(labels = ~team, values = ~clean_sheet_mean) %>%
add_pie(hole = 0.6) %>%
layout(title = "Clean Sheets data ", showlegend = T,
xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
})
#DDPlot
output$dd_cs <- renderPlotly({
a<-mydata()%>%filter(mydata()$season==input$ddcs) %>%select(saves,goals_conceded,season,team,clean_sheet)
b<-data.frame(list(c(a)))
print(b)
p <- plot_ly(b, x = ~team, y = ~saves, name = "saves", type = 'scatter',
mode = "markers", marker = list(color = "red")) %>%
add_trace(x = ~team, y = ~goals_conceded, name = "goals conceded",type = 'scatter',
mode = "markers", marker = list(color = "blue")) %>%
layout(
title = "Clean Sheets",
xaxis = list(title = "teams"),
yaxis = list(title = "count"),
margin = list(l = 100)
)
})
################################## SHOTS ON TARGET #############################################################
#Scatter Plot
# output$p2 <- renderPlotly({
# # inFile <- input$file1
# # a <- read.csv(inFile$datapath, header = input$header)
# p <- plot_ly(mydata(), x = ~wins, y = ~ontarget_scoring_att,
# marker = list(size = 10,
# color = 'rgba(255, 182, 193, .9)',
# line = list(color = 'rgba(152, 0, 0, .8)',
# width = 2))) %>%
# layout(title = 'Shots on target vs Wins',
# yaxis = list(zeroline = FALSE),
# xaxis = list(zeroline = FALSE))
#
# })
#Pie Chart
# output$p21 <- renderPlotly({
# # inFile <- input$file1
# # a <- read.csv(inFile$datapath, header = input$header)
# shots_on_target_data17_18 <- ddply(mydata(), .(team,season), summarize, shots_on_target_mean=mean(ontarget_scoring_att))
# pie_st <- plot_ly(shots_on_target_data17_18, labels = ~team, values = ~shots_on_target_mean, type = 'pie') %>%
# layout(title = 'Shots on target data ',
# xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
# yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
#
# pie_st
#
# })
#Bar Chart
output$bar_st <- renderPlot({
a<-mydata()%>%filter(mydata()$team==input$barst) %>%select(season,ontarget_scoring_att,team)
b<-data.frame(list(c(a)))
print(b)
ggplot(b,aes(x=season,y=ontarget_scoring_att)) + geom_bar(stat = 'identity',fill="steelblue")
})
#Donut Chart
output$p22 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
shots_on_target_data17_18 <- ddply(mydata(), .(team,season), summarize, shots_on_target_mean=mean(ontarget_scoring_att))
p <- shots_on_target_data17_18 %>%
group_by(team) %>%
plot_ly(labels = ~team, values = ~shots_on_target_mean) %>%
add_pie(hole = 0.6) %>%
layout(title = "Shots on target data ", showlegend = T,
xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
})
##################################### SHOTS FROM INSIDE BOX ##########################################################
#Scatter Plot
# output$p3 <- renderPlotly({
# # inFile <- input$file1
# # a <- read.csv(inFile$datapath, header = input$header)
# p <- plot_ly(mydata(), x = ~wins, y = ~att_ibox_goal,
# marker = list(size = 10,
# color = 'rgba(255, 182, 193, .9)',
# line = list(color = 'rgba(152, 0, 0, .8)',
# width = 2))) %>%
# layout(title = 'Inbox shots vs Wins',
# yaxis = list(zeroline = FALSE),
# xaxis = list(zeroline = FALSE))
#
# })
#Pie Chart
# output$p31 <- renderPlotly({
# # inFile <- input$file1
# # a <- read.csv(inFile$datapath, header = input$header)
# inside_box_data17_18 <- ddply(mydata(), .(team,season), summarize, shots_inside_box_mean=mean(att_ibox_goal))
# pie_ib <- plot_ly(inside_box_data17_18, labels = ~team, values = ~shots_inside_box_mean, type = 'pie') %>%
# layout(title = 'Inbox shots data ',
# xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
# yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
#
# pie_ib
#
# })
#Bar Chart
output$bar_ib <- renderPlot({
a<-mydata()%>%filter(mydata()$team==input$barib) %>%select(season,att_ibox_goal,team)
b<-data.frame(list(c(a)))
print(b)
ggplot(b,aes(x=season,y=att_ibox_goal)) + geom_bar(stat = 'identity',fill="#FF9999", colour="black")
})
#Donut Chart
output$p32 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
inside_box_data17_18 <- ddply(mydata(), .(team,season), summarize, shots_inside_box_mean=mean(att_ibox_goal))
p <- inside_box_data17_18 %>%
group_by(team) %>%
plot_ly(labels = ~team, values = ~shots_inside_box_mean) %>%
add_pie(hole = 0.6) %>%
layout(title = "Inbox shots data ", showlegend = T,
xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
})
###################################### GOALS CONCEDED #########################################################
#Scatter Plot
output$p4 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
p <- plot_ly(mydata(), x = ~wins, y = ~goals_conceded,
marker = list(size = 10,
color = 'rgba(255, 182, 193, .9)',
line = list(color = 'rgba(152, 0, 0, .8)',
width = 2))) %>%
layout(title = 'Goals conceded vs Wins',
yaxis = list(zeroline = FALSE),
xaxis = list(zeroline = FALSE))
})
#Bar Chart
output$bar_gc <- renderPlot({
a<-mydata()%>%filter(mydata()$team==input$bargc) %>%select(season,goals_conceded,team)
b<-data.frame(list(c(a)))
print(b)
ggplot(b,aes(x=season,y=goals_conceded)) + geom_bar(stat = 'identity',fill="steelblue")
})
#Pie Chart
output$p41 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
goals_conceded_data17_18 <- ddply(mydata(), .(team,season), summarize, goals_conceded_mean=mean(goals_conceded))
pie_gc <- plot_ly(goals_conceded_data17_18, labels = ~team, values = ~goals_conceded_mean, type = 'pie') %>%
layout(title = 'Data of goals conceded ',
xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
pie_gc
})
#Donut Chart
# output$p42 <- renderPlotly({
# # inFile <- input$file1
# # a <- read.csv(inFile$datapath, header = input$header)
# goals_conceded_data17_18 <- ddply(mydata(), .(team,season), summarize, goals_conceded_mean=mean(goals_conceded))
# p <- goals_conceded_data17_18 %>%
# group_by(team) %>%
# plot_ly(labels = ~team, values = ~goals_conceded_mean) %>%
# add_pie(hole = 0.6) %>%
# layout(title = "Data of goals conceded ", showlegend = T,
# xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
# yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
#
# })
################################# SAVES ##############################################################
#Scatter Plot
output$p5 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
p <- plot_ly(mydata(), x = ~wins, y = ~saves,
marker = list(size = 10,
color = 'rgba(255, 182, 193, .9)',
line = list(color = 'rgba(152, 0, 0, .8)',
width = 2))) %>%
layout(title = 'Saves vs Wins',
yaxis = list(zeroline = FALSE),
xaxis = list(zeroline = FALSE))
})
#Bar Chart
output$bar_svs <- renderPlot({
a<-mydata()%>%filter(mydata()$team==input$barsvs) %>%select(season,saves,team)
b<-data.frame(list(c(a)))
print(b)
ggplot(b,aes(x=season,y=saves)) + geom_bar(stat = 'identity',fill="#FF9999", colour="black")
})
#Pie Chart
output$p51 <- renderPlotly({
# inFile <- input$file1
# a <- read.csv(inFile$datapath, header = input$header)
saves_data17_18 <- ddply(mydata(), .(team,season), summarize, saves_mean=mean(saves))
pie_saves <- plot_ly(saves_data17_18, labels = ~team, values = ~saves_mean, type = 'pie') %>%
layout(title = 'Saves data ',
xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
pie_saves
})
#Donut Chart
# output$p52 <- renderPlotly({
# # inFile <- input$file1
# # a <- read.csv(inFile$datapath, header = input$header)
# saves_data17_18 <- ddply(mydata(), .(team,season), summarize, saves_mean=mean(saves))
# p <- saves_data17_18 %>%
# group_by(team) %>%
# plot_ly(labels = ~team, values = ~saves_mean) %>%
# add_pie(hole = 0.6) %>%
# layout(title = "Saves data ", showlegend = T,
# xaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE),
# yaxis = list(showgrid = FALSE, zeroline = FALSE, showticklabels = FALSE))
#
# })
###############################################################################################
output$preg1 <-renderPlot({
ggplot(mydata(),aes(wins,goals)) + geom_point() + geom_smooth(method = lm)
})
output$preg1_sum <- renderPrint({
print(summary(results17_18))
})
###############################################################################################
output$preg2 <-renderPlot({
ggplot(stats_3,aes(wins,clean_sheet)) + geom_point() + geom_smooth(method = lm)
})
output$preg2_sum <- renderPrint({
print(summary(results17_18))
})
###############################################################################################
output$preg3 <-renderPlot({
ggplot(stats_3,aes(clean_sheet,saves)) + geom_point() + geom_smooth(method = lm)
})
output$preg3_sum <- renderPrint({
print(summary(results317_18))
})
###############################################################################################
output$preg4 <-renderPlot({
ggplot(stats_3,aes(clean_sheet,goals_conceded)) + geom_point() + geom_smooth(method = lm)
})
output$preg4_sum <- renderPrint({
print(summary(results317_18))
})
###############################################################################################
output$preg5 <-renderPlot({
ggplot(stats_3,aes(goals,ontarget_scoring_att)) + geom_point() + geom_smooth(method = lm)
})
output$preg5_sum <- renderPrint({
print(summary(results217_18))
})
###############################################################################################
output$preg6 <-renderPlot({
ggplot(stats_3,aes(goals,att_ibox_goal)) + geom_point() + geom_smooth(method = lm)
})
output$preg6_sum <- renderPrint({
print(summary(results217_18))
})
###############################################################################################
output$table <- renderDataTable(Final_Ranking)
})
}
)