Spaces:
Running
Running
0.2.6 - added survey results
Browse files- Dockerfile +1 -1
- app/app.R +201 -32
Dockerfile
CHANGED
@@ -9,7 +9,7 @@ RUN R -q -e "install.packages(c('shinyWidgets', 'shinycssloaders'))"
|
|
9 |
|
10 |
# other R packages
|
11 |
RUN R -q -e "install.packages(c('DT', 'plotly', 'scico', 'ggthemes', 'scales', 'wesanderson'))"
|
12 |
-
RUN R -q -e "install.packages(c('data.table', 'dtplyr', 'devtools'))"
|
13 |
|
14 |
# modified version of Rnumerai
|
15 |
RUN R -q -e "devtools::install_github('woobe/Rnumerai')"
|
|
|
9 |
|
10 |
# other R packages
|
11 |
RUN R -q -e "install.packages(c('DT', 'plotly', 'scico', 'ggthemes', 'scales', 'wesanderson'))"
|
12 |
+
RUN R -q -e "install.packages(c('data.table', 'dtplyr', 'devtools', 'googlesheets4'))"
|
13 |
|
14 |
# modified version of Rnumerai
|
15 |
RUN R -q -e "devtools::install_github('woobe/Rnumerai')"
|
app/app.R
CHANGED
@@ -14,8 +14,8 @@ library(wesanderson)
|
|
14 |
|
15 |
library(data.table)
|
16 |
library(dtplyr)
|
17 |
-
|
18 |
library(parallel)
|
|
|
19 |
|
20 |
# devtools::install_github("woobe/Rnumerai")
|
21 |
library(Rnumerai)
|
@@ -30,6 +30,16 @@ options(timeout = max(1000, getOption("timeout")))
|
|
30 |
ls_username <- sort(get_leaderboard()$username)
|
31 |
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
# ==============================================================================
|
34 |
# Helper Functions
|
35 |
# ==============================================================================
|
@@ -756,12 +766,105 @@ ui <- shinydashboardPlus::dashboardPage(
|
|
756 |
# ========================================================================
|
757 |
|
758 |
tabItem(tabName = "community",
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
)
|
763 |
-
|
764 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
765 |
),
|
766 |
|
767 |
|
@@ -801,9 +904,10 @@ ui <- shinydashboardPlus::dashboardPage(
|
|
801 |
- #### **0.2.0** — Replaced `Payout Summary` with `Performance Summary`. Added KPIs summary
|
802 |
- #### **0.2.1** — Added `KPI (All)`
|
803 |
- #### **0.2.2** — Sped up chart rendering with `toWebGL()`
|
804 |
-
- #### **0.2.3** — Added new `MMC` - Ref: https://forum.numer.ai/t/changing-scoring-payouts-again-to-mmc-only
|
805 |
- #### **0.2.4** — Added `MMC` to `Payout Sim`
|
806 |
- #### **0.2.5** — Added more features related to MMC
|
|
|
807 |
"),
|
808 |
|
809 |
br(),
|
@@ -822,7 +926,7 @@ ui <- shinydashboardPlus::dashboardPage(
|
|
822 |
|
823 |
footer = shinydashboardPlus::dashboardFooter(
|
824 |
left = "Powered by ❤️, ☕, Shiny, and 🤗 Spaces",
|
825 |
-
right = paste0("Version 0.2.
|
826 |
|
827 |
)
|
828 |
|
@@ -850,23 +954,6 @@ server <- function(input, output) {
|
|
850 |
|
851 |
react_ls_model <- eventReactive(input$button_download, {sort(input$model)})
|
852 |
|
853 |
-
output$print_download <- renderPrint({react_ls_model()})
|
854 |
-
|
855 |
-
output$text_download <- renderText({
|
856 |
-
if (length(react_ls_model()) >= 1) "Your Selection:" else " "
|
857 |
-
})
|
858 |
-
|
859 |
-
output$text_preview <- renderText({
|
860 |
-
if (length(react_ls_model()) >= 1) "Data Preview:" else " "
|
861 |
-
})
|
862 |
-
|
863 |
-
output$text_next <- renderText({
|
864 |
-
if (length(react_ls_model()) >= 1) "Step 3: Performance Summary (see ←)" else " "
|
865 |
-
})
|
866 |
-
|
867 |
-
output$text_note <- renderText({
|
868 |
-
if (length(react_ls_model()) >= 1) "Note: you can also download [Raw Data] and check out our [Community Events] (see ←)" else " "
|
869 |
-
})
|
870 |
|
871 |
react_d_raw <- eventReactive(
|
872 |
input$button_download,
|
@@ -884,12 +971,6 @@ server <- function(input, output) {
|
|
884 |
)
|
885 |
|
886 |
|
887 |
-
|
888 |
-
# ============================================================================
|
889 |
-
# Reactive: DataTable
|
890 |
-
# ============================================================================
|
891 |
-
|
892 |
-
|
893 |
output$dt_model <- DT::renderDT({
|
894 |
|
895 |
# Raw Data
|
@@ -951,6 +1032,94 @@ server <- function(input, output) {
|
|
951 |
|
952 |
|
953 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
954 |
# ============================================================================
|
955 |
# Reactive: filtering data for all charts
|
956 |
# ============================================================================
|
|
|
14 |
|
15 |
library(data.table)
|
16 |
library(dtplyr)
|
|
|
17 |
library(parallel)
|
18 |
+
library(googlesheets4)
|
19 |
|
20 |
# devtools::install_github("woobe/Rnumerai")
|
21 |
library(Rnumerai)
|
|
|
30 |
ls_username <- sort(get_leaderboard()$username)
|
31 |
|
32 |
|
33 |
+
# Pre-download Survey Results
|
34 |
+
gs4_deauth()
|
35 |
+
d_survey_raw <- read_sheet(ss = "https://docs.google.com/spreadsheets/d/18AM4RkG5KiK3TlDGMx0z7X5Y5-eQE9kgLXM9ng_yXUk",
|
36 |
+
sheet = "Form responses 1") %>% data.table()
|
37 |
+
colnames(d_survey_raw) <- c("timestamp", "country", "comments")
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
# ==============================================================================
|
44 |
# Helper Functions
|
45 |
# ==============================================================================
|
|
|
766 |
# ========================================================================
|
767 |
|
768 |
tabItem(tabName = "community",
|
769 |
+
|
770 |
+
fluidPage(
|
771 |
+
|
772 |
+
markdown("# **Numerai Coummunity**"),
|
773 |
+
br(),
|
774 |
+
|
775 |
+
tabsetPanel(type = "tabs",
|
776 |
+
|
777 |
+
# First Page - About
|
778 |
+
tabPanel("About",
|
779 |
+
markdown("## **Around the World with Numeratis**"),
|
780 |
+
|
781 |
+
markdown("### **Overview**
|
782 |
+
|
783 |
+
NumerCon (2022) and the time I spent with my fellow Numeratis were the exact “booster jab” I needed to wake the “meetup organizer Joe” up
|
784 |
+
after two crazy years of COVID and hibernation in a man cave. After NumerCon, I am confident that
|
785 |
+
1) many countries are now ready for in-person tech events and
|
786 |
+
2) we need to bring this fantastic in-person experience to more Numeratis around the world.
|
787 |
+
|
788 |
+
So, fam, here is my [proposal](https://forum.numer.ai/t/proposal-around-the-world-with-numeratis) for **Global Numerai Community Meetups**.
|
789 |
+
|
790 |
+
"),
|
791 |
+
|
792 |
+
|
793 |
+
markdown("### **Goals**
|
794 |
+
- **Demystifying Numerai** - many top data scientists out there are just not too sure about the crypto elements and/or the tournament format. Speaking with and listening to long-term participants can be an effective way to build trust. This was exactly how I learned to trust Numerai after watching Jon’s Office Hours with Arbitrage.
|
795 |
+
- **Knowledge sharing and brainstorming** - although we may not share all our secret sauce, meetups are great opportunities to bounce ideas off each other and may lead to new models with crazily high TC.
|
796 |
+
- **Face-to-face discussions between Numeratis and Numerai team** - a lot more than just asking the team “wen scores” in person, these events can provide a quick and direct feedback loop for both participants and the Numerai team.
|
797 |
+
"),
|
798 |
+
|
799 |
+
markdown("### **What's Here?**
|
800 |
+
|
801 |
+
- Materials (slides and videos) from previous events
|
802 |
+
- Survey results for upcoming events
|
803 |
+
- Memes and (de)GenAI stuff from the community
|
804 |
+
|
805 |
+
### **Enjoy :)**
|
806 |
+
|
807 |
+
")
|
808 |
+
|
809 |
+
|
810 |
+
),
|
811 |
+
|
812 |
+
# Second Page - Materials
|
813 |
+
tabPanel("Materials",
|
814 |
+
fluidRow(
|
815 |
+
column(10,
|
816 |
+
htmltools::includeMarkdown('https://raw.githubusercontent.com/councilofelders/meetups/master/README.md')
|
817 |
+
))
|
818 |
+
),
|
819 |
+
|
820 |
+
|
821 |
+
# Third Page - Survey Results
|
822 |
+
tabPanel("Survey Results",
|
823 |
+
|
824 |
+
markdown("## **Survey for Upcoming Events**"),
|
825 |
+
|
826 |
+
br(),
|
827 |
+
|
828 |
+
markdown("Hello everyone!
|
829 |
+
|
830 |
+
We’re reaching out to gather **anonymous data** on your location, which will greatly assist us in planning future Numerai community events.
|
831 |
+
|
832 |
+
Your support in providing this information would be much appreciated.
|
833 |
+
|
834 |
+
You can find the latest survey results below.
|
835 |
+
|
836 |
+
Here is the [**Google Form**](https://forms.gle/1USUa7YCn2EgZG3NA). Please share it with your fellow Numeratis.
|
837 |
+
|
838 |
+
Thank you!
|
839 |
+
|
840 |
+
"),
|
841 |
+
|
842 |
+
fluidRow(
|
843 |
+
|
844 |
+
column(4,
|
845 |
+
markdown("### **Summary**"),
|
846 |
+
br(),
|
847 |
+
DTOutput("dt_survey_summary")
|
848 |
+
),
|
849 |
+
|
850 |
+
column(8,
|
851 |
+
markdown("### **Raw Data**"),
|
852 |
+
br(),
|
853 |
+
DTOutput("dt_survey_raw"))
|
854 |
+
)
|
855 |
+
),
|
856 |
+
|
857 |
+
|
858 |
+
# 4th Page - Memes
|
859 |
+
tabPanel("Memes",
|
860 |
+
markdown("![image](https://media.giphy.com/media/cftSzNoCTfSyAWctcl/giphy.gif)")
|
861 |
+
)
|
862 |
+
|
863 |
+
|
864 |
+
|
865 |
+
) # end of tabsetPanel
|
866 |
+
) # end of fluidPage
|
867 |
+
|
868 |
),
|
869 |
|
870 |
|
|
|
904 |
- #### **0.2.0** — Replaced `Payout Summary` with `Performance Summary`. Added KPIs summary
|
905 |
- #### **0.2.1** — Added `KPI (All)`
|
906 |
- #### **0.2.2** — Sped up chart rendering with `toWebGL()`
|
907 |
+
- #### **0.2.3** — Added new `MMC` - Ref: https://forum.numer.ai/t/changing-scoring-payouts-again-to-mmc-only
|
908 |
- #### **0.2.4** — Added `MMC` to `Payout Sim`
|
909 |
- #### **0.2.5** — Added more features related to MMC
|
910 |
+
- #### **0.2.6** — Added survey results - Ref: https://forum.numer.ai/t/around-the-world-with-numeratis-survey-for-upcoming-events
|
911 |
"),
|
912 |
|
913 |
br(),
|
|
|
926 |
|
927 |
footer = shinydashboardPlus::dashboardFooter(
|
928 |
left = "Powered by ❤️, ☕, Shiny, and 🤗 Spaces",
|
929 |
+
right = paste0("Version 0.2.6"))
|
930 |
|
931 |
)
|
932 |
|
|
|
954 |
|
955 |
react_ls_model <- eventReactive(input$button_download, {sort(input$model)})
|
956 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
957 |
|
958 |
react_d_raw <- eventReactive(
|
959 |
input$button_download,
|
|
|
971 |
)
|
972 |
|
973 |
|
|
|
|
|
|
|
|
|
|
|
|
|
974 |
output$dt_model <- DT::renderDT({
|
975 |
|
976 |
# Raw Data
|
|
|
1032 |
|
1033 |
|
1034 |
|
1035 |
+
# ============================================================================
|
1036 |
+
# Static: Survey Data
|
1037 |
+
# ============================================================================
|
1038 |
+
|
1039 |
+
|
1040 |
+
output$dt_survey_summary <- DT::renderDT({
|
1041 |
+
|
1042 |
+
|
1043 |
+
# Summarise
|
1044 |
+
d_survey_summary <-
|
1045 |
+
d_survey_raw %>%
|
1046 |
+
group_by(country) %>%
|
1047 |
+
summarise(count = n()) %>%
|
1048 |
+
arrange(desc(count), country) %>%
|
1049 |
+
as.data.table()
|
1050 |
+
|
1051 |
+
# Return
|
1052 |
+
DT::datatable(
|
1053 |
+
|
1054 |
+
# Data
|
1055 |
+
d_survey_summary,
|
1056 |
+
|
1057 |
+
# Other Options
|
1058 |
+
rownames = FALSE,
|
1059 |
+
# extensions = "Buttons",
|
1060 |
+
options =
|
1061 |
+
list(
|
1062 |
+
dom = 'Blrtip', # https://datatables.net/reference/option/dom
|
1063 |
+
pageLength = 20,
|
1064 |
+
lengthMenu = c(10, 20, 100, 500)
|
1065 |
+
)
|
1066 |
+
)
|
1067 |
+
|
1068 |
+
|
1069 |
+
})
|
1070 |
+
|
1071 |
+
|
1072 |
+
|
1073 |
+
|
1074 |
+
output$dt_survey_raw <- DT::renderDT({
|
1075 |
+
|
1076 |
+
# Return
|
1077 |
+
# Return
|
1078 |
+
DT::datatable(
|
1079 |
+
|
1080 |
+
# Data
|
1081 |
+
d_survey_raw,
|
1082 |
+
|
1083 |
+
# Other Options
|
1084 |
+
rownames = FALSE,
|
1085 |
+
# extensions = "Buttons",
|
1086 |
+
options =
|
1087 |
+
list(
|
1088 |
+
dom = 'Blrtip', # https://datatables.net/reference/option/dom
|
1089 |
+
pageLength = 20,
|
1090 |
+
lengthMenu = c(10, 20, 100, 500)
|
1091 |
+
)
|
1092 |
+
)
|
1093 |
+
|
1094 |
+
})
|
1095 |
+
|
1096 |
+
|
1097 |
+
|
1098 |
+
# ============================================================================
|
1099 |
+
# Reactive: Text Printout
|
1100 |
+
# ============================================================================
|
1101 |
+
|
1102 |
+
output$print_download <- renderPrint({react_ls_model()})
|
1103 |
+
|
1104 |
+
|
1105 |
+
output$text_download <- renderText({
|
1106 |
+
if (length(react_ls_model()) >= 1) "Your Selection:" else " "
|
1107 |
+
})
|
1108 |
+
|
1109 |
+
output$text_preview <- renderText({
|
1110 |
+
if (length(react_ls_model()) >= 1) "Data Preview:" else " "
|
1111 |
+
})
|
1112 |
+
|
1113 |
+
output$text_next <- renderText({
|
1114 |
+
if (length(react_ls_model()) >= 1) "Step 3: Performance Summary (see ←)" else " "
|
1115 |
+
})
|
1116 |
+
|
1117 |
+
output$text_note <- renderText({
|
1118 |
+
if (length(react_ls_model()) >= 1) "Note: you can also download [Raw Data] and check out our [Community Events] (see ←)" else " "
|
1119 |
+
})
|
1120 |
+
|
1121 |
+
|
1122 |
+
|
1123 |
# ============================================================================
|
1124 |
# Reactive: filtering data for all charts
|
1125 |
# ============================================================================
|