-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui.R
96 lines (78 loc) · 3.6 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
# ui.R
library(shinydashboard)
library(googleVis)
library(leaflet)
## Dashboard title setup
header <- dashboardHeader(title = "Taiwan Industry Cluster Explorer", titleWidth = 400)
## Dashboard body setup
body <- dashboardBody(
## Top row
fluidRow(
## Menu panel
box(
width = 3,
height = 600,
helpText("Use menus below to select analysis type and filter data."),
## Analysis type menu
selectInput('analysisType', "Analysis",
c("Economic Dynamism", "Employment Growth Composition", "Employment Share & Specialization",
"Employment Growth & Specialization", "Revenue Growth & Specialization")),
## Cluster type menu
selectInput('clusterType', "Cluster type",
c("All", "Traded only",
"Local only")),
## Region dropdown menu
uiOutput("region"),
## HTML file for analysis description
br(),
uiOutput('htmlfile'),
br(),
br()
),
## Bubble chart panel
box(
width = 6,
height = 600,
title = textOutput("analysis_title"),
helpText("Hover over a bubble for tooltip. Left-click and drag to pan around
the chart horizontally and vertically. Right-click to reset to default view."),
htmlOutput("bubble")
),
## Leaflet map panel
box(
width = 3,
height = 600,
title = textOutput("region_title"),
helpText('Use +/- buttons or mouse wheel to zoom. Left-click and drag to pan horizontally and vertically.'),
leafletOutput("twmap")
)
),
fluidRow(
box(
width = 12,
br(),
p(strong("Taiwan Industry Cluster Explorer"), "is a project of the",
tags$a(href="http://tisc.nccu.edu.tw/", "Taiwan Institute for Strategy and Competitiveness"),
"(TISC) at", tags$a(href="http://www.nccu.edu.tw/?locale=en", "National Chengchi University"),
"in Taipei. It is based on research conducted by Dr. Janet Tan, with coaching and
assistance provided by Prof. Michael Porter's team at the",
tags$a(href="http://www.isc.hbs.edu/Pages/default.aspx", "Institute of Strategy and Competitiveness"),
"at Harvard Business School. This project utilizes census data from 2006 and 2011 acquired
from the Directorate General of Budget, Accounting, and Statistics."),
p("The underlying data is subject to certain government limitations -- please consult TISC
prior to reproduction."),
p("Have questions? Want to collaborate? Please contact Dr. Tan (janettan.liu@gmail.com)
or Seward Lee (sewardlee337@gmail.com). Click ",
tags$a(href= "https://github.com/sewardlee337/industry-cluster-explorer", "here"), " to see the GitHub
repository for this project."),
br()
)
)
)
## Render entire dashboard
dashboardPage(
skin = "purple",
header,
dashboardSidebar(disable = TRUE),
body
)