From the course: R: Interactive Visualizations with htmlwidgets
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Style visNetwork graph - R Tutorial
From the course: R: Interactive Visualizations with htmlwidgets
Style visNetwork graph
- [Instructor] Let's look at how we can customize the appearance of networks inside of visNetwork library. Inside of our Exercise Files we have a file called basic-visNetwork.R. Let's open that up and see what we have here. Again, to decrease the size of my environment because I don't need it for now. At the top of the script file we load the tidyverse library. So, that loads the standard libraries from the tidyverse ecosystem. Of course, because we're creating interactive visNetworks we'll load the visNetwork library as well. Then on line four and five we use read_csv to import our nodes and our edges data. And line eight through 12 we add a new ID column, which allows us to more easily refer to our nodes inside of the edges data frame. We also add a column called label, which will label our nodes when we zoom in on a visualization, and the title column which provides us a tooltip when we hover our cursor over the nodes. Lines 14 through 17 we're creating two new columns, from and…
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
-
(Locked)
Create basic network diagrams7m 35s
-
(Locked)
Style visNetwork graph6m 27s
-
(Locked)
Use visNetwork with igraph5m 29s
-
(Locked)
Choose graph layouts and embeddings5m 5s
-
(Locked)
Cluster nodes in visNetwork using groups3m 56s
-
(Locked)
Add legends to visNetwork4m 51s
-
(Locked)
Extract click information from visNetwork8m 54s
-
-
-