Browse Source

Première version du path plot par étudiant

static
Maxime Wack 6 years ago
parent
commit
45bc6125e0
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      app.R

+ 11
- 4
app.R View File

@@ -4,6 +4,7 @@ library(DT)
library(RSQLite)
library(stringr)
library(plotly)
library(forcats)

uniq <- function(df, ...)
{
@@ -71,7 +72,7 @@ ui <- shinyUI(fluidPage(
),
mainPanel(
textOutput("plotly"),
conditionalPanel("input.Select == 'ville + spé'",plotlyOutput("outPlot")),
plotlyOutput("outPlot"),
dataTableOutput("outTable")
)
)
@@ -220,9 +221,15 @@ server <- shinyServer(function(input, output, session)

if (input$Select == "étudiant")
plotEtudiant() %>%
ggplot(aes(x = Subdivision, y = Discipline)) +
geom_point() +
geom_path(color = "black")
mutate_if(is.character, factor) %>%
mutate_if(is.factor, fct_inorder) %>%
mutate_if(is.factor, unclass) %>%
ggplot(aes(x = Subdivision, y = Discipline, color = Vœu)) +
geom_path() +
scale_x_continuous(breaks = plotEtudiant()$Subdivision %>% factor %>% fct_inorder %>% unclass %>% unique,
labels = plotEtudiant()$Subdivision %>% factor %>% fct_inorder %>% levels) +
scale_y_continuous(breaks = plotEtudiant()$Discipline %>% factor %>% fct_inorder %>% unclass %>% unique,
labels = plotEtudiant()$Discipline %>% factor %>% fct_inorder %>% levels)
else
plotVilleSpe() %>%
ggplot(aes(x = Date, y = Rang, color = Etudiant, key = Etudiant)) +


Loading…
Cancel
Save