22# ================================================
33# Note: the shared folder is created like this using SSH onto the server
44# cd /data1
5- # sudo mkdir A04_challenge
6- # sudo chown rstudio-connect: A04_challenge
5+ # sudo mkdir A03_challenge
6+ # sudo chown rstudio-connect:rstudio-connect A03_challenge
77
88# We also need flipdown from:
99# remotes::install_github("feddelegrand7/flipdownr")
@@ -20,9 +20,9 @@ deadline <- Sys.getenv("CHALLENGE_DEADLINE",
2020 unset = " 2024-01-01 00:00:00" )
2121
2222# Read data from the SQLite database
23- dir <- " /data1/A04_challenge "
23+ dir <- " /data1/A03_challenge "
2424if (! file.exists(dir ))
25- dir <- " ~/A04_challenge " # Alternate dir for local tests
25+ dir <- " ~/A03_challenge " # Alternate dir for local tests
2626database <- file.path(dir , " charts.sqlite" )
2727table <- " charts"
2828
@@ -183,6 +183,8 @@ server <- function(input, output) {
183183 ranking <- ranking [order(- ranking $ score , as.numeric(ranking $ date )), ]
184184 ranking $ date <- as.POSIXct(ranking $ date , origin = " 1960-01-01" )
185185 ranking $ date <- format(ranking $ date , " %Y-%m-%d %H:%M:%S" )
186+ # Keep only best score for each student or team
187+ ranking <- ranking [! duplicated(ranking $ project ), ]
186188 }
187189 message(" Date reworked" )
188190 # Add a column with medals for the three first results
0 commit comments