title: “Analyse Territoriale Pauvreté” output: flexdashboard::flex_dashboard: orientation: rows vertical_layout: fill runtime: shiny —
renderTable({
req(input$dep_select)
df <- if(input$groupe_select == "riches") top5_riches else top5_pauvres
# Sélection des colonnes pour les questions e, f, g, h
df %>%
filter(Libellé == input$dep_select) %>%
select(Libellé,
`Part Rés. Principales (%)` = Part_RP,
`Logements Vacants (%)` = Part_Vacants,
`Locataires HLM (%)` = Part_HLM)
})
# m à )
renderPlot({
req(input$dep_select)
df <- if(input$groupe_select == "riches") top5_riches else top5_pauvres
info <- df[df$Libellé == input$dep_select, ]
equipements <- c(info$Nb_Urgences, info$Nb_Pharmacies, info$Nb_Ecoles, info$Nb_Banques)
names(equipements) <- c("Urgences", "Pharmacies", "Écoles", "Banques")
barplot(equipements, horiz = TRUE, las = 1, col = "orange",
main = "Nombre d'infrastructures disponibles")
})
Social & Éducation