A New Shiny Application: Show My Other Packages Which Have Conflicts with `bs4Dash`

A New Shiny Application: Show My Other Packages Which Have Conflicts with `bs4Dash`

When I develop the ‘package’ application, I found that the ‘bs4Dash’ package has some conflicts with sankeywheel and hpackedbubble, which results in a problem that these two packages cann’t be used in bs4Dash framework. So I write another shiny application named ‘otherpackages’ to show these packages’ demo.

You can use the ‘otherpackages’ application at Other Packages: My Other Packages which have conflicts with bs4Dash..

The shiny framework of this application is semantic.dashboard, this framework has the same usage with shinydashboard.

Up to now, there are only two tabs on this application. The application contains three files:

app.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(shiny)
# install.packages("semantic.dashboard")
library(shiny.semantic)
library(semantic.dashboard)
library(plotly)
library(DT)
library(colourpicker)
library(hpackedbubble)
library(sankeywheel)
source("hpackedbubble_tab.R")
source("sankeywheel_tab.R")

ui <- dashboardPage(
dashboardHeader(
logo_align = "center",
logo_path = "https://czxa.top/images/me.png",
dropdownMenu(
type = "notifications",
taskItem("Project progress...", 25, color = "red")
)
),
dashboardSidebar(
side = "left",
visible = FALSE,
size = "",
sidebarMenu(
menuItem(
tabName = "hpackedbubble_tab",
text = "hpackedbubble",
icon = icon("american sign language interpreting icon")
),
menuItem(
tabName = "sankeywheel_tab",
text = "sankeywheel",
icon = icon("sliders horizontal icon")
)
)
),
dashboardBody(
tabItems(
hpackedbubble_tab,
sankeywheel_tab
)
)
)

server <- function(input, output) {
output$shinybubble <- renderHpackedbubble({
hpackedbubble(
cat = CO2$continent,
name = CO2$country,
value = CO2$CO2,
theme = input$theme3,
title = input$title3,
titleAlign = input$titleAlign3,
titleSize = input$titleSize3,
titleColor = input$titleColor3,
subtitle = input$subtitle3,
subtitleAlign = input$subtitleAlign3,
subtitleSize = input$subtitleSize3,
subtitleColor = input$subtitleColor3,
pointFormat = input$pointFormat3,
split = input$split3,
packedbubbleMinSize = input$packedbubbleMinSize3,
packedbubbleMaxSize = input$packedbubbleMaxSize3,
packedbubbleZMin = input$packedbubbleZMin3,
packedbubbleZmax = input$packedbubbleZmax3,
gravitational = input$gravitational3,
seriesInteraction = input$seriesInteraction3,
dragBetweenSeries = input$dragBetweenSeries3,
parentNodeLimit = input$parentNodeLimit3,
dataLabels = input$dataLabels3,
dataLabelsformat = input$dataLabelsformat3,
dataLabelsFilter = input$dataLabelsFilter3,
dataLabelsColor = input$dataLabelsColor3,
height = input$height3,
width = input$width3
)
})
output$shinysankey <- renderSankeywheel({
sankeywheel(from = sankeydf$from, to = sankeydf$to, weight = sankeydf$weight,
theme = input$theme2,
type = input$type2,
seriesName = input$seriesName2,
title = input$title2,
titleAlign = input$titleAlign2,
titleSize = input$titleSize2,
titleColor = input$titleColor2,
subtitle = input$subtitle2,
subtitleAlign = input$subtitleAlign2,
subtitleSize = input$subtitleSize2,
subtitleColor = input$subtitleColor2
)
})
}

shinyApp(ui, server)
hpackedbubble_tab.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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
hpackedbubble_tab <- tabItem(
tabName = "hpackedbubble_tab",
fluidRow(
tabBox(
title = "Control Panel", color = "blue", width = 6,
collapsible = FALSE,
tabs = list(
list(menu = "First Tab", content = list(
selectInput(
inputId = "theme3",
label = "Choose A Theme",
choices = c(
"darkgreen",
"darkblue",
"avocado",
"darkunica",
"gray",
"gridlight",
"grid",
"sandsignika",
"sunset"
),
selected = "sunset"
),
textInput(
inputId = "title3",
label = "Input Chart Title: ",
placeholder = "Chart title:",
value = "CARBON EMISSIONS AROUND THE WORLD (2014)"
),
selectInput(
inputId = "titleAlign3",
label = "Title Alignment: ",
choices = c("left", "center", "right"),
selected = "center"
),
textInput(
inputId = "titleSize3",
label = "Title Size: ",
placeholder = "20px",
value = "20px"
),
colourInput(
inputId = "titleColor3",
label = "Title Color: ",
value = "#333333",
showColour = "background",
allowTransparent = TRUE
),
textInput(
inputId = "subtitle3",
label = "Input Subtitle: ",
placeholder = "https://czxa.top",
value = ""
),
selectInput(
inputId = "subtitleAlign3",
label = "Subtitle Alignment: ",
choices = c("left", "center", "right"),
selected = "center"
),
textInput(
inputId = "subtitleSize3",
label = "Subtitle Size: ",
placeholder = "10px",
value = ""
),
colourInput(
inputId = "subtitleColor3",
label = "Subtitle Color: ",
value = "#666666",
showColour = "background",
allowTransparent = TRUE
),
textInput(
inputId = "pointFormat3",
label = "The HTML of the point's line in the tooltip: ",
placeholder = "<b>{point.name}:</b> {point.y}",
value = "<b>{point.name}:</b> {point.y}m CO<sub>2</sub>"
)
)),
list(menu = "Second Tab", content = list(
selectInput(
inputId = "split3",
label = "Split or not?",
choices = c(0, 1),
selected = 1,
),
textInput(
inputId = "height3",
label = "Height: ",
placeholder = "500px",
value = "500px"
),
textInput(
inputId = "width3",
label = "Width: ",
placeholder = "100%",
value = "100%"
),
textInput(
inputId = "packedbubbleMinSize3",
label = "Minimum bubble size: ",
placeholder = "10%",
value = "50%"
),
textInput(
inputId = "packedbubbleMaxSize3",
label = "Maximum bubble size: ",
placeholder = "120%",
value = "250%"
),
textInput(
inputId = "packedbubbleZMin3",
label = "The minimum for the Z value range: ",
placeholder = 0,
value = 0
),
textInput(
inputId = "packedbubbleZMax3",
label = "The maximum for the Z value range: ",
placeholder = 1000,
value = 1000
),
textInput(
inputId = "gravitational3",
label = "Gravitational const used in the barycenter force of the algorithm: ",
placeholder = "0.0625",
value = "0.0625"
),
selectInput(
inputId = "seriesInteraction3",
label = "Whether series should interact with each other or not: ",
choices = c(0, 1),
selected = 1,
)
)),
list(menu = "Third Tab", content = list(
selectInput(
inputId = "dragBetweenSeries3",
label = "In case of split series, this option allows user to drag and drop points between series, for changing point related series: ",
choices = c(0, 1),
selected = 1,
),
selectInput(
inputId = "parentNodeLimit3",
label = "Whether bubbles should interact with their parentNode to keep them inside: ",
choices = c(0, 1),
selected = 1,
),
selectInput(
inputId = "dataLabels3",
label = "Options for the series data labels, appearing next to each data point. 1 means to true, 0 means to false: ",
choices = c(0, 1),
selected = 1,
),
textInput(
inputId = "dataLabelsformat3",
label = "Data labels' format: ",
placeholder = "{point.name}",
value = "{point.name}"
),
textInput(
inputId = "dataLabelsFilter3",
label = "Show data labels while 'value' larger than dataLabelsFilter. defaults to 250: ",
placeholder = 100,
value = 100
),
colourInput(
inputId = "dataLabelsColor3",
label = "Data Labels' Color: ",
value = "black",
showColour = "background",
allowTransparent = TRUE
)
))
)
),
box(
title = "hpackedbubble",
color = "blue", width = 10,
hpackedbubbleOutput("shinybubble", height = "500px")
)
)
)
sankeywheel_tab.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
sankeywheel_tab <- tabItem(
tabName = "sankeywheel_tab",
fluidRow(
tabBox(
title = "Control Panel", color = "blue", width = 5,
collapsible = FALSE,
tabs = list(
list(menu = "First Tab", content = list(
selectInput(
inputId = "theme2",
label = "Choose a theme: ",
choices = c("darkgreen",
"darkblue",
"avocado",
"darkunica",
"gray",
"gridlight",
"grid",
"sandsignika",
"sunset"),
selected = "avocado"
),
selectInput(
inputId = "type2",
label = "Choose chart type:",
choices = c("sankey",
"dependencywheel"),
selected = "dependencywheel"
),
textInput(
inputId = "title2",
label = "Input Chart Title: ",
placeholder = "Word Cloud",
value = "Example Charts"
),
selectInput(
inputId = "titleAlign2",
label = "Title Alignment: ",
choices = c("left", "center", "right"),
selected = 'center'
),
textInput(
inputId = "titleSize2",
label = "Title Size: ",
placeholder = "20px",
value = "20px"
),
colourInput(
inputId = "titleColor2",
label = "Title Color: ",
value = "#333333",
showColour = "background",
allowTransparent = TRUE
),
textInput(
inputId = "subtitle2",
label = "Input Subtitle ",
placeholder = "https://czxa.top",
value = ""
),
selectInput(
inputId = "subtitleAlign2",
label = "Subtitle Alignment: ",
choices = c("left", "center", "right"),
selected = "center"
),
textInput(
inputId = "subtitleSize2",
label = "Subtitle Size: ",
placeholder = "10px",
value = ""
),
textInput(
inputId = "seriesName2",
label = "Series name: ",
placeholder = "demo series",
value = "demo series"
)
)),
list(menu = "Second Tab", content = list(
colourInput(
inputId = "subtitleColor2",
label = "Subtitle Color: ",
value = "#666666",
showColour = "background",
allowTransparent = TRUE
)
))
)
),
box(
title = "sankeywheel",
color = "blue", width = 11,
sankeywheelOutput("shinysankey", height = "500px")
)
)
)

Happy using!

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×