Browse Source

Ajout table des derniers passages des étudiants par une combinaison

spé-ville
static
Maxime Wack 6 years ago
parent
commit
d1d74ced0e
1 changed files with 16 additions and 6 deletions
  1. +16
    -6
      app.R

+ 16
- 6
app.R View File

@@ -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)
}
})



Loading…
Cancel
Save