Plotting important vertices
Lastly, we'll visualize the graph with the size of the vertex corresponding to centrality. However, we already know the graph is highly skewed, so there will likely be a lot of visual noise. So next, we'll want to look at how connected the most central vertices are. We can do this by creating a subgraph based on centrality criteria. This is an important technique when dealing with large graphs. Later, we'll look at alternative visualization methods, but another powerful technique is visualizing subgraphs.
The graph, retweet_graph
, its vertex betweenness, retweet_btw
, and the 0.99 betweenness quantile, betweenness_q99
are available.
This exercise is part of the course
Case Studies: Network Analysis in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Transform betweenness: add 2 then take natural log
transformed_btw <- log(___ + 2)
# Make transformed_btw the size attribute of the vertices
V(___)$ <- ___
# Plot the graph
plot(
___, vertex.label = NA, edge.arrow.width = 0.2,
edge.arrow.size = 0.0, vertex.color = "red"
)