# Immigration as a Divisive Topic: Clusters and Content Diffusion in the Italian Twitter Debate
## 3 Methods and Results
### Quantifying the Diversity among Communities: Analysis of Shared URLs  
Along with user's original textual content, tweets can contain links to external resources (URLs) that users want to share. We try to quantify the differences between communities by defining their diversity in the URLs shared by users (for general statistics and for an overview of the domain names of the most shared URLs in the network, please see Appendix A).  
To do so, we select all the URLs with at least 100 shares and we look at the distribution of their shares among the communities. To each URL we can associate a sequence of communities sharing it over time. Let us suppose that a generic URL\({}_{i}\) is shared by users following the pattern in Figure 9. We will then assign to URL\({}_{i}\) a sequence of communities in the form of a vector:  
\[\text{URL}_{i}\longleftarrow[\text{RT1,RT2,RT4,RT5,RT2}] \tag{2}\]  
Figure 8: Distribution of the bi-grams among the communities. The common scale for the x-axis highlights the heavy usage of the pair illegal-immigration by RT2 users.  
Figure 9: Example of sequence of URL\({}_{i}\) shares.  
We are thus able to create, starting from this vector and keeping the timestamps into account, a community-wise sharing pattern for every URL. In Figure 10 is shown such a pattern for a randomly chosen URL.  
Inspired by [36], in order to quantify the diversity in communities sharing an URL, i.e., how heterogeneous is the reach of a URL, we can compute the entropy H(URL\({}_{i}\)) of the associated vector  
\[\text{H(URL}_{i})=-\sum_{c\in C}\text{u}_{c}\text{ln}(\text{u}_{c}) \tag{3}\]  
where u\({}_{c}\) is the fraction of shares by community \(c\) over the total. This enables us to quantify the heterogeneity of allocation of an URL across communities, rather than focusing on the dominant community for each URL. The higher the entropy, the more communities are sharing that URL.  
Now that every URL is assigned its own entropy, we can finally characterise the communities by the entropy distribution of all the URLs they shared (Figure 11). The result is peculiar: RT1 and RT2 share a very high number of low-entropy URLs (with a median of 0.00 and 0.34, respectively), while the distributions for RT3-4-5 are much broader and heterogeneous, with much higher medians and mean values. To interpret this result we have to go back to the composition of the communities (Table 4): RT5 is a community of national news media and blogs, RT3 and RT4 are linked with the two parties of the then-Government coalition, respectively the League and the 5 Stars Movement, while RT1 and RT2--those with the lowest entropy--can be traced back to newspapers and politicians of the opposition party (Partito Democratic, leftist area) and to far right politicians and hoax spreader news media, respectively. This result establishes an interesting link between the attitudes of two areas that are at the odds with respect to their stance towards the topic of immigration. Their stance and their cultural background are different, yet they both seem to be tightly folded in on themselves, sharing URLs that can hardly ever be found in other communities. Furthermore, it suggests that there are clear global trends that spread through the network regardless of the community structure, as well as local trends that find boundaries on the edges of the clusters.  
Figure 10: Shares over time, grouped by community, of a randomly chosen URL. The entropy for this specific sharing pattern is H = 0.63.