Spaces:
Running
Running
0.1.3 - added raw data download button
Browse files
app/app.R
CHANGED
@@ -105,6 +105,7 @@ ui <- shinydashboardPlus::dashboardPage(
|
|
105 |
menuItem(text = "Start Here", tabName = "start", icon = icon("play")),
|
106 |
menuItem(text = "Payout Summary", tabName = "payout", icon = icon("credit-card")),
|
107 |
menuItem(text = "Model Performance", tabName = "performance", icon = icon("line-chart")),
|
|
|
108 |
menuItem(text = "About", tabName = "about", icon = icon("question-circle"))
|
109 |
),
|
110 |
minified = TRUE,
|
@@ -235,7 +236,7 @@ ui <- shinydashboardPlus::dashboardPage(
|
|
235 |
fluidPage(
|
236 |
|
237 |
markdown("# **Payout Summary**"),
|
238 |
-
markdown("### Remember to refresh the charts after making changes to model selection or settings below"),
|
239 |
br(),
|
240 |
|
241 |
fluidRow(
|
@@ -321,13 +322,35 @@ ui <- shinydashboardPlus::dashboardPage(
|
|
321 |
),
|
322 |
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
# ========================================================================
|
325 |
# About
|
326 |
# ========================================================================
|
327 |
|
328 |
tabItem(tabName = "about",
|
329 |
-
markdown("
|
330 |
-
markdown('
|
331 |
|
332 |
br(),
|
333 |
markdown("## **Acknowledgements**"),
|
@@ -341,7 +364,9 @@ ui <- shinydashboardPlus::dashboardPage(
|
|
341 |
- #### **0.1.0** — First prototype with an interactive table output
|
342 |
- #### **0.1.1** — Added a functional `Payout Summary` page
|
343 |
- #### **0.1.2** — `Payout Summary` layout updates
|
|
|
344 |
"),
|
|
|
345 |
br(),
|
346 |
markdown("## **Session Info**"),
|
347 |
verbatimTextOutput(outputId = "session_info"),
|
@@ -358,7 +383,7 @@ ui <- shinydashboardPlus::dashboardPage(
|
|
358 |
|
359 |
footer = shinydashboardPlus::dashboardFooter(
|
360 |
left = "Powered by ❤️, ☕, Shiny, and 🤗 Spaces",
|
361 |
-
right = paste0("Version 0.1.
|
362 |
|
363 |
)
|
364 |
|
@@ -397,7 +422,7 @@ server <- function(input, output) {
|
|
397 |
})
|
398 |
|
399 |
output$text_next <- renderText({
|
400 |
-
if (length(react_ls_model()) >= 1) "⬅ [NEW] Payout Summary 📊💸" else " "
|
401 |
})
|
402 |
|
403 |
output$text_soon <- renderText({
|
@@ -734,6 +759,16 @@ server <- function(input, output) {
|
|
734 |
})
|
735 |
|
736 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
737 |
# ============================================================================
|
738 |
# Session Info
|
739 |
# ============================================================================
|
|
|
105 |
menuItem(text = "Start Here", tabName = "start", icon = icon("play")),
|
106 |
menuItem(text = "Payout Summary", tabName = "payout", icon = icon("credit-card")),
|
107 |
menuItem(text = "Model Performance", tabName = "performance", icon = icon("line-chart")),
|
108 |
+
menuItem(text = "Raw Data", tabName = "raw_data", icon = icon("download")),
|
109 |
menuItem(text = "About", tabName = "about", icon = icon("question-circle"))
|
110 |
),
|
111 |
minified = TRUE,
|
|
|
236 |
fluidPage(
|
237 |
|
238 |
markdown("# **Payout Summary**"),
|
239 |
+
markdown("### Remember to refresh the charts after making changes to model selection or settings below."),
|
240 |
br(),
|
241 |
|
242 |
fluidRow(
|
|
|
322 |
),
|
323 |
|
324 |
|
325 |
+
# ========================================================================
|
326 |
+
# Raw Data
|
327 |
+
# ========================================================================
|
328 |
+
|
329 |
+
tabItem(tabName = "raw_data",
|
330 |
+
|
331 |
+
markdown("# **Download Raw Data**"),
|
332 |
+
markdown("### Wanna run your own analysis? No problem."),
|
333 |
+
markdown("### Remember to select your model(s) first."),
|
334 |
+
br(),
|
335 |
+
fluidRow(
|
336 |
+
column(6,
|
337 |
+
downloadBttn(outputId = "download_raw",
|
338 |
+
label = "Download Raw Data CSV",
|
339 |
+
icon = icon("cloud-download"),
|
340 |
+
style = "gradient",
|
341 |
+
block = T)
|
342 |
+
)
|
343 |
+
)
|
344 |
+
),
|
345 |
+
|
346 |
+
|
347 |
# ========================================================================
|
348 |
# About
|
349 |
# ========================================================================
|
350 |
|
351 |
tabItem(tabName = "about",
|
352 |
+
markdown("# **About this App**"),
|
353 |
+
markdown('### Yet another Numerai community dashboard by <b><a href="https://linktr.ee/jofaichow" target="_blank">Jo-fai Chow</a></b>.'),
|
354 |
|
355 |
br(),
|
356 |
markdown("## **Acknowledgements**"),
|
|
|
364 |
- #### **0.1.0** — First prototype with an interactive table output
|
365 |
- #### **0.1.1** — Added a functional `Payout Summary` page
|
366 |
- #### **0.1.2** — `Payout Summary` layout updates
|
367 |
+
- #### **0.1.3** — Added `Raw Data`
|
368 |
"),
|
369 |
+
|
370 |
br(),
|
371 |
markdown("## **Session Info**"),
|
372 |
verbatimTextOutput(outputId = "session_info"),
|
|
|
383 |
|
384 |
footer = shinydashboardPlus::dashboardFooter(
|
385 |
left = "Powered by ❤️, ☕, Shiny, and 🤗 Spaces",
|
386 |
+
right = paste0("Version 0.1.3"))
|
387 |
|
388 |
)
|
389 |
|
|
|
422 |
})
|
423 |
|
424 |
output$text_next <- renderText({
|
425 |
+
if (length(react_ls_model()) >= 1) "⬅ [NEW] Payout Summary and Raw Data 📊💸" else " "
|
426 |
})
|
427 |
|
428 |
output$text_soon <- renderText({
|
|
|
759 |
})
|
760 |
|
761 |
|
762 |
+
# ============================================================================
|
763 |
+
# Reactive: Downloads
|
764 |
+
# ============================================================================
|
765 |
+
|
766 |
+
output$download_raw <- downloadHandler(
|
767 |
+
filename = "raw_data.csv",
|
768 |
+
content = function(file) {fwrite(react_d_raw(), file, row.names = FALSE)}
|
769 |
+
)
|
770 |
+
|
771 |
+
|
772 |
# ============================================================================
|
773 |
# Session Info
|
774 |
# ============================================================================
|