inst/shiny-apps/lupa-summary/ui.R

ui <- fluidPage(
  titlePanel("Résumé graphique des données de constat Loup des parcs nationaux 
    alpins", windowTitle = "Lupa-summary"),#titlePanel
  
  sidebarLayout(
    sidebarPanel(
      h3("Parc concerné"),
  radioButtons("Parc", label = "Parc national ",
        choices = list(
          "des Ecrins" = "Parc national des Ecrins", 
          "du Mercantour" = "Parc national du Mercantour",
          "de la Vanoise" = "Parc national de la Vanoise"),
        inline = TRUE),
      h3("Période à analyser"),
  splitLayout(
        dateInput(
          "d_sel_min", label = "Date de début",
          value = Sys.Date() - lubridate::weeks(4),
          min = "2000-01-01", max = Sys.Date() - lubridate::days(1),
          format = "yyyy-mm-dd", startview = "year",
          language = "fr"),
        
        dateInput(
          "d_sel_max", label = "Date de fin",
          value = Sys.Date(),
          min = "2000-01-01", max = Sys.Date(),
          format = "yyyy-mm-dd", startview = "year",
          language = "fr")
      ),
      
  splitLayout(
    h3("A analyser"),
    h3("Référence")
  ),
      
  splitLayout(
    fileInput("constat", label = "fichier de travail (csv séparateur ';')",
      multiple = FALSE,
      accept = c("text/csv",
        "text/comma-separated-values,text/plain",
        ".csv")),
    
    fileInput("reference", label = "fichier de référence (csv séparateur ';')",
      multiple = FALSE,
      accept = c("text/csv",
        "text/comma-separated-values,text/plain",
        ".csv"))
    ),
    
  splitLayout(
    numericInput("eleveur_c", label = "Eleveurs", value = NULL),
    
    numericInput("eleveur_r", label = "ref", value = NULL)
    ),
      
  splitLayout(
    numericInput("commune_c", label = "Commune", value = NULL),
    
    numericInput("commune_r", label = "ref", value = NULL)
    ),
      
  splitLayout(
    numericInput("date_c", label = "Date d'attaque", value = NULL),
    
    numericInput("date_r", label = "ref", value = NULL)
    ),
  
  splitLayout(
    numericInput("nb_anim_tot_c", label = "Nombre d'animaux du troupeau", value = NULL),
    
    numericInput("nb_anim_tot_r", label = "ref", value = NULL)
    ),
  
  splitLayout(
    numericInput("nb_vict_c", label = "Nombre de victimes", value = NULL),
    
    numericInput("nb_vict_r", label = "ref", value = NULL)
    ),
      
  splitLayout(
    numericInput("X_c", label = "Longitude (EPSG 2154)", value = NULL),
    
    numericInput("X_r", label = "ref", value = NULL)
    ),
      
  splitLayout(
    numericInput("Y_c", label = "Latitude (EPSG 2154)", value = NULL),
    
    numericInput("Y_r", label = "ref", value = NULL)
  )
  ),


  mainPanel(
    tabsetPanel(
      
      tabPanel("Nombre d'attaques",
        
        fluidRow(align = "center",
          height = 400,
          plotOutput("barplot_att_tot"))
        ),
      
      tabPanel("Nombre de victimes",
        
        fluidRow(align = "center",
          height = 400,
          plotOutput("barplot_vict_tot"))
      ),
      
      tabPanel("Attaques par communes",
        
        fluidRow(align = "center",
          height = 400,
          plotOutput("barplot_att_com"))
      ),
      
      tabPanel("Victimes par communes",
        
        fluidRow(align = "center",
          height = 400,
          plotOutput("barplot_vict_com"))
      ),
      
      tabPanel("Carte attaques",
        
        fluidRow(align = "center",
          height = 400,
          plotOutput("map_att_com"))
      ),
      
      tabPanel("Carte victimes",
        
        fluidRow(align = "center",
          height = 400,
          plotOutput("map_vict_com"))
      ),
      
      tabPanel("Rapport",
        
        fluidRow(align = "center",
          height = 400,
          h4("L'ensemble des données calculées sont considérées comme valides."),
          downloadButton("report", "Générer le rapport"))
      ))#tabPanel,
      
#      tabPanel("Cartographie attaques",
#        fluidRow(
#          column(6,plotOutput("plot_com_att")),
#          column(6,plotOutput("plot_com_att_evol"))
#        )
#      ),
      
#      tabPanel("Cartographie victimes",
#        fluidRow(
#          column(6,plotOutput("plot_com_vict")),
#          column(6,plotOutput("plot_com_vict_evol"))
#          )
#        )
      
      )# mainPanel
      )#sidebarLayout
  )#fluidPage
remymoine/Lupa documentation built on Aug. 5, 2020, 12:07 a.m.