Guest User

Untitled

a guest
Jul 16th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. ##Dashboard Header-------------
  2. header <- dashboardHeader(
  3. title = "My Dashboard")
  4.  
  5. ##Dashboard Sidebar----------------
  6. sidebar <- dashboardSidebar(
  7. sidebarMenu(
  8. menuItem("Dashboard",tabName = "dashboard",
  9. menuSubItem('Applicants',
  10. tabName = 'applicants',
  11. icon = icon("user", lib = "glyphicon")),
  12. menuSubItem('Demographics',
  13. tabName = 'demographics',
  14. icon = icon("globe"))
  15. ),
  16. menuItem("Job Positions", tabName = "jobposition",
  17. menuSubItem('Associate',
  18. tabName = 'associate',
  19. icon = icon('address-card'))
  20. )
  21. )
  22. )
  23.  
  24. ##Dashboard Sidebar----------------
  25. sidebar <- dashboardSidebar(
  26. sidebarMenu(
  27. menuItem("Dashboard",tabName = "dashboard",
  28. menuSubItem('Applicants',
  29. tabName = 'applicants',
  30. icon = icon("user", lib = "glyphicon")),
  31. menuSubItem('Demographics',
  32. tabName = 'demographics',
  33. icon = icon("globe"))
  34. ),
  35. menuItem("Job Positions", tabName = "jobposition",
  36. menuSubItem('Associate',
  37. tabName = 'associate',
  38. icon = icon('address-card'))
  39. )
  40. )
  41. )
  42.  
  43. ##Dashboard Body-------------------
  44. body <- dashboardBody(
  45. tabItems(
  46. # Dashboard Tab Content
  47. tabItem(tabName = "applicants",
  48. fluidRow(
  49. #Requires Attention Value Box
  50. valueBoxOutput("attentionbox"),
  51. #Applicant to Hire Avg TIme
  52. valueBoxOutput("hireAvgTime"),
  53. #Proportion of Women
  54. valueBoxOutput("WomenPercent"))
  55. ,
  56. fluidRow(
  57. column(width = 12,
  58. #Applicant Stage Plot
  59. box(
  60. title = ("Applicant Stages"),
  61. status = "warning",
  62. plotlyOutput("stageplot")
  63. ),
  64. #Avg Skill Score Plot
  65. box(
  66. title = ("Average Skill Score"),
  67. status = "warning",
  68. plotlyOutput("AvgSkillScore")
  69. ))
  70. )
  71. ),
  72. tabItem(tabname = 'demographics',
  73. fluidRow(
  74. tabBox(
  75. title = "",
  76. id = "tabset1", height = "250px",
  77. tabPanel("Gender", plot_ly(masterFemale, x = ~Stage, y = ~Female, type = 'bar', name = 'Female', hoverinfo = 'y') %>%
  78. add_trace(y = masterFemale$Male,
  79. name = 'Male',
  80. hoverinfo = 'y') %>%
  81. layout(
  82. yaxis = list(title = 'Number of Applicants'),
  83. barmode = 'group',
  84. margin = list(b = 170)) %>%
  85. config(displayModeBar = F)),
  86. tabPanel("Country", plot_ly(masterCan, x = ~Stage, y = ~CAN, type = 'bar', name = 'CAN', hoverinfo = 'y') %>%
  87. add_trace(y = ~US, name = 'US', hoverinfo = 'y') %>%
  88. layout(
  89. yaxis = list(title = 'Number of Applicants'),
  90. barmode = 'group',
  91. margin = list(b = 170)) %>%
  92. config(displayModeBar = F)) #,
  93. #tabPanel("Education")
  94. ))
  95.  
  96. ),
  97.  
  98. # Associate Tab Content
  99. tabItem(tabName = "associate",
  100. fluidPage(
  101. box(title = "Card Information", height = 300, "Text"),
  102.  
  103. #Main Box for Candidate
  104. uiOutput("candidates")
  105. )
  106. )
  107. )
  108. )
  109.  
  110. ui <- dashboardPage(
  111. skin = "yellow",
  112. header,
  113. sidebar,
  114. body
  115. )
  116. shinyApp(ui, server)
Add Comment
Please, Sign In to add comment