jofaichow commited on
Commit
90c1f3a
1 Parent(s): 7e6a2ad

minor tweaks to the initial download page

Browse files
Files changed (1) hide show
  1. app/app.R +13 -20
app/app.R CHANGED
@@ -13,18 +13,6 @@ library(parallel)
13
  library(Rnumerai)
14
 
15
 
16
- # ==============================================================================
17
- # Tournament Information
18
- # ==============================================================================
19
-
20
- # Download latest leaderboard from Numerai and get a list of all models
21
- d_lb <- get_leaderboard()
22
- ls_model <- sort(d_lb$username)
23
-
24
- # Round info
25
- d_comp <- get_competitions()
26
-
27
-
28
  # ==============================================================================
29
  # Helper Functions
30
  # ==============================================================================
@@ -137,7 +125,7 @@ ui <- shinydashboardPlus::dashboardPage(
137
  fluidPage(
138
 
139
  # ==============================================================
140
- # Special script to keep session alive
141
  # ==============================================================
142
 
143
  tags$head(
@@ -149,7 +137,7 @@ ui <- shinydashboardPlus::dashboardPage(
149
  $(document).on('shiny:connected', function(event) {
150
  socket_timeout_interval = setInterval(function(){
151
  Shiny.onInputChange('count', n++)
152
- }, 5000)
153
  });
154
  $(document).on('shiny:disconnected', function(event) {
155
  clearInterval(socket_timeout_interval)
@@ -178,7 +166,7 @@ ui <- shinydashboardPlus::dashboardPage(
178
 
179
  pickerInput(inputId = "model",
180
  label = " ",
181
- choices = ls_model,
182
  multiple = TRUE,
183
  width = "100%",
184
  options = list(
@@ -228,7 +216,8 @@ ui <- shinydashboardPlus::dashboardPage(
228
 
229
  br(),
230
 
231
- h3(strong(textOutput(outputId = "text_next")))
 
232
 
233
  )
234
  ),
@@ -253,10 +242,10 @@ ui <- shinydashboardPlus::dashboardPage(
253
  sliderInput(inputId = "range_round",
254
  label = "Numerai Classic Tournament Rounds",
255
  width = "100%",
256
- min = min(d_comp$number),
257
- max = max(d_comp$number),
258
  # note: daily rounds from round 339
259
- value = c(394, max(d_comp$number))
260
  )
261
  ),
262
 
@@ -402,7 +391,11 @@ server <- function(input, output) {
402
  })
403
 
404
  output$text_next <- renderText({
405
- if (length(react_ls_model()) >= 1) "⬅ [NEW] Payout Summary 📈📊🔥" else " "
 
 
 
 
406
  })
407
 
408
  react_d_model <- eventReactive(
 
13
  library(Rnumerai)
14
 
15
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  # ==============================================================================
17
  # Helper Functions
18
  # ==============================================================================
 
125
  fluidPage(
126
 
127
  # ==============================================================
128
+ # Special script to keep the session alive for a bit longer
129
  # ==============================================================
130
 
131
  tags$head(
 
137
  $(document).on('shiny:connected', function(event) {
138
  socket_timeout_interval = setInterval(function(){
139
  Shiny.onInputChange('count', n++)
140
+ }, 10000)
141
  });
142
  $(document).on('shiny:disconnected', function(event) {
143
  clearInterval(socket_timeout_interval)
 
166
 
167
  pickerInput(inputId = "model",
168
  label = " ",
169
+ choices = sort(Rnumerai::get_leaderboard()$username),
170
  multiple = TRUE,
171
  width = "100%",
172
  options = list(
 
216
 
217
  br(),
218
 
219
+ h3(strong(textOutput(outputId = "text_next"))),
220
+ h3(strong(textOutput(outputId = "text_soon")))
221
 
222
  )
223
  ),
 
242
  sliderInput(inputId = "range_round",
243
  label = "Numerai Classic Tournament Rounds",
244
  width = "100%",
245
+ min = 168, # first tournament round
246
+ max = Rnumerai::get_current_round(),
247
  # note: daily rounds from round 339
248
+ value = c(339, max(d_comp$number))
249
  )
250
  ),
251
 
 
391
  })
392
 
393
  output$text_next <- renderText({
394
+ if (length(react_ls_model()) >= 1) "⬅ [NEW] Payout Summary 📊💸" else " "
395
+ })
396
+
397
+ output$text_soon <- renderText({
398
+ if (length(react_ls_model()) >= 1) "⬅ [COMING SOON] Model Performance 📈🔥" else " "
399
  })
400
 
401
  react_d_model <- eventReactive(