inst/app/ui.R

navbarPage(
  HTML("<a href=\"https://gitlab.com/doana-r/butinagepei\"><img src=\"logo.png\" alt=\"butinagepei\" class=\"logo\"> </a> Butinage Péi"),
  id="nav",
  collapsible = TRUE,
  windowTitle = "Butinage Péi",


# Map ---------------------------------------------------------------------


  tabPanel(
    "Carte interactive",
    value = "map",
    icon = icon("globe"),

    div(class="outer",

      tags$head(
        includeCSS("styles.css"), # Include custom CSS
        tags$link(rel = "shortcut icon", href = "logo.png") # favicon
      ),


      # If not using custom CSS, set height of leafletOutput to a number instead of percent
      leafletOutput("map", width="100%", height="100%"),

      # Shiny versions prior to 0.11 should use class = "modal" instead.
      absolutePanel(id = "controls", class = "panel panel-default", fixed = FALSE,
        draggable = TRUE, top = 60, left = "auto", right = 20, bottom = "auto",
        width = 330, height = "auto",

        p(),

        ## species ####
        selectInput(
          "especes",
          label = strong("Choix de la plante"),
          choices = list(`Indigène` = sort(unique(suivi$vernaculaire[suivi$statut == "Indigène"])), Exotique = sort(unique(suivi$vernaculaire[suivi$statut == "Exotique"]))),
          selected = "Avocat",
          selectize = FALSE,
          size = 5
        ),

        ## period ####
        dateRangeInput( # known issue : the user can set the end date before the start date
          "periode",
          label = strong("Choix de la période"),
          format = "dd/mm/yyyy",
          start = min(suivi$date),
          end = max(suivi$date),
          min = min(suivi$date),
          max = max(suivi$date),
          startview = "year",
          separator = "à",
          weekstart = 1,
          language = "fr"
        ),

        ## temporal evolution ####
        p(strong("Evolution temporelle des observations")),
        plotOutput("temporel", height = 250),

        br(),
        ## map settings ####
        p(strong("Paramètres de la carte")),
        checkboxInput("cluster", label = "Regrouper les observations rapprochées", value = TRUE)
      ),

      tags$div(id = "cite",
        'Données participatives du groupe : ', a("Observatoire des interactions plantes/abeilles à La Réunion", href = "https://www.facebook.com/groups/375179256507926/?multi_permalinks=571229623569554%2C570660930293090%2C570660510293132%2C570658770293306&notif_id=1594800619596841&notif_t=group_activity&ref=notif")
      )
    ) # end of div outer

  ),



# Data --------------------------------------------------------------------



  tabPanel(
    "Données",
    value = "data",
    icon = icon("table"),
    downloadButton("export", label = "Télécharger les données"),
    dataTableOutput("suivitable", height = 500)
  ),


# About -------------------------------------------------------------------


  tabPanel(
    "A propos",
    value = "about",
    icon = icon("info-circle"),
    includeMarkdown("apropos.md")
  )
)
anna-doizy/butinagepei documentation built on Feb. 19, 2021, 4:59 p.m.