您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

58 行
2.0KB

  1. #
  2. # This is the user-interface definition of a Shiny web application. You can
  3. # run the application by clicking 'Run App' above.
  4. #
  5. # Find out more about building applications with Shiny here:
  6. #
  7. # http://shiny.rstudio.com/
  8. #
  9. library(shiny)
  10. # Define UI for application that draws a histogram
  11. shinyUI(fluidPage(
  12. # Application title
  13. titlePanel("Surname Navigator"),
  14. # Sidebar with a slider input for number of bins
  15. sidebarLayout(
  16. sidebarPanel(width = 3,
  17. selectInput('user', label = "Your Name", choices = c('Ryan', 'Garrick')),
  18. textInput('baby', label = 'Baby Name', value = 'August'),
  19. selectInput('cluster', label = "Name Combo",
  20. choices = c("All", "Favorites - Ryan", "Favorites - Garrick", CLUSTER_NAMES)),
  21. selectizeInput('surname', label = 'Surname', choices = surnames.final$surname),
  22. actionButton('next_name', label = 'Next', width = '32%', class = 'btn-primary'),
  23. actionButton('random_name', label = 'Random', width = "32%", class = 'btn-info'),
  24. actionButton("like", label = 'Like!', width = "32%",
  25. icon = icon("thumbs-o-up"), class = 'btn-success')
  26. ),
  27. # Main Panel
  28. mainPanel(width = 9,
  29. tabsetPanel(
  30. tabPanel('Name Info',
  31. tags$h1(htmlOutput('t_header', inline = TRUE)),
  32. tags$h3(htmlOutput('t_othername', inline = TRUE)),
  33. tags$hr(),
  34. fluidRow(
  35. column(6, plotOutput("p_radar", height = '200px')),
  36. column(6, tags$p(htmlOutput('t_body', inline = TRUE), class = "h3"))
  37. ),
  38. tags$hr(),
  39. fluidRow(
  40. column(10,
  41. tags$h3('Definition'),
  42. htmlOutput('forebears_name'),
  43. tags$p(htmlOutput('link_forebears'), inline = TRUE)
  44. )
  45. )
  46. ),
  47. tabPanel("Explore Group",
  48. dataTableOutput('t_surnames'))
  49. )
  50. )
  51. )
  52. ))