From the course: R: Interactive Visualizations with htmlwidgets

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Cluster nodes in visNetwork using groups

Cluster nodes in visNetwork using groups - R Tutorial

From the course: R: Interactive Visualizations with htmlwidgets

Start my 1-month free trial

Cluster nodes in visNetwork using groups

- [Instructor] VisNetwork relies on column names in the nodes and edges data frame for lots of functionality, including for grouping nodes together. Specifically for the group column. Groups are a really useful feature in visNetwork visualizations; let's see what we can do with them. Let's open visNetwork-groups.R. Let's see what we have here. On line one and two, we load the tidyverse and the visNetwork library. So let's run that code with command enter. Then on line seven and eight we import our nodes and our edges. Now note this data originally comes from Kaggle. If your interested in the data processing that this data went through, you can find all of the code in the data-raw folder. Now let's visualize how this network looks without any groups added. So I'll type visNetwork got nodes, got edges. This is quite a large network and if I used visNetwork's own layout algorithms, it would take a couple of seconds to display on screen for me. So instead I use visIgraphLayout and now…

Contents