Analysis of the impact of tourism in Valencia through sentiment on social media: compare the opinions of visitors and residents to better understand the city.

Tourism is one of Valencia’s main economic drivers, but its impact goes far beyond visitor numbers or revenue. How tourism is perceived by both visitors and local residents plays a crucial role in understanding its real effects on neighbourhoods, coexistence, and overall quality of life.

With this perspective in mind, our IDAL's (Intelligent Data Analysis Laboratory) research team from the University of Valencia developed, as the first use case within the UV's participation in the Citcom.ai project, a use case focused on sentiment analysis applied to tourism in the city of Valencia, using data from social media platforms.

An approach based on the digital voice of tourists and citizens

The project analysed messages extracted from X (formerly Twitter) posted by neighbourhood associations and citizen groups, using public APIs, with the aim of studying how tourism is discussed in different neighbourhoods of the city and gathering everyday concerns related to tourist activity. In addition, visitor reviews posted on TripAdvisor were examined to contrast the perspective of tourists with that of residents. The data processing pipeline included text cleaning, language detection (Spanish and Valencian), and the application of sentiment analysis models capable of identifying polarity, emotions, and toxic language.

The results revealed a clear contrast between both perspectives. Tourist opinions are predominantly positive, while messages from neighbourhood associations tend to reflect a more critical view of tourism, particularly in areas experiencing higher tourist pressure.

Gráfica con los Resultados del Análisis de Sentimientos

However, these findings must be interpreted carefully. The analysis highlighted a structural bias towards negative sentiment in citizen discourse, largely due to the role of neighbourhood associations, whose purpose is to highlight issues and demand improvements. Although the results were therefore inconclusive in terms of providing a balanced overall assessment, the study successfully demonstrated the validity and performance of the algorithms, as well as their ability to detect recurring themes, localised conflicts, and spatial differences in social perception.

This approach opens the door to future, more extensive studies, combining social media with other sources of urban data, and provides a solid basis for designing tourism policies that are more sensitive to the social context of each neighbourhood.

Gráficas adicionales con más información sobre el análisis de sentimiento

If you are interested in this type of sentiment analysis and would like to learn more about how it can help you better understand the situation in your city, town, neighbourhood or even your company, we would be delighted to help. You can contact us using the information provided in our Contact section.

The authors would like to thank the Regional Ministry of Innovation, Industry, Trade and Tourism (Conselleria d'Innovació, Indústria, Comerç i Turisme de la Generalitat Valenciana) for its funding under Grant Agreement No. 101100728, as part of the European Commission’s Citcom.ai project.