Advertisement
Guest User

ui.R

a guest
Dec 27th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1.  
  2. dashboardPage(
  3. dashboardHeader(title = "NHL Face/offs"),
  4. dashboardSidebar(
  5. sidebarMenu(
  6. menuItem(text = "Player Data",
  7. startExpanded = TRUE,
  8. menuSubItem(text = "Data", tabName = "playerData"),
  9. menuSubItem(text = "Running Average", tabName = "playerPlot"),
  10. menuSubItem(text = "Historical H2H", tabName = "h2hData")
  11. ),
  12. menuItem(text = "Team Data",
  13. startExpanded = TRUE,
  14. menuSubItem(text = "Team Comparison", tabName = "teamComparison"),
  15. menuSubItem(text = "Opportunity Breakdown", tabName = "opportunityBreakdown")
  16. ),
  17. menuItem(text = "Calculate H2H Line", tabName = "headToHead"),
  18. selectInput(inputId = "playerSelect", label = "Select a player:", choices = playerChoices, selected = "Auston Matthews"),
  19. selectInput(inputId = "opponentSelect", label = "Select an opponent:", choices = playerChoices, selected = "Mika Zibanejad"),
  20. selectInput("teamSelect", label = "Select which team to view:", choices = teamChoices, selected = "Anaheim Ducks"),
  21. #show the last 2 years as default
  22. dateRangeInput("dateRange", "Date Range:", start = Sys.Date()-730, end = Sys.Date()),
  23. #checkboxGroupInput(inputId = "checkbox", label = "Season Type", choices = c("REG", "POST"), selected = c("REG", "POST")),
  24. numericInput(inputId = "runningAverageValue", label = "Running Average Value:", value = "30")
  25. )
  26. ),
  27. dashboardBody(
  28. tabItems(
  29. tabItem(tabName = "playerData",
  30. DTOutput(outputId = "careerDataPlayer"),
  31. DTOutput(outputId = "yearlyDataPlayer")
  32. ),
  33. tabItem(tabName = "playerPlot",
  34. plotOutput("runningAveragePlot")
  35. ),
  36. tabItem(tabName = "h2hData",
  37. DTOutput(outputId = "h2hData")
  38. ),
  39. tabItem(tabName = "teamComparison",
  40. DTOutput("teamComparisonTBL")),
  41. tabItem(tabName = "opportunityBreakdown",
  42. plotOutput("opportunityBreakdownBoxPlot"),
  43. DTOutput("opportunityBreakdownTable"),
  44. DTOutput("opportunityBreakdown"))
  45. )
  46. )
  47. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement