-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
133 lines (131 loc) · 8.54 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
library(shiny)
ui <- navbarPage(title = "World Cup 2022",
tabPanel("Home",
tags$b("Welcome! Check out the 'How this Works' tab for some instructions"),
h1("Today's Games"),
textOutput("today"),
hr(),
fluidRow(column(4,uiOutput("todays_games_dfs"))),
textOutput("no_games_today"),
h1("Upcoming Games"),
textOutput("next_game_day"),
hr(),
fluidRow(column(4,uiOutput("future_games_df"))),
h2("Date Search"),
dateInput("date_search",
"Select a Date"),
fluidRow(column(4,uiOutput("seach_games_df"))),
textOutput("no_games_today_search")),
tabPanel("Schedule",
fluidRow(column(3, wellPanel(
textInput("group_pattern", "Group Search"),
textInput("team_pattern", "Team Search"))),
column(4, wellPanel(
fileInput("scores_csv", "Upload Scores .csv file",
accept = ".csv"),
downloadButton("download_scores", "Download Score Template")
)),
column(4,(wellPanel(
fileInput("elo_csv", "Upload Elo .csv file",
accept = ".csv"),
downloadButton("download_elo", "Download Default Elo")
)))
),
tableOutput("elo"),
formattableOutput("schedule")),
tabPanel("Groups",
fluidRow(column(5, numericInput("predict_group_n",
"Number of Tournament Simulations",
min = 10, max = 1000, value = 100)),
column(5, actionButton("simulate_group",
"Simulate"))),
tags$b(tags$i("Group A")), formattableOutput("table_A"), tags$hr(),
tags$b(tags$i("Group B")), formattableOutput("table_B"), tags$hr(),
tags$b(tags$i("Group C")), formattableOutput("table_C"), tags$hr(),
tags$b(tags$i("Group D")), formattableOutput("table_D"), tags$hr(),
tags$b(tags$i("Group E")), formattableOutput("table_E"), tags$hr(),
tags$b(tags$i("Group F")), formattableOutput("table_F"), tags$hr(),
tags$b(tags$i("Group G")), formattableOutput("table_G"), tags$hr(),
tags$b(tags$i("Group H")), formattableOutput("table_H"), tags$hr()),
tabPanel("Knockout",
fluidRow(
column(3, offset = 0, formattableOutput("game_49"))),
fluidRow(
column(3, offset = 3, formattableOutput("game_57"))),
fluidRow(
column(3, offset = 0, formattableOutput("game_50")),
),
fluidRow(
column(3, offset = 0, formattableOutput("game_53")),
column(3, offset = 3, formattableOutput("game_61b"))),
fluidRow(
column(3, offset = 3, formattableOutput("game_58"))),
fluidRow(
column(3, offset = 0, formattableOutput("game_54")),
column(3, offset = 6, formattableOutput("game_64a"))),
fluidRow(
column(3, offset = 0, formattableOutput("game_51")),
),
fluidRow(
column(3, offset = 3, formattableOutput("game_59"))),
fluidRow(
column(3, offset = 0, formattableOutput("game_52")),
column(3, offset = 3, formattableOutput("game_62a"))),
fluidRow(
column(3, offset = 0, formattableOutput("game_55")),
),
fluidRow(
column(3, offset = 3, formattableOutput("game_60"))),
fluidRow(
column(3, offset = 0, formattableOutput("game_56")),
column(3, offset = 6, formattableOutput("game_63"))),
),
tabPanel("Stats/Plots/Analysis",
fluidRow(column(5, numericInput("predict_overall_n",
"Number of Tournament Simulations",
min = 10, max = 1000, value = 100)),
column(5, actionButton("simulate_overall",
"Simulate"))),
fluidRow(tabsetPanel(
tabPanel("Predictions by Simulation",
fluidRow(tags$head(
tags$style(
HTML(".shiny-notification {
height: 100px;
width: 400px;
position:fixed;
font-size: 20px;
top: calc(13% - 50px);;
left: calc(90% - 300px);;
}
"
)
)
),
column(3, offset = 1, textInput("group_pattern_sim",
"Group Search")),
column(3, textInput("team_pattern_sim",
"Team Search")),
column(3, selectInput("error_type",
"Show StDev?",
choices = c("No", "Error Bars", "Shading"),
selected = "No"))),
tags$hr(),
tabsetPanel(
tabPanel("Win World Cup", withSpinner(plotlyOutput("champions_plotly", height = 600)), tags$hr()),
tabPanel("Advance KOs", withSpinner(plotlyOutput("advance_KOs_plotly", height = 600)), tags$hr()),
tabPanel("Win Group", withSpinner(plotlyOutput("win_group_plotly", height = 600)), tags$hr()),
tabPanel("Advance Quarters", withSpinner(plotlyOutput("quarters_plotly", height = 600)), tags$hr()),
tabPanel("Advance Semis", withSpinner(plotlyOutput("semis_plotly", height = 600)), tags$hr()),
tabPanel("Advance Finals", withSpinner(plotlyOutput("finals_plotly", height = 600)), tags$hr()))),
tabPanel("Stats",
tags$hr(),
tabsetPanel(
tabPanel("Goals For", withSpinner(plotlyOutput("GF_plot", height = 600))),
tabPanel("Goals Against", withSpinner(plotlyOutput("GA_plot", height = 600))),
tabPanel("Goal Difference", withSpinner(plotlyOutput("GD_plot", height = 600))),
))
))),
tabPanel("How this works",
includeMarkdown("Documentation.md"))
)