Mapping Vaccine Sentiment by Analyzing Spanish-Language Social Media Posts and Survey-Based Public Opinion: Dual Methods Study

Abstract

Background: The internet and social media have been considered useful platforms for obtaining health information. However, critical and erroneous content about vaccines on social media has been associated with vaccination delays and refusal. Objective: This study aimed to examine how social networks influence access to and perceptions of vaccine-related information. We sought to (1) quantify the proportion of individuals engaging with vaccine-related content on social media and to characterize their demographic and behavioral profiles through an internet-based population survey conducted in Spain and (2) to analyze vaccine-related sentiments and opinions in Spanish and Catalan posts on X (X Corp [formerly Twitter, Inc] and geolocate them using artificial intelligence. Methods: Two complementary methodologies were applied. First, an observational study was conducted via a self-administered internet-based questionnaire among adults in Spain in 2021. Second, we analyzed Spanish-and Catalan-language posts from X, collected between March and December 2021. Sentiment analysis was performed using a workflow developed in Orange Data Mining (Bioinformatics Laboratory, Faculty of Computer and Information Science, University of Ljubljana). Geolocation was based on user-defined locations and visualized using Microsoft Power Business Intelligence. Social network analysis was conducted with NodeXL Pro (Social Media Research Foundation) to identify and characterize the 5 largest user communities discussing vaccines. Although based on independent data sources, the 2 approaches provided complementary methodological insights. Results: Among the 1312 respondents in the survey, 85.7% (1124/1312) stated that they were regular social network users, and 66% (850/1287) reported having encountered antivaccine information on social networks. Of these, 24.3% (205/845) experienced doubts about receiving recommended vaccines, and out of those with doubts, 13.3% (27/203) refused at least 1 vaccine proposed by a health care professional. A total of 479,734 Spanish and Catalan posts on X were analyzed, with 54.44% (n=261,183) posts classified as negative, 28.18% (n=135,194) as neutral, and 17.37% (n=83,357) as positive. Sentiment varied across regions, with more negative posts appearing to derive from South America, with a mix in Europe and more positive posts in North America. Analysis of the topic words and key themes allowed the grouping of the predominant themes of the 5 study groups, which were (1) vaccination efforts during the COVID-19 pandemic, (2) issues of vaccine theft and struggles in managing and securing the vaccine supply, (3) campaigns in the State of Mexico, (4) vaccination efforts for older adults, and (5) the vaccination campaign in Colombia to combat COVID-19. Conclusions: High proportions of exposure to antivaccine content were reported by the surveyed population. Sentiment analysis and geolocation of posts on the social network X suggested a notable presence of Spanish-language posts categorized as negative, predominantly from South America. The thematic analysis of conversations on X may provide valuable insights into the population's opinions about vaccines.


This work was supported by Diputació de Lleida, Societat Catalana de Pediatria, and Asociación Española de Pediatria de Atención Primaria.

Document Type

Article


Published version

Language

English

Publisher

JMIR Publications

Related items

Reproducció del document publicat a https://doi.org/10.2196/63223

JMIR Infodemiology, 2025, vol. 5, e63223

Recommended citation

This citation was generated automatically.

Rights

cc-by (c) Agnes Huguet-Feixa et al., 2025

Attribution 4.0 International

http://creativecommons.org/licenses/by/4.0/

This item appears in the following Collection(s)