-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
65 lines (61 loc) · 2.76 KB
/
ui.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# ui.R
library(shiny)
library(shinythemes)
source("functions.R")
shinyUI(
fluidPage(
theme = shinytheme("flatly"),
navbarPage("Pokémon Database",
tabPanel("Search Database",
sidebarPanel(
h3("Pokémon Search"),
textInput("search_input", "Search:"),
selectInput("filter_category", "Filter by Type:",
choices = c("None", unique(data$Type1)),
selected = "None"
),
selectInput("filter_category_2", "Legendary Pokémon:",
choices = c("None", unique(data$Legendary)),
selected = "None"
),
selectInput("filter_category_3", "Pokémon Generation:",
choices = c("None", unique(data$Generation)),
selected = "None"
),
actionButton("search_button", "Search"),
),
mainPanel(
tableOutput("search_results")
)
),
tabPanel("Boxplot",
sidebarLayout(
sidebarPanel(
h2(""),
selectInput("selected_pokemon", "Select Pokémon:", choices = unique(data$Name)),
selectInput("selected_statistic", "Select Statistic:",
choices = c("HP", "Attack", "Defense", "Speed"),
selected = "HP"),
actionButton("submit_button", "Submit"),
),
mainPanel(
plotOutput("boxplot")
)
)
),
tabPanel("Battle Guide",
sidebarLayout(
sidebarPanel(
h2("Battle Guide"),
selectInput("selected_pokemon_battle", "Select Pokémon:", choices = unique(data$Name)),
actionButton("recommend_button", "Recommend Pokémon"),
),
mainPanel(
textOutput("battle_recommendations"),
DT::dataTableOutput("all_pokemon_table")
)
)
)
)
)
)