-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathour_ui.R
More file actions
169 lines (148 loc) · 8.56 KB
/
our_ui.R
File metadata and controls
169 lines (148 loc) · 8.56 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
library("shiny")
library("dplyr")
# user interface that the user can filter data that they want to see
our_ui <- navbarPage("Seattle Gentrification",
# Tab 0: gives an overview in text of
# 1) the questions this project is trying to find answers for
# 2) sets of data that this project deals with
# 3) how this project is going to use to the data sets to address
# the questions
tabPanel(title = "Introduction",
includeHTML("introduction.html")
),
# Tab 1: Comparing Seattle Data with corresponding National Data
# the user can select two sets of inputs: Rate/Percentage, House/Rent
# the App will then plot the data accordingly of the Seattle
# Housing Listing/ Rent in terms of Rate/Percentage,
# depending on the user's input
tabPanel(title = "Seattle vs National",
fluidPage(
sidebarLayout(
sidebarPanel(
radioButtons(
inputId = "var_type",
label = "Choose Rate or Percentage Change",
choices = c("Rate", "Percentage"),
selected = "Rate"
),
radioButtons(
inputId = "data_type",
label = "Choose A Type of Data",
choices = c("House", "Rent"),
selected = "House"
)
),
mainPanel(
plotOutput("us_plot"),
textOutput("us_summary")
)
)
)
),
# Tab 2: showing two line representations of trends in
# Seattle house listing AND rent in terms of
# either Rate or Percentage increase, depending on user's input
tabPanel(title = "Trends in Seattle Housing and Rental Prices",
fluidPage(
sidebarLayout(
sidebarPanel(
radioButtons(
inputId = "var_type2",
label = "Choose Rate or Percentage Change",
choices = c("Rate", "Percentage"),
selected = "Rate"
)
),
mainPanel(
plotOutput("seattle_plot"),
textOutput("seattle_summary")
)
)
)
),
# Tab 3: Comparing Seattle Data with corresponding data set of
# the rest of Washington state
# the user can select two sets of inputs: Rate/Percentage, House/Rent
# the App will then plot the data accordingly of the Seattle
# Housing Listing/ Rent in terms of Rate/Percentage,
# depending on the user's input
tabPanel(title = "Seattle vs Rest of Washington",
fluidPage(
sidebarLayout(
sidebarPanel(
radioButtons(
inputId = "var_type3",
label = "Choose Rate or Percentage Change",
choices = c("Rate", "Percentage"),
selected = "Rate"
),
radioButtons(
inputId = "data_type3",
label = "Choose A Type of Data",
choices = c("House", "Rent"),
selected = "House"
)
),
mainPanel(
plotOutput("washington_plot"),
textOutput("washington_summary")
)
)
)
),
# Tab 4: Comparing Seattle Data with corresponding data set of
# the other representative cities in the U.S - the user can choose among
# New York, San Francisco, Chicago, Huston, Washington, Charlotte
# the user can select two sets of inputs: Rate/Percentage, House/Rent
# the App will then plot the data accordingly of the Seattle
# Housing Listing/ Rent in terms of Rate/Percentage,
# depending on the user's input
tabPanel(title = "Seattle vs other U.S. Cities",
fluidPage(
sidebarLayout(
sidebarPanel(
radioButtons(
inputId = "var_type4",
label = "Choose Rate or Percentage Change",
choices = c("Rate", "Percentage"),
selected = "Rate"
),
radioButtons(
inputId = "data_type4",
label = "Choose A Type of Data",
choices = c("House", "Rent"),
selected = "House"
),
selectInput(
inputId = "city",
label = "Choose A City",
choices = c("San Francisco", "New York", "Chicago", "Houston", "Washington", "Charlotte"),
selected = "San Francisco"
)
),
mainPanel(
plotOutput("other_city_plot"),
textOutput("other_city_summary")
)
)
)
),
# Tab 5: Conclusion
# includes a conclusion of answers to the questions
# evident by data shown in previous tabs
tabPanel(title = "Conclusion",
includeHTML("conclusion.html")
),
# Tab 6: Resources
# cite the resources where the data was read from
# constrcuted in a R markdown file
tabPanel(title = "Resources",
includeHTML("resource.html")
),
# Tab 7: Authors
# brief introduction of our team memebers
# constrcuted in a R markdown file
tabPanel(title = "Authors",
includeHTML("author.html")
)
)