# Immigration as a Divisive Topic: Clusters and Content Diffusion in the Italian Twitter Debate
## 2 Data  
_Twitter Data Collection and Pre-Processing_  
With about 330 million monthly active users, Twitter is one of the most popular micro-blogging platform in the world. Each user can post their tweets, having available up to 280 characters to express their thoughts or feelings about a particular topic, which is frequently accompanied by hashtags. Users can also engage in conversations by replying to other users' tweets, retweeting them, i.e., sharing their tweets, or quoting them, i.e., retweeting and adding a personal comment or even by mentioning them in a tweet. The terminology we will use throughout the whole paper is summarised in Table 1.  
We focus on the Italian debate about migration/migrants on Twitter, a platform that in Italy has a rather good uptake. Even though it does not reach the numbers of Facebook it still has a good penetration rate, with more than 2 millions users that, according to Twitter, could be reached with adverts in January 2019 [30]. Moreover, a significant correlation (0.93) has been found between the number of (geotagged) tweets in Italian and the total resident population in each Italian province [31]. Thus, we used Twitter's Stream APIs to collect tweets in Italian, filtering on the keywords **migrani, immigrazione** (in English: migrants, immigration). We chose these particular keywords as a filter for our data collection as they were the most neutral ones in the debate. There were others we could have chosen (e.g., _clandestini_ or _rifugiati_, respectively _illegal immigrant_ and _refugee_) but we chose not to, as they are particularly used either against or pro-migration factions and could introduce unwanted bias in our data.  
The phase of data collection started in August 2018 until July 2019, collecting almost 6 million tweets produced by 301,664 unique users. A detailed view of the composition of the dataset can be found in Table 2. Data were then parsed, cleaned and stored.  
To assess the representativeness of our dataset, we compared our volume of traffic with the volume of queries on Google about the term **migrani**. The trends, that can be seen in Figure 1, look highly comparable, with peaks only slightly shifted, most likely due to the different time availability of the data (Twitter data have a daily record, while Google Trend data are related to a 1-week time window). Each peak corresponds to a major event happened in Italy during the period of observation and related to migrants. Please see the caption in Figure 1 for a detailed list of events.  
\begin{table}
\begin{tabular}{c p{284.5 pt}} \hline \hline
**Tweet** & **Meaning** \\ \hline \multirow{2}{*}{Tweet} & Original content posted by a user. A tweet can also include a mention to other users, or an URL pointing to an external website. \\ \hline \multirow{2}{*}{Mention} & The act of mentioning another user, by citing their nickname after the ‘\(\copyright\) symbol. \\ \hline \multirow{2}{*}{Retweet (RT)} & Another user’s post, shared by the author of the retweet. \\ \hline \multirow{2}{*}{Quote} & A retweet with an additional comment by the author of the retweet. \\ \hline \multirow{2}{*}{Reply} & The act of replying to another user by clicking on “_Reply_” under the original tweet. \\  & The addressed user is mentioned with the ‘\(\copyright\) symbol, \\ \cline{1-1}  & at the beginning of the reply message. \\ \hline \hline \end{tabular}
\end{table}
Table 1: Terminology used throughout the paper.  
\begin{table}
\begin{tabular}{l c} \hline \hline
**Composition of the Twitter Dataset** & \\ \hline \hline \multirow{2}{*}{Retweets} & 4,424,359 \\ Quotes & 1,029,317 \\ Replies & 402,177 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Composition of the Twitter dataset. Retweets are the vast majority.