# High-Quality Data from Crowdsourcing towards the Creation of a Mexican Anti-Immigrant Speech Corpus
## 3 Methodology
### Stage I: Data Collection
#### 3.1.2 Data Filtering  
In this stage, represented in Figure 1 as data filtering, the main goal was to keep only relevant tweets for annotation. The raw data obtained from AGEI and INGEOTEC (Section 3.1.1) were processed using a two-fold filter based on spatiotemporal criteria and a preliminary set of keywords.  
The georeferenced AGEI data were mapped in a Geographical Information System (GIS) and regrouped by year, three-month periods, and publication region: northern Mexican border states, southern border states, and the rest of the Mexican states. To address possible imprecision in tweet georeferencing, we applied a 20 km buffer to the regions. We discarded all data from outside these regions. The INGEOTEC data were filtered using the attribute _place_ of the tweet object. Quoting Twitter's official documentation, _Place \"indicates that the tweet is associated (but not necessarily originating from) a place\"_. We only kept posts associated with \"Mexico\". We acknowledge that some filtered data might have been produced outside Mexico.  
Figure 1: Overall methodology. Our proposal is a pipeline made up of a stage sequence focused on (1) collecting and filtering a comprehensive dataset containing tweets generated in Mexico from 1 September 2017 to 1 January 2021; (2) carrying out a preliminary expert annotation process on a preset set of tweets based on a sophisticated guideline; (3) creating data pools for control data and data subject to annotation, and (4) implementing a crowdsourcing annotation platform for these latest data.  
Although the timeframe of interest was vast (almost four years), we chose to apply a temporal filter to maximize the probability of finding posts related to migration and migrants. This choice was consistent with the variations in media coverage and public discussion on migration, which tend to crystallize during episodes of \"crises\" related to specific events. Moments of significance were selected by the experts, who identified special events related to migration in Mexico, represented graphically in Figure 2. We focused primarily on the 2018-2019 period, the \"migrant caravan\" crisis, and then extended the selection to December 2022.  
A second linguistic filter split the result of the first filter based on an ad hoc set of keywords related to migration and anti-immigrant speech in Mexico. We are aware that using keywords to retrieve data can lead to topic bias, as shown by [PERSON] et al. in [30], but it also makes the annotation process much more efficient. We agreed to use neutral and explicit anti-immigrant words and hashtags. The former allowed us to collect both positive and negative instances of anti-immigrant speech but also to retrieve posts that were not, at first glance, particularly hateful towards migrants. We used the latter to maximize the probability of obtaining anti-immigrant speech. Building the dictionary was not a linear process. It required a thorough qualitative exploration of the Twitter data. During this process, we could identify content and users of interest who were especially likely to generate anti-immigrant content. This \"exploratory\" stage was essential to understand the specificity of Mexican online anti-immigrant speech regarding the targeted groups, mainly Central American, Caribbean, and South American migrants, and the most commonly used words and hashtags. We discarded some keywords (due to off-topic content) and added others to then obtain the selection described in Table 1.  
After filtering the data collected from AGEI and INGEOTEC, we obtained a dataset of 47,343 tweets to be annotated.