Public perception on immigration and racial discrimination in Spain: a social media analysis using X data
Fecha
2026-12-31Autor
Estado
info:eu-repo/semantics/publishedVersionMetadatos
Mostrar el registro completo del ítemResumen
The increasing use of social media, particularly X (formerly Twitter), has enabled citizens to openly share their views, making it a valuable arena for examining public perceptions of immigration and its intersections with racial discrimination and xenophobia. This study analyzes Spanish digital debates from January 2020 to January 2023 through a mixed methodology that combines text pre-processing, semantic filtering of keywords, topic modeling, and sentiment analysis. A five-topic solution obtained through Latent Dirichlet Allocation (LDA) captured the main dimensions of the discourse: (1) economic and political debates on immigration, (2) international migration and refugee contexts, (3) racism and social discrimination, (4) insults, stereotypes, and xenophobic framings, and (5) small boat arrivals and maritime management. Sentiment analysis using a transformer-based model (roBERTuito) revealed a strong predominance of negativity across all topics, with sharp spikes linked to major migration crises, humanitarian emergencies, and highly mediatized cultural events. Qualitative readings of representative posts further showed that negativity was often articulated through invasion metaphors, securitarian framings, satire, and ridicule, indicating that hostility was not merely reactive but embedded in broader economic, political, and cultural registers. These findings demonstrate that discriminatory discourse in Spain is event-driven, becoming particularly salient during crises and symbolic moments, and underline the persistent role of social media in amplifying racialized exclusion and partisan polarization. The increasing use of social media, particularly X (formerly Twitter), has enabled citizens to openly share their views, making it a valuable arena for examining public perceptions of immigration and its intersections with racial discrimination and xenophobia. This study analyzes Spanish digital debates from January 2020 to January 2023 through a mixed methodology that combines text pre-processing, semantic filtering of keywords, topic modeling, and sentiment analysis. A five-topic solution obtained through Latent Dirichlet Allocation (LDA) captured the main dimensions of the discourse: (1) economic and political debates on immigration, (2) international migration and refugee contexts, (3) racism and social discrimination, (4) insults, stereotypes, and xenophobic framings, and (5) small boat arrivals and maritime management. Sentiment analysis using a transformer-based model (roBERTuito) revealed a strong predominance of negativity across all topics, with sharp spikes linked to major migration crises, humanitarian emergencies, and highly mediatized cultural events. Qualitative readings of representative posts further showed that negativity was often articulated through invasion metaphors, securitarian framings, satire, and ridicule, indicating that hostility was not merely reactive but embedded in broader economic, political, and cultural registers. These findings demonstrate that discriminatory discourse in Spain is event-driven, becoming particularly salient during crises and symbolic moments, and underline the persistent role of social media in amplifying racialized exclusion and partisan polarization.
Public perception on immigration and racial discrimination in Spain: a social media analysis using X data
Tipo de Actividad
Artículos en revistasISSN
2432-2717Materias/ categorías / ODS
Instituto de Investigación Tecnológica (IIT) - Innovación docente y Analytics (GIIDA)Palabras Clave
Social media · Discrimination · Immigration · Sentiment analysis · Topic modelingSocial media · Discrimination · Immigration · Sentiment analysis · Topic modeling

