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 - R Tutorial
From the course: R: Interactive Visualizations with htmlwidgets
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
What is the visNetwork library?9m 57s
-
Create basic network diagrams7m 35s
-
Style visNetwork graph6m 27s
-
Use visNetwork with igraph5m 29s
-
Choose graph layouts and embeddings5m 5s
-
Cluster nodes in visNetwork using groups3m 56s
-
Add legends to visNetwork4m 51s
-
Extract click information from visNetwork8m 54s
-
-
-