|
|
@@ -110,6 +110,28 @@ server <- function(input, output, session) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
# GHM |
|
|
|
data_ghm <- reactive({ |
|
|
|
GHM %>% |
|
|
|
filter(Age <= input$slider_age[2] & Age >= input$slider_age[1], |
|
|
|
date_entree <= input$slider_date[2] & date_sortie >= input$slider_date[1], |
|
|
|
CP %in% in_bounds()$Codepos, |
|
|
|
Sexe %in% input$check_sexe) |
|
|
|
}) |
|
|
|
|
|
|
|
output$plot_ghm <- renderPlot({ |
|
|
|
data_ghm() %>% |
|
|
|
count(GHM) %>% |
|
|
|
top_n(10) %>% |
|
|
|
arrange(n) %>% |
|
|
|
mutate(GHM = GHM %>% factor(levels = GHM)) %>% |
|
|
|
ggplot() + |
|
|
|
aes(x = GHM, y = n) + |
|
|
|
geom_bar(stat = "identity") + |
|
|
|
coord_flip() + |
|
|
|
theme(axis.title = element_blank()) |
|
|
|
}) |
|
|
|
|
|
|
|
# observe({ |
|
|
|
# output$plot_age <- renderPlotly({ |
|
|
|
# filteredData() %>% |
|
|
|