How to create a second dropdown list based on a group of edges with visNetwork in R?
![Multi tool use Multi tool use](http://sgv.ssvwv.com/sg/ssvwvcomimagb.png)
Multi tool use
Similar in spirit to Groups of edges and select in visNetwork in R, I'm wondering how to create a dropdown list based on the edges as opposed to my nodes using the visNetwork
package. I think this is possible with the visSetSelection
function, but that requires using shiny. I'm delivering the final product in an html rendered from a markdown, not deploying it from a server, so I don't think that's a possibility.
Is there a way to replicate this function outside of shiny? I don't fully understand the terminology in the documentation, but I think what I want to do is similar to the nodeIdSelection
or the selectedBy
arguments in the visOptions
functions where you can create an "HTML select element" but based on the edge list and not on the node list.
The data set for this particular issue is proprietary, but here's some dummy data. I'd like to be able to select by the "weight" of the edge.
library(tidyverse)
library(visNetwork)
nodes <- tibble(id = 1:30)
edges <- tibble(from = c(21:30, 1:20),
to = c(5:20, 21:30, 1:4),
weight = c(rep(1:5, 6)))
visNetwork(nodes, edges) %>%
visIgraphLayout(layout = "layout_in_circle") %>%
visOptions(highlightNearest = list(enabled = T,
hover = T,
degree = 1,
algorithm = "hierarchical"),
nodesIdSelection = T)
What I would expect is an edgesIdSelection
argument in visOptions
but that isn't an option. I assume that piping visSelectEdges
would work, but that only works with shiny and my client doesn't have access to a shiny server. I get that this library was made to make the javascript library accessible through R so I don't expect full functionality--if I can't do this in R with this package (without shiny), I totally get it.
javascript r visnetwork
add a comment |
Similar in spirit to Groups of edges and select in visNetwork in R, I'm wondering how to create a dropdown list based on the edges as opposed to my nodes using the visNetwork
package. I think this is possible with the visSetSelection
function, but that requires using shiny. I'm delivering the final product in an html rendered from a markdown, not deploying it from a server, so I don't think that's a possibility.
Is there a way to replicate this function outside of shiny? I don't fully understand the terminology in the documentation, but I think what I want to do is similar to the nodeIdSelection
or the selectedBy
arguments in the visOptions
functions where you can create an "HTML select element" but based on the edge list and not on the node list.
The data set for this particular issue is proprietary, but here's some dummy data. I'd like to be able to select by the "weight" of the edge.
library(tidyverse)
library(visNetwork)
nodes <- tibble(id = 1:30)
edges <- tibble(from = c(21:30, 1:20),
to = c(5:20, 21:30, 1:4),
weight = c(rep(1:5, 6)))
visNetwork(nodes, edges) %>%
visIgraphLayout(layout = "layout_in_circle") %>%
visOptions(highlightNearest = list(enabled = T,
hover = T,
degree = 1,
algorithm = "hierarchical"),
nodesIdSelection = T)
What I would expect is an edgesIdSelection
argument in visOptions
but that isn't an option. I assume that piping visSelectEdges
would work, but that only works with shiny and my client doesn't have access to a shiny server. I get that this library was made to make the javascript library accessible through R so I don't expect full functionality--if I can't do this in R with this package (without shiny), I totally get it.
javascript r visnetwork
1
This seems like a start-to-finish project that you're asking folks to help with, but it's hard to understand what exactly you're trying to do, especially without seeing any code in either of the 2 languages you've tagged. What have you tried so far?
– camille
Oct 23 at 14:09
add a comment |
Similar in spirit to Groups of edges and select in visNetwork in R, I'm wondering how to create a dropdown list based on the edges as opposed to my nodes using the visNetwork
package. I think this is possible with the visSetSelection
function, but that requires using shiny. I'm delivering the final product in an html rendered from a markdown, not deploying it from a server, so I don't think that's a possibility.
Is there a way to replicate this function outside of shiny? I don't fully understand the terminology in the documentation, but I think what I want to do is similar to the nodeIdSelection
or the selectedBy
arguments in the visOptions
functions where you can create an "HTML select element" but based on the edge list and not on the node list.
The data set for this particular issue is proprietary, but here's some dummy data. I'd like to be able to select by the "weight" of the edge.
library(tidyverse)
library(visNetwork)
nodes <- tibble(id = 1:30)
edges <- tibble(from = c(21:30, 1:20),
to = c(5:20, 21:30, 1:4),
weight = c(rep(1:5, 6)))
visNetwork(nodes, edges) %>%
visIgraphLayout(layout = "layout_in_circle") %>%
visOptions(highlightNearest = list(enabled = T,
hover = T,
degree = 1,
algorithm = "hierarchical"),
nodesIdSelection = T)
What I would expect is an edgesIdSelection
argument in visOptions
but that isn't an option. I assume that piping visSelectEdges
would work, but that only works with shiny and my client doesn't have access to a shiny server. I get that this library was made to make the javascript library accessible through R so I don't expect full functionality--if I can't do this in R with this package (without shiny), I totally get it.
javascript r visnetwork
Similar in spirit to Groups of edges and select in visNetwork in R, I'm wondering how to create a dropdown list based on the edges as opposed to my nodes using the visNetwork
package. I think this is possible with the visSetSelection
function, but that requires using shiny. I'm delivering the final product in an html rendered from a markdown, not deploying it from a server, so I don't think that's a possibility.
Is there a way to replicate this function outside of shiny? I don't fully understand the terminology in the documentation, but I think what I want to do is similar to the nodeIdSelection
or the selectedBy
arguments in the visOptions
functions where you can create an "HTML select element" but based on the edge list and not on the node list.
The data set for this particular issue is proprietary, but here's some dummy data. I'd like to be able to select by the "weight" of the edge.
library(tidyverse)
library(visNetwork)
nodes <- tibble(id = 1:30)
edges <- tibble(from = c(21:30, 1:20),
to = c(5:20, 21:30, 1:4),
weight = c(rep(1:5, 6)))
visNetwork(nodes, edges) %>%
visIgraphLayout(layout = "layout_in_circle") %>%
visOptions(highlightNearest = list(enabled = T,
hover = T,
degree = 1,
algorithm = "hierarchical"),
nodesIdSelection = T)
What I would expect is an edgesIdSelection
argument in visOptions
but that isn't an option. I assume that piping visSelectEdges
would work, but that only works with shiny and my client doesn't have access to a shiny server. I get that this library was made to make the javascript library accessible through R so I don't expect full functionality--if I can't do this in R with this package (without shiny), I totally get it.
javascript r visnetwork
javascript r visnetwork
edited 7 hours ago
![](https://lh3.googleusercontent.com/-aHCl4es9KMc/AAAAAAAAAAI/AAAAAAAAEXM/lSep8VSKwxw/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-aHCl4es9KMc/AAAAAAAAAAI/AAAAAAAAEXM/lSep8VSKwxw/photo.jpg?sz=32)
priyanshi srivastava
554214
554214
asked Jun 6 at 15:47
![](https://i.stack.imgur.com/0sEMd.jpg?s=32&g=1)
![](https://i.stack.imgur.com/0sEMd.jpg?s=32&g=1)
Ben G
705220
705220
1
This seems like a start-to-finish project that you're asking folks to help with, but it's hard to understand what exactly you're trying to do, especially without seeing any code in either of the 2 languages you've tagged. What have you tried so far?
– camille
Oct 23 at 14:09
add a comment |
1
This seems like a start-to-finish project that you're asking folks to help with, but it's hard to understand what exactly you're trying to do, especially without seeing any code in either of the 2 languages you've tagged. What have you tried so far?
– camille
Oct 23 at 14:09
1
1
This seems like a start-to-finish project that you're asking folks to help with, but it's hard to understand what exactly you're trying to do, especially without seeing any code in either of the 2 languages you've tagged. What have you tried so far?
– camille
Oct 23 at 14:09
This seems like a start-to-finish project that you're asking folks to help with, but it's hard to understand what exactly you're trying to do, especially without seeing any code in either of the 2 languages you've tagged. What have you tried so far?
– camille
Oct 23 at 14:09
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50724532%2fhow-to-create-a-second-dropdown-list-based-on-a-group-of-edges-with-visnetwork-i%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50724532%2fhow-to-create-a-second-dropdown-list-based-on-a-group-of-edges-with-visnetwork-i%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Jq0jC,GA P9Z0CnVZqyNunjSuhiphyy1jXn,CfRFk,ZpB
1
This seems like a start-to-finish project that you're asking folks to help with, but it's hard to understand what exactly you're trying to do, especially without seeing any code in either of the 2 languages you've tagged. What have you tried so far?
– camille
Oct 23 at 14:09