inst/shiny/ui.R

shinyThemeToUse <- shinytheme("cerulean") # alternative: flatly

shinyUI(
  
  navbarPage(
    theme = shinyThemeToUse,
    title = "polmineR",
    id = "polmineR",
    
    header = tags$head(shinyjs::useShinyjs()),
    
    tabPanel(
      "corpus",
      sidebarLayout(
        sidebarPanel = sidebarPanel(corpusUiInput()),
        mainPanel = mainPanel(
          tabsetPanel(
            tabPanel("info", uiOutput('corpus_info')),
            tabPanel("summary", DT::dataTableOutput('info_table'))
          )
        )
      )
    ),
    
    
    tabPanel(
      "partition",
      sidebarLayout(
        sidebarPanel = sidebarPanel(partitionUiInput()),
        mainPanel = mainPanel(partitionUiOutput())
      )),
    
    tabPanel(
      "kwic",
      sidebarLayout(
        sidebarPanel = sidebarPanel(kwicUiInput(drop = "p_attribute")),
        mainPanel = mainPanel(kwicUiOutput())
      )
    ),
    
    tabPanel(
      "cooccurrences",
      sidebarLayout(
        sidebarPanel = sidebarPanel(cooccurrencesUiInput()),
        mainPanel = mainPanel(cooccurrencesUiOutput())
      )
    ),
    
    tabPanel(
      "features",
      sidebarLayout(
        sidebarPanel = sidebarPanel(featuresUiInput()),
        mainPanel = mainPanel(featuresUiOutput())
      )
    ),
    
    tabPanel(
      "count",
      sidebarLayout(
        sidebarPanel = sidebarPanel(countUiInput()),
        mainPanel = mainPanel(countUiOutput())
      )
    ),
    
    
    
    tabPanel(
      "dispersion",
      sidebarLayout(
        sidebarPanel = sidebarPanel(dispersionUiInput()),
        mainPanel = mainPanel(
          tabsetPanel(
            tabPanel("Table", DT::dataTableOutput('dispersion_table')),
            tabPanel("Plot", plotOutput('dispersion_plot'))
          )
        )
      )
    ),
    
    tabPanel(
      "read",
      fluidPage(
        fluidRow(
          column(2),
          column(8, readUiOutput()),
          column(2)
        )
      )
    )
    
  )
)

Try the polmineR package in your browser

Any scripts or data that you put into this service are public.

polmineR documentation built on Nov. 2, 2023, 5:52 p.m.