BaşlayınÜcretsiz başlayın

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).

Bu egzersiz, kursun bir parçasıdır

Case Studies: Network Analysis in R

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# 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","___")
Kodu Düzenle ve Çalıştır