What do we really mean by a community? How many communities are in a network? How many different ways can we partition a network into communities?
We first process to a community partition with the Louvain algorithm, then we base our communities on somme attributes, like the Species of the Origin of characters. To evaluate the performance of a given partition, we computed the associated modularity score.
In this first case, the Louvain algorithm detects 60 communities, with a modularity of almost M = 0.47. In the bar chart below, communities with one character were removed - just for plotting purposes. We named the community based on the top-3 most connected characters it contains.
First, we note that Rick and Morty are in two different communities. Although we know they are highly connected, it means they are not linked to the same characters. Indeed, it's more relevant to find Jessica in Morty's community than in Rick's one. Besides Council of Rick, Evil Rick and Evil Morty gathered in the same community: indeed, it makes sense since they have many interactions together in "Close Rick-counters of the Rick Kind" episode (S01E10). It's also interesting to see that the lovers Tammy and Birdperson are grouped by this partition. Thus, in the light of what we know from the story, this partition is relevant.
In this second case, we focus on a partition based on Species' attribute. Here, we found 34 communities with modularity M = 0.35.
But what are the species? Obviously Humans and Aliens are the two firsts communities! The third community is Humanoids which is different from Robots that is the fifth community. We removed communities with one character, like Pickle Rick - which is obviously a PICKLE!
By grouping nodes by Origin, we found 66 communities with modularity just bellow 0.3.
It is quite interesting that the first community is not Earth but the Earth in another dimension.
By definition, "a graph is said to be strongly connected if every vertex is reachable from every other vertex" (Wikipedia).
Therefore we can search strongly and weakly connected components in our network to reveal another kind of communities. By applying the Tarjan's strongly connected components algorithm in GePhi software, we computed an Strongly-Connected Component ID for each node.
We note some distinguishable communities in the visualisation, like:
in orange: all those characters appear in the same scene (Rixty Minutes, S01E08). They are strongly connected since they take part of the same TV show that Rick and Morty are watching.
in pinkish red: we find all the Smith family from Evil Rick's Target Dimension
in green: Slick, Lizard and Glasses Mortys come all together in a scene to attack Farmer Rick, so this component makes sense as well.
I am sorry that I have to tell you that buuut your friends are on average more popular than you are!
According to a phenomenon known as the "Friendship Paradox", it was first observed by the sociologist Scott L. Feld that "most people have fewer friends than their friends have, on average". We evaluated to what extent this paradox is true in our network.
The friendship paradox works more than 95% of times in Rick and Morty network.
This is quite logic, since the most of the characters are connected to Rick and Morty or the rest of the family who are the most connected nodes in the network!
Then, we got interested into the shortest path distribution to study the "six degrees of separation" of small world social network.
By observing the shortest path distribution, the longest shortest path has a length of 9, and the most common is 3. In average, the six degree of separation is respected here!