ComeçarComece de graça

Visualizing the communities

Now that we've found communities, we'll visualize our results. Before we plot, we'll assign each community membership to each vertex and a crossing value to each edge. The crossing() function in igraph will return true if a particular edge crosses communities. This is useful when we want to see certain vertices that are bridges between communities. You may just want to look at certain communities because the whole graph is a bit of a hairball. In this case, we'll create a subgraph of communities only of a certain size (number of members).

Este exercício faz parte do curso

Case Studies: Network Analysis in R

Ver curso

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Color vertices by community membership, as a factor
V(retweet_graph)$color <- factor(___(___))

# Find edges that cross between commmunities
is_crossing <- crossing(___,___)

# Set edge linetype: solid for crossings, dotted otherwise 
E(retweet_graph)$lty <- ifelse(___, "solid","___")
Editar e executar o código