-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathui.R
1308 lines (1132 loc) · 46 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
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
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
function(request) {
dashboardPage(
title = "BPL",
skin = "yellow",
dashboardHeader(title = "Premier League", titleWidth = 300),
dashboardSidebar(
includeCSS("custom.css"),
#selectInput("teamA", "Team", teamsChoice),
uiOutput("a"),
uiOutput("teamYear_ui"),
uiOutput("c"),
uiOutput("standings_ui"),
uiOutput("position_ui"),
# uiOutput("tests_ui"),
sidebarMenu(
id = "sbMenu",
menuItem(selectInput("bookmark",label="Site Layout",teamsChoice_3)),
menuItem("Front Page",tabName = "frontPage"),
menuItem(
"Managers", tabName = "managers",icon = icon("table"),
menuSubItem("Manager av ppg by Team", tabName = "t_ppg"),
menuSubItem("Player Scoring Age",tabName = "m_players"),
menuSubItem("Team av ppg by Manager", tabName = "m_ppg",icon = icon("star"))
),
menuItem(
"Teams", tabName = "teams",icon = icon("table"),
menuSubItem("At A Glance", tabName = "tm_glance"),
menuSubItem("Player Summary",tabName = "tm_playerSummary"),
# menuSubItem("League Position",tabName = "tm_leaguePosition"), NB need to look at code
menuSubItem("Goals",tabName = "tm_goals"),
menuSubItem("Team Leaders",tabName = "tm_leaders"),
menuSubItem("Head to Head",tabName = "tm_hth"),
menuSubItem("Scoreline Heatmap",tabName = "tm_heat"),
menuSubItem("Sequences-Results",tabName = "tm_seqs")#,
#menuSubItem("Sequences-Goals",tabName = "tm_seqs_goals")
),
menuItem(
"Players", tabName = "players",icon = icon("table"),
menuSubItem("At A Glance", tabName = "pl_glance"),
menuSubItem("Scorer/Assist Combo", tabName = "pl_asstScorer", icon = icon("star")),
menuSubItem("By Opposition",tabName = "pl_opponent"),
menuSubItem("Career Summary", tabName = "pl_career"),
menuSubItem("Droughts", tabName = "pl_droughts"),
menuSubItem("Goal Details", tabName = "pl_goals"),
menuSubItem("Points per Game", tabName = "pl_ppg"),
menuSubItem("Sequences-Goals",tabName = "pl_seqs_goals")
),
menuItem(
"Standings", tabName = "standings",icon = icon("table"),
menuSubItem("All Seasons", tabName = "st_boxplot"),
menuSubItem("By Round", tabName = "st_round"),
menuSubItem("By Position", tabName = "st_position"),
menuSubItem("By Team", tabName = "st_team"),
menuSubItem("By Date", tabName = "st_date"),
menuSubItem("Leaders by Season", tabName = "st_leaders")
),
menuItem(
"Specials", tabName = "specials",
menuSubItem("Best Goal Sequences",tabName = "sp_plGoalSeqs"),
# menuSubItem("Birthplace",tabName = "sp_birthplace"),
menuSubItem("Cards Per Club",tabName = "sp_cardsClub"),
menuSubItem("Deficits Overcome",tabName = "sp_deficits"),
menuSubItem("Games Since Goal Tally",tabName = "sp_tmGoalsSince"),
menuSubItem("Leading GoalScorers",tabName = "sp_goalScorers"),
menuSubItem("League position - Alternates",tabName = "sp_finishingPos"),
# menuSubItem("Manager by Player",tabName = "sp_managerplayer",
# icon = icon("star")),
menuSubItem("Percent Full Games",tabName = "sp_pcFullGames"),
menuSubItem("Player % Goals by Category",tabName = "sp_pcPlayerGoals"),
menuSubItem("Player by Team av PPG",tabName = "sp_playerByTeamPPG"),
menuSubItem("Played for 2 clubs",tabName = "sp_twoClubs"),
menuSubItem("Player Comparisons",tabName = "sp_comparisons"),
menuSubItem("Player PPG by Country of Birth",tabName = "sp_playerByCountryPPG"),
#menuSubItem("Results By Game Span",tabName = "sp_resSpan"),
menuSubItem("Scored On",tabName = "sp_scoredOn"),
# menuSubItem("Year on Year Changes",tabName = "sp_yearOnYear"),
menuSubItem("Youngest Players",tabName = "sp_youngest")
),
##bookmarkButton(), this showed on every page but only referred to front page resuts
# menuItem(
# text = "",href = "https://www.mytinyshinys.com/categories/eplweekly/",badgeLabel = "Premier League Weekly"
# ),
menuItem(
text = "",href = "https://mytinyshinys.shinyapps.io/dashboard",badgeLabel = "All Dashboards and Trelliscopes (14)"
),
tags$hr(),
tags$body(
a(
class = "addpad",href = "https://twitter.com/pssGuy", target = "_blank",img(src =
"images/twitterImage25pc.jpg")
),
a(
class = "addpad2",href = "mailto:[email protected]", img(src = "images/email25pc.jpg")
),
a(
class = "addpad2",href = "https://github.com/pssguy",target = "_blank",img(src =
"images/GitHub-Mark30px.png")
),
a(
href = "https://rpubs.com/pssguy",target = "_blank",img(src = "images/RPubs25px.png")
)
),
tags$hr(),
menuItem(
text = "",href = "https://www.mytinyshinys.com/categories/eplweekly/",badgeLabel = "Interactive Blog posts after every round",badgeColor = "maroon"
),
menuItem(bookmarkButton(id = "b_4"))
)
),
dashboardBody(
tabItems(
## Front Page
tabItem("frontPage",
fluidRow(
column(
width = 4,
box(
class = "information",
width = 12,
status = "warning",solidHeader = TRUE,title = "Not Just Another Soccer site ",
collapsible = T,collapsed = F,
includeMarkdown("frontPage.md")#,
#selectInput("bookmark",label="Site Layout",teamsChoice_3)
),
box(
width = 12,
status = "success",solidHeader = TRUE,title = "Current Team Sequences",
collapsible = T,collapsed = F,
DT::dataTableOutput("teamSeqCurrent")
),
box(
width = 12,
status = "success",solidHeader = TRUE,title = "Player Milestones",
collapsible = T,collapsed = F,
DT::dataTableOutput("playerMilestones")
)#,
# box(
# width = 12,
# status = "success",solidHeader = TRUE,title = "Twitter Feed",
# collapsible = T,collapsed = T,
# tags$body(
# includeScript("twitter.js"),
#
#
# a(
# "Soccer", class = "twitter-timeline",
# width = "320",
# href = "https://twitter.com/pssGuy/timelines/524678699061641216",
# "data-widget-id" = "524686407298596864",
# "data-chrome" = "nofooter transparent noheader"
# )
# )
#
# ),
# box(
# width = 12, class = "information",
# status = "success",solidHeader = TRUE,title = "What's New",
# collapsible = T,collapsed = T,
# includeMarkdown("whatsNew.md")
# )
# bookmarkButton(id = "bm1") # issue with milestone - error gets reported
),
column(
width = 8,
box(
width = 12,
status = "success",solidHeader = TRUE,title = "Team Leaders (Ties not shown)",
collapsible = T,collapsed = T,
DT::dataTableOutput("teamLeadersCurrent")
),
# box(
# width=12,collapsible = T,collapsed = F, height=1000,
# solidHeader = TRUE,status = 'warning',title="Latest App - Players Points v Current Top Clubs",
#
# inputPanel(
# selectInput("player_tc", label=NULL,selected="Sergio Aguero", choices=playerChoice, selectize = FALSE)
# ),
#
# plotlyOutput("vTopClubs_front", height=600)
# )
# box(
# width=12,collapsible = T,collapsed = F,
# solidHeader = TRUE,status = 'warning',title="Latest App - Players Goal Droughts",
#
# inputPanel(
# selectInput("playerB", label="Type Name and Select", choices=playerChoice, selected = "RASHFOM") #selected = values$playerID object 'values' not found # here if you change anybody from rashford then that will be held for other data on player but then cannot change
# ),
#
# plotlyOutput("goalDrought_pl_front")
# )
#
# box(
# width=12,collapsible = T,collapsed = T,
# solidHeader = TRUE,status = 'warning',title="Latest App - Players Assist Droughts",
#
# inputPanel(
# selectInput("playerB", label="Type Name and Select", choices=playerChoice, selected = "ERIKSEC") #selected = values$playerID object 'values' not found # here if you change anybody from rashford then that will be held for other data on player but then cannot change
# ),
# plotlyOutput("assistDrought_pl_front")
# ),
box(
width=12,collapsible = T,collapsed = F,
solidHeader = TRUE,status = 'warning',title="Latest Blog Post - Access every week via Eplweekly category on mytinyshinys.com site",
tags$iframe(src="https://www.mytinyshinys.com/2018/01/09/epl-week-21/", height=600, width=950, frameborder=0)
)
)
)),
#managers
tabItem("m_ppg",
box(title="Team's Average points per game - Hover points for more information",
status = "success",
plotlyOutput("teamPPGbyManager"),
textOutput("liverpool")
)),
tabItem("t_ppg",
box(title="Manager's Average points per game - Hover points for more information",
status = "success",
plotlyOutput("managerPPGbyTeam")
)),
tabItem("m_players",
box(width=12,
status = "success",
plotOutput("managerPlayersAge")
)
),
## Player Section
tabItem(
"players",
box(
status = "warning",solidHeader = TRUE,title = "test image",
htmlOutput("playerPix")
)
),
tabItem(
"tm_glance",
fluidRow(
# tabBox(# tabPanel("Where in the World (click for details)",
# # leafletOutput("teamLeaflet")), # height='90%', width='90%' produces blank area also seemed to impact other tables on page!!!!!
# tabPanel("Squad Photo",htmlOutput("squadPhoto"),
# #tabPanel("Where in the World",plotOutput("birthChoropleth")),
# # tabPanel("Where in the World (click for details)",helpText("Available Soons"))
# #),
# box(
# title = "EPL Finishing Positions",width = 4,height = 375,solidHeader = TRUE,status = 'success',
#
# plotOutput("seasonsHist")
# ),
# box(
# title = "Top LineUp",width = 2,solidHeader = TRUE,status = 'success',
# h5(textOutput("lineupCount")),
# hr(),
# textOutput("lineupText")
# )
#
#
# ))
box("Squad Photo",htmlOutput("squadPhoto")),
box(
title = "EPL Finishing Positions",width = 4,height = 375,solidHeader = TRUE,status = 'success',
column(width=12,plotOutput("seasonsHist"))
),
box(
title = "Top LineUp",width = 2,solidHeader = TRUE,status = 'success',
h5(textOutput("lineupCount")),
hr(),
textOutput("lineupText")
)
),
fluidRow(
box(
title = "Most Apps (click row for player)",width = 3,solidHeader = TRUE,status = 'success',
DT::dataTableOutput("mostGames")
),
box(
title = "Most Goals",width = 3,solidHeader = TRUE,status = 'success',
DT::dataTableOutput("mostGoals")
),
box(
title = "Most Assists (max 2 per goal)",width = 3,solidHeader = TRUE,status = 'success',
DT::dataTableOutput("mostAssists")
),
box(
title = "Most Cards",width = 3,solidHeader = TRUE,status = 'success',
DT::dataTableOutput("mostCards")
)
)
),
tabItem("tm_playerSummary",
fluidRow(
box(
width = 12,status = "success",solidHeader = TRUE,title = "Player Summary (PPG = Points+Assists per 90 Minutes) ",
inputPanel(
radioButtons(
"withClub","Players",choices = c("All","Current"),inline = TRUE
),
radioButtons(
"seasons","Seasons",choices = c("All","Single"), selected = "Single",inline = TRUE
)
),
DT::dataTableOutput('teamYear')
)
)),
tabItem("tm_leaguePosition",
fluidRow(
# box(
# width = 6,
# status = "success",solidHeader = TRUE,title = "Positon by Round. Hover points for Result, click for lineup",
# ggvisOutput("posGraph")
# ),
box(
width = 6,
status = "success",solidHeader = TRUE,title = "Team Lineup",
DT::dataTableOutput("lineup")
)
)),
tabItem(
"tm_goals",
box(
title = "Team Goals For and Against", solidHeader = TRUE,status = 'success',
width = 12,
radioButtons("tmGoals",'',c("For","Against","Difference"), inline =
TRUE),
DT::dataTableOutput("teamGoalsFor")
)
## need to add some charts
),
tabItem(
"tm_leaders",
box(
title = "Team Leaders. Ties are not currently shown", solidHeader = TRUE,status =
'success',
width = 12,
DT::dataTableOutput("teamLeaders")
)
## need to add some charts
),
tabItem("tm_hth",
fluidRow(
column(
width = 7,
box(
title = "Head to Head Click for fixture details", solidHeader = TRUE,status = 'success',
width = 12,
DT::dataTableOutput("hthTable")
)
),
column(
width = 5,
box(
title = "Fixtures", solidHeader = TRUE,status = 'success',
width = 12, collapsible = T,collapsed = F,
DT::dataTableOutput("hthFixtures")
)
)
)),
tabItem(
"tm_heat",
box(
title = "Heatmap", solidHeader = TRUE,status = 'success',
width = 6,
# # revamped version of plotly - but seems to work ok without any change?
# plotlyOutput("x", width = 400, height = 250, inline = T),
# htmltools::div(style = "display:inline-block", plotlyOutput("x", width = 400, height = 250)),
plotlyOutput("heatResults"),
h4("Click on a cell in the heatmap to display table of results")
),
box(
title = "Results by Scoreline",
footer="Click row for Goalscorer timeline",
solidHeader = TRUE,status = 'success',
width = 6,
uiOutput("heatHeader"),
DT::dataTableOutput("heatTable")
),
box(
solidHeader = TRUE,status = 'success',
title="Goal Timeline",
# collapsible = T,collapsed = F,
height=200,
d3kit_timelineOutput("matchScorers")
)
),
#
# tabItem(
# "tm_seqs",
# radioButtons(
# "seqVenue","Venue",choices = c("All","Home","Away"),inline = TRUE
# ),
# fluidRow(column(width=2,plotOutput("tm_wins")),
# column(width=2,plotOutput("tm_noWins")),
# column(width=2,plotOutput("tm_draws")),
# column(width=2,plotOutput("tm_noDraws")),
# column(width=2,plotOutput("tm_losses")),
# column(width=2,plotOutput("tm_noLosses"))
# ),
tabItem(
"tm_seqs",
box(
width = 12, height = 550,title = "Result Sequences - Most Recent Highlighted - Hover bar for details",
solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
radioButtons(
"seqVenue","Venue",choices = c("All","Home","Away"),inline = TRUE
),
fluidRow(
column(width = 2,plotlyOutput("tm_wins")),
column(width = 2,plotlyOutput("tm_noWins")),
column(width = 2,plotlyOutput("tm_draws")),
column(width = 2,plotlyOutput("tm_noDraws")),
column(width = 2,plotlyOutput("tm_losses")),
column(width = 2,plotlyOutput("tm_noLosses"))
)
),
fluidRow(
column(
width = 4,
box(
width = 12,title = "Most Recent Record Run - Wins",
solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
DT::dataTableOutput("tmWinSeq")
)
),
column(
width = 4,
box(
width = 12,title = "Most Recent Record Run - Draws",
solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
DT::dataTableOutput("tmDrawSeq")
)
),
column(
width = 4,
box(
width = 12,title = "Most Recent Record Run - Defeats",
solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
DT::dataTableOutput("tmLossSeq")
)
)
),
fluidRow(
column(
width = 4,
box(
width = 12,title = "Most Recent Record Run - No Wins",
solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
DT::dataTableOutput("tmNoWinSeq")
)
),
column(
width = 4,
box(
width = 12,title = "Most Recent Record Run - No Draws",
solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
DT::dataTableOutput("tmNoDrawSeq")
)
),
column(
width = 4,
box(
width = 12,title = "Most Recent Record Run - Undefeated",
solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
DT::dataTableOutput("tmNoLossSeq")
)
)
)
),
# tabItem(
# "tm_seqs_goals",
# radioButtons(
# "seqVenueB","Venue",choices = c("All","Home","Away"),inline = TRUE
# ),
# fluidRow(column(width = 3,plotOutput("tm_goalFor")),
# # fluidRow(column(width=2,plotOutput("tm_goalFor")),
# # column(width=2,plotOutput("tm_noWins")),
# # column(width=2,plotOutput("tm_draws")),
# # column(width=2,plotOutput("tm_noDraws")),
# # column(width=2,plotOutput("tm_losses")),
# # column(width=2,plotOutput("tm_noLosses"))),
# fluidRow(column(
# width = 6,
# box(
# width = 12,title = "Most Recent Record Run - Goals For",
# solidHeader = TRUE,status = 'success',
# collapsible = TRUE, collapsed = TRUE,
# DT::dataTableOutput("tmSeqGF")
# )
# ))
# # column(width=4,
# # box(width=12,title = "Most Recent Record Run - Draws",
# # solidHeader = TRUE,status = 'success',
# # collapsible = TRUE, collapsed = TRUE,
# # DT::dataTableOutput("tmDrawSeq"))
# # ),
# # column(width=4,
# # box(width=12,title = "Most Recent Record Run - Defeats",
# # solidHeader = TRUE,status = 'success',
# # collapsible = TRUE, collapsed = TRUE,
# # DT::dataTableOutput("tmLossSeq"))
# # )
# # ),
# # fluidRow(column(width=4,
# # box(width=12,title = "Most Recent Record Run - No Wins",
# # solidHeader = TRUE,status = 'success',
# # collapsible = TRUE, collapsed = TRUE,
# # DT::dataTableOutput("tmNoWinSeq"))
# # ),
# # column(width=4,
# # box(width=12,title = "Most Recent Record Run - No Draws",
# # solidHeader = TRUE,status = 'success',
# # collapsible = TRUE, collapsed = TRUE,
# # DT::dataTableOutput("tmNoDrawSeq"))
# # ),
# # column(width=4,
# # box(width=12,title = "Most Recent Record Run - Undefeated",
# # solidHeader = TRUE,status = 'success',
# # collapsible = TRUE, collapsed = TRUE,
# # DT::dataTableOutput("tmNoLossSeq"))
# # )
#
# ),
## Standings section
tabItem(
"st_boxplot",
box(
width = 6, height = 700,
collapsed = F,collapsible = T,
title = "Points Range by Games played - Click plot for Season standings",solidHeader = TRUE,status = 'success',
div(
style = "display:inline-block; padding-right: 20px;", sliderInput(
"st_boxGames","Games Played", min = 1,max = 42, value = currentRound, width='300px')
),
div(
style = "display:inline-block; padding-right: 20px;", sliderInput(
"st_boxPositions","Team Positions", min = 1,max = 22, value = c(1,20), width='300px')
),
div(
actionButton("boxButton","get Chart")
),#exploding_boxplotOutput("st_explodingBoxAll")
plotlyOutput("st_BoxAll")
),
box(
width = 6,height = 600,
collapsed = F,collapsible = T,
plotlyOutput("st_BoxSeason")
)#,
# box(
# # width = 6,height = 600,
# #collapsed = F,collapsible = T,
# #exploding_boxplotOutput("test", width = "100%", height = "400px"),
# exploding_boxplotOutput("st_explodingBoxAll")
# )
),
tabItem(
"st_round",
box(
width = 6,
title = "Standings",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("st_roundTable")
)
),
tabItem(
"st_position",
box(
width = 6,
title = "Standings",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("st_position")
),
box(
width = 6,
title = "Final League Standings",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
ggvisOutput("st_position_chart")
)
),
tabItem(
"st_team",
box(
width = 6,
title = "Standings By Team By Round",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("st_team")
)
),
tabItem(
"st_leaders",
box(
width = 6,
title = "Number of leadership changes by Year",
footer = "Only shows changes after full round of games",
solidHeader = FALSE,
collapsible = FALSE, collapsed = FALSE,
plotlyOutput("st_topChanges")
),
box(
width = 6,
title = "Progress of teams that topped League - hover chart for results
",solidHeader = FALSE,
collapsible = FALSE, collapsed = FALSE,
plotlyOutput("st_topChangesWeekly")
)
),
tabItem(
"st_date",
box(
width = 4,
title = "Standings on Chosen Date",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("st_dateNow")
),
box(
width = 4,
title = "Standings Rest of Season",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("st_dateLater")
),
box(
width = 4,
title = "Standings Full Year",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("st_dateSeason")
)
),
### Players section
tabItem(
"pl_glance",
fluidRow(
column(
width = 4,
box(
width = 12,title = "In Action. Not currently available",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE#,
#htmlOutput("playerPic", height = 250)
)
),
column(
width = 3,
box(
width = 12,title = "Birth Place",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
leafletOutput("playerBirthplace", height = 250)
)
),
column(
width = 5,
box(
width = 12,title = "Permanent Transfers (hover for details)",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
# tauchartsOutput("playerTransfers_tau", height = "250px")
plotlyOutput("playerTransfers_plotly" , height = "250px")
)
)
),
# hr(),
fluidRow(
column(width = 3,
infoBoxOutput("teamsBox", width = 12)),
column(
width = 3, offset = 1,
infoBoxOutput("seasonsBoxPlayer", width = 12)
),
column(
width = 3, offset = 1,
infoBoxOutput("appsBox", width = 12)
)
),
fluidRow(
column(width = 3,
infoBoxOutput("goalsBox", width = 12)),
column(
width = 3,offset = 1,
infoBoxOutput("assistsBox", width = 12)
),
column(
width = 3,offset = 1,
infoBoxOutput("cardsBox", width = 12)
)
),
fluidRow(column(
width = 5,offset = 3,
box(
width = 12,title = "Wikipedia (includes non-EPL data)",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
uiOutput("playerWiki")
)
))
),
tabItem(
"pl_asstScorer",
box(
width = 6,title = "Player Assists by Scorer",solidHeader = TRUE,status = 'success',height=1000,
collapsible = FALSE, collapsed = FALSE,
plotlyOutput("asstScorer_pl")
),
box(
width = 6,title = "Player Goals by Assister",solidHeader = TRUE,status = 'success',height=1000,
collapsible = FALSE, collapsed = FALSE,
plotlyOutput("scorerAssist_pl")
)
),
tabItem(
"pl_career",
fluidRow(column(
width = 7,
box(
width = 12,title = "Game Summaries. Point size relates to Goals/Assists. Zoom and Hover for details. Values of 99 indicate time of substitution unknown",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
#ggvisOutput("careerChart")
plotlyOutput("careerChart")
)
),
column(
width = 5,
box(
width = 12,title = "Points per 90 Minutes Hover for details",solidHeader = TRUE,status = 'success',
footer = "Hover for details. Circle size reflects minutes played",
collapsible = TRUE, collapsed = FALSE,
# ggvisOutput("pointsByYearChart")
plotlyOutput("pointsByYearChart")
)
)),
box(
width = 12,title = "By Club",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
DT::dataTableOutput("career")
)
,
box(
width = 12,title = "By Season",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
DT::dataTableOutput("careerYear")
)
#,
#bookmarkButton(id = "b_3")
),
tabItem(
"pl_droughts",
box(
width = 12,height=400,title = "Goal Droughts",solidHeader = TRUE,status = 'success',
plotlyOutput("goalDrought_pl")
),
box(
width = 12,height=400,title = "Assist Droughts",solidHeader = TRUE,status = 'success',
plotlyOutput("assistDrought_pl")
)
),
tabItem(
"pl_goals",
box(
width = 12,title = "Goal Summary Table",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("goalSummary")
),
fluidRow(column(
width = 7,
box(
width = 12,title = "Goals By Year",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
radioButtons(
"method","",choices = c("Method","Place","Play"), inline = TRUE
),
ggvisOutput("playerGoals")
)
),
column(
width = 5,
box(
width = 12,title = "Goals Distribution (Points are jittered)",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
plotOutput("playerGoalDistribution")
)
))
),
tabItem(
"pl_ppg",
box(
width = 12,title = "Goals and Assists by Game - Hover for details",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
plotlyOutput("player_ppg")
)
),
tabItem(
"pl_seqs_goals",
box(
width = 12, height = 400,title = "Scoring Sequences - Most Recent in Bold",
solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
radioButtons(
"seqPlVenue","Venue",choices = c("All","Home","Away"),inline = TRUE
),
fluidRow(
column(width = 3,plotOutput("gameGoal")),
column(width = 3,plotOutput("gameNoGoal")),
column(width = 3,plotOutput("gameGoalStarter")),
column(width = 3,plotOutput("gameNoGoalStarter"))
)
),
fluidRow(
box(
width = 6,
title = "Individual Goal Sequences By Date - All Games",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
plotOutput("gameGoalSeq")
),
box(
width = 6,
title = "Individual Goal Sequences By Date - As Starter",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = TRUE,
plotOutput("gameGoalSeqStarter")
)
)
),
tabItem(
"pl_opponent",
box(
width = 7,title = "Summary By Opponent - click for Game Info",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("playerByOpponent"),
plotlyOutput("playerByOpponentChart")
),
box(
width = 5,title = "Games By Selected Opponent",solidHeader = TRUE,status = 'success',
collapsible = TRUE, collapsed = FALSE,
DT::dataTableOutput("plOpponentSummary")
)
),
## specials
tabItem(
"sp_goalScorers",
box(
width = 12,
status = "success",solidHeader = TRUE,title = "Leading Goalscorers. Amend minimum goals as required. Teams can be de(selected) via legend. Hover for details",
collapsible = T,collapsed = F,
helpText(
"Elite Goalscorers are always difficult to find which made home-grown Harry Kane's 21 league goals scored in 2014/15 such a fairy tale
"
),
div(
style = "display:inline-block",numericInput(
"goalA", label = "Min Goals",value = 20,min = 1,max = 40,width = 80
)
),
# div(style = "display:inline-block",inputPanel(selectInput("teamE", label=NULL, teamsChoice))),
div(
style = "display:inline-block",selectInput(
"teamE", label = "Select Teams", c("All Teams",teamsChoice), selected =
c("All Teams"), multiple = T, width = 150
)),
# div(
# style = "display:inline-block",actionButton("twenty","Redo chart") ##NB revisit - may need reactive
# ),
tauchartsOutput("leadingGoalscorers_tau")
)
),
# needs relook
tabItem(
"sp_resSpan",
box(
width = 12,
status = "success",solidHeader = TRUE,title = "Results By Game Span (takes a few seconds)",
collapsible = T,collapsed = F,
sliderInput(
"spanA", label = "Game Span",value = 10,min = 2,max = 20
),
radioButtons(
"spanVenue", label = NULL, choices = c("All","Home","Away"),inline = T
),
radioButtons(
"result", label = NULL, choices = c("Win","Loss","Draw","No Win","No Loss","No Draw"),inline =
T