-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
97 lines (75 loc) · 3 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
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
library(tidyverse)
library(tidycensus)
library(shiny)
library(leaflet)
library(sf)
library(DT)
library(plotly)
library(scales)
library(here)
ui <- fluidPage(
fluidRow(
#define app header
div(#define style that lays out subdivs horizontally and assigns percentages to width
style = "height:100%; max-width:350px; overflow: hidden; padding: 10px; vertical-align: bottom",
div(style = "float: left; width:230px; padding: 5px",
span(
a(style = "font-size: 25px; font-family: roboto, sans-serif; font-weight: 700; color: #2B2B2B; text-decoration: none;",
href = "https://ctompkins.netlify.app/", "Conor Tompkins")
)
),
div(style = "float: left; width:50px; padding: 5px",
span(
a(style = "font-size: 16px; font-family: roboto, sans-serif; font-weight: 400; color: #2B2B2B; text-decoration: none;",
href = "https://ctompkins.netlify.app/#posts", "Posts")
)
),
div(style = "float: left; width:50px; padding: 5px",
span(
a(style = "font-size: 16px; font-family: roboto, sans-serif; font-weight: 400; color: #2B2B2B; text-decoration: none;",
href = "https://ctompkins.netlify.app/apps/app-gallery/", "Apps")
)
)
)
),
fluidRow(
column(width = 3,
#user selects topic
selectizeInput(inputId = "data_source",
label = "Choose topic",
choices = c("Household Income" = "household_income",
"Housing Units" = "housing",
"Commute Mode" = "commute_modes",
"Home Ownership" = "owner_vs_renter",
"Owner-estimated home value" = "owner_estimated_home_value")),
#user selects years in scope
sliderInput(inputId = "year_slider",
label = "Year",
value = c(2010, 2019),
min = 2010,
max = 2019,
sep = ""),
#user can select which categories are in scope
uiOutput("category_filter"),
uiOutput("pct_toggle"),
uiOutput("toggle_moe")
),
column(width = 9,
fluidRow(
#shows leaflet map
leafletOutput("map",
height = "300px")
),
fluidRow(
tabsetPanel(
#shows graph
tabPanel(title = "Graph",
plotlyOutput("plotly_graph")),
#shows summary table
tabPanel(title = "Table",
DT::dataTableOutput("summary_table"))
)
)
)
)
)