-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.R
More file actions
83 lines (63 loc) · 3.04 KB
/
server.R
File metadata and controls
83 lines (63 loc) · 3.04 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
# Define server logic required to draw the map for the main panel
shinyServer(function(input, output, session) {
## This section is for all the high level stats that are displayed in the sidebar ----
juris_profile_server('profile',
place = reactive(input$Place),
year = reactive(input$Year))
download_data_server('download',
place = reactive(input$Place),
year = reactive(input$Year))
## This section is for all the data on the Main Overview Page ----
home_tab_server("home", place = reactive({input$Place}))
# people tab ----
## Age, Race & Ethnicity, Health Coverage and Disability Status
people_tab_server("people",
census_data = census_data,
place = reactive(input$Place),
year = reactive(input$Year),
numeric_variables = numeric_variables,
percent_variables = percent_variables)
# house section ----
## Housing Type, Home Values, Monthly Rental Cost and Home Ownership
house_tab_server(id = "house",
census_data = census_data,
place = reactive(input$Place),
year = reactive(input$Year),
numeric_variables = numeric_variables,
percent_variables = percent_variables)
# RDI ----
rdi_tab_server("rdi",
shape = community.shape,
place = reactive({input$Place}),
disp_risk_shape = disprisk.shape)
# link from RDI to Race & Ethnicity tab in People/demographics
observeEvent(input$`rdi-link_re`, {
updateTabsetPanel(session, inputId = 'Navbar', selected = 'people')
updateTabsetPanel(session, inputId = input$`people-tabset`, selected = input$`people-re`) #'tab_people''re'
})
# link from RDI to Households and Housing
observeEvent(input$`rdi-link_hh`, {
updateTabsetPanel(session, inputId = 'Navbar', selected = 'housing')
updateTabsetPanel(session, inputId = input$`house-tabset`, selected = input$`house-units`)
})
# briefcase section ----
## Educational Attainment, Occupation/Industry of residents, Median HH Income
briefcase_tab_server(id = "briefcase",
census_data = census_data,
place = reactive(input$Place),
year = reactive(input$Year),
numeric_variables = numeric_variables,
percent_variables = percent_variables)
# car section ----
## Mode Share, Travel Time and Time of Departure for Work, Vehicles Available
car_tab_server(id = "car",
census_data = census_data,
place = reactive(input$Place),
year = reactive(input$Year),
numeric_variables = numeric_variables,
percent_variables = percent_variables)
# wrench section ----
## TIP, RTP
wrench_tab_server(id = "wrench",
place = reactive(input$Place))
})