Welcome back for the 14th day of the #packagecalendar, today we will be taking a look at the networkdata package by David Schoch. The networkdata package provides over 2000 networks from almost 1000 datasets at the time of writing.
The package is not yet available from CRAN but can be downloaded with
The package itself is fairly straightforward. All the datasets come in
All the datasets along with metadata can be seen using the
library(networkdata) library(reactable) reactable(show_networks())
movie_751 contains the interactions of characters in the movie “White Christmas” (1954).
We can use the ggraph package to plot the network
library(ggraph) ggraph(movie_751, layout = "circle") + geom_edge_link(aes(alpha = weight), color = "firebrick") + geom_node_label(aes(label = name)) + theme( legend.position = "none" )