-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.R
84 lines (59 loc) · 2.63 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
library(shinydashboard)
library(d3heatmap)
ui <- dashboardPage(
dashboardHeader(title = "Twitter Visual"),
## Sidebar content
dashboardSidebar(
sidebarMenu(
menuItem("Spatial", tabName = "Spatial", icon = icon("th")),
menuItem("SocialNet", tabName = "net", icon = icon("dashboard")),
menuItem("WordCloud", tabName = "WordCloud", icon = icon("dashboard"))
# menuItem("Heatmap", tabName = "Heatmap", icon = icon("th"))
)
),
## Body content
dashboardBody(
tabItems(
tabItem(tabName = "Heatmap",
mainPanel(d3heatmapOutput("heatmap"))
),
tabItem(tabName = "net",
sidebarLayout(
sidebarPanel(
selectInput("group", "group:",
choices=c("language","gender")),
hr(),
helpText("Select groups"),width = 2
),
mainPanel(forceNetworkOutput( "net", width = "130%", height = "400px"))
)),
tabItem(tabName = "WordCloud",
fluidPage(wordcloud2Output("cloudmap"))
),
# First tab content
tabItem(tabName = "Spatial",
div(class="outer",
tags$head(
# Include our custom CSS
includeCSS("styles.css"),
includeScript("gomap.js")
),
leafletOutput("map", width="100%", height="100%"),
# Shiny versions prior to 0.11 should use class="modal" instead.
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = 60, left = "auto", right = 20, bottom = "auto",
width = 330, height = "auto",
dateRangeInput('dateRange',
label = 'Date Range',
start = paste(min(train$Time)), end = paste(max(train$Time))),
selectInput('cats', 'Sentiment', unique(train$Category), multiple=TRUE,
selectize=TRUE,selected = "positive")
),
tags$div(id="cite",
'Data compiled for ', tags$em('Coming Apart: The State of White America, 1960–2010'), ' by Charles Murray (Crown Forum, 2012).'
)
)
)
)
)
)