|
|
@@ -62,14 +62,13 @@ ui <- shinyUI(fluidPage( |
|
|
|
titlePanel("Celine Stalker"), |
|
|
|
uiOutput("dates"), |
|
|
|
sidebarLayout( |
|
|
|
sidebarPanel(radioButtons("Select", "Chercher par", choices = c("étudiant", "ville + spé"), selected = "étudiant"), |
|
|
|
conditionalPanel("input.Select == 'ville + spé'", |
|
|
|
sidebarPanel(radioButtons("CESP", "Procédure", choices = c("Normale", "CESP"), selected = "Normale", inline = T), |
|
|
|
radioButtons("Select", "Chercher par", choices = c("étudiant", "ville + spé"), selected = "étudiant"), |
|
|
|
selectInput("Ville", "Ville", choices = villes), |
|
|
|
selectInput("Spe", "Spé", choices = spes)), |
|
|
|
conditionalPanel("input.Select == 'étudiant'", |
|
|
|
selectInput("Spe", "Spé", choices = spes), |
|
|
|
numericInput("Etudiant", "Étudiant", 1, min = 1, max = max_rank), |
|
|
|
checkboxInput("Rang", "Afficher le rang dans un choix", value = T) |
|
|
|
)), |
|
|
|
), |
|
|
|
mainPanel( |
|
|
|
conditionalPanel("input.Select == 'ville + spé'",plotlyOutput("outPlot")), |
|
|
|
dataTableOutput("outTable") |
|
|
@@ -85,11 +84,26 @@ server <- shinyServer(function(input, output, session) |
|
|
|
|
|
|
|
db <- reactive( |
|
|
|
{ |
|
|
|
req(input$CESP) |
|
|
|
updateDb() |
|
|
|
|
|
|
|
db <- dbConnect(SQLite(), "ecn.db", on.exit(dbDisconnect(db), add = T)) |
|
|
|
|
|
|
|
db %>% tbl("trajectoires") %>% collect %>% rename(Date = timestamp) |
|
|
|
if (input$CESP == "CESP") |
|
|
|
{ |
|
|
|
db %>% |
|
|
|
tbl("trajectoires") %>% |
|
|
|
filter(CESP == "CESP") %>% |
|
|
|
collect %>% |
|
|
|
rename(Date = timestamp) |
|
|
|
} else |
|
|
|
{ |
|
|
|
db %>% |
|
|
|
tbl("trajectoires") %>% |
|
|
|
filter(CESP == "") %>% |
|
|
|
collect %>% |
|
|
|
rename(Date = timestamp) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
output$dates <- renderUI( |
|
|
|