|
|
@@ -55,10 +55,11 @@ ui <- shinyUI(fluidPage( |
|
|
|
)), |
|
|
|
mainPanel( |
|
|
|
conditionalPanel("input.Select == 'ville + spé'",plotlyOutput("outPlot")), |
|
|
|
conditionalPanel("input.Select == 'étudiant'", |
|
|
|
dataTableOutput("outTable")) |
|
|
|
dataTableOutput("outTable") |
|
|
|
) |
|
|
|
) |
|
|
|
))) |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
# Server ---- |
|
|
|
server <- shinyServer(function(input, output) |
|
|
@@ -135,10 +136,19 @@ server <- shinyServer(function(input, output) |
|
|
|
tbl("trajectoires") %>% |
|
|
|
filter(Subdivision == input$Ville, |
|
|
|
Discipline == input$Spe) %>% |
|
|
|
select(Etudiant) %>% |
|
|
|
arrange(Etudiant) %>% |
|
|
|
select(timestamp, Etudiant, Rang) %>% |
|
|
|
collect(n = Inf) %>% |
|
|
|
distinct(Etudiant, .keep_all = T) |
|
|
|
mutate(Date = timestamp %>% |
|
|
|
as.POSIXct %>% |
|
|
|
format(format = "%A %d %B") %>% |
|
|
|
str_to_title, |
|
|
|
Heure = timestamp %>% |
|
|
|
as.POSIXct %>% |
|
|
|
format(format = "%H:%M")) %>% |
|
|
|
group_by(Etudiant) %>% |
|
|
|
filter(timestamp == max(timestamp)) %>% |
|
|
|
arrange(timestamp) %>% |
|
|
|
select(Date, Heure, Etudiant, Rang) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|