Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Feb:215:83-90.
doi: 10.1016/j.puhe.2022.12.003. Epub 2022 Dec 14.

Evolution of social mood in Spain throughout the COVID-19 vaccination process: a machine learning approach to tweets analysis

Affiliations

Evolution of social mood in Spain throughout the COVID-19 vaccination process: a machine learning approach to tweets analysis

A Turón et al. Public Health. 2023 Feb.

Abstract

Objectives: This paper presents a new approach based on the combination of machine learning techniques, in particular, sentiment analysis using lexicons, and multivariate statistical methods to assess the evolution of social mood through the COVID-19 vaccination process in Spain.

Methods: Analysing 41,669 Spanish tweets posted between 27 February 2020 and 31 December 2021, different sentiments were assessed using a list of Spanish words and their associations with eight basic emotions (anger, fear, anticipation, trust, surprise, sadness, joy and disgust) and three valences (neutral, negative and positive). How the different subjective emotions were distributed across the tweets was determined using several descriptive statistics; a trajectory plot representing the emotional valence vs narrative time was also included.

Results: The results achieved are highly illustrative of the social mood of citizens, registering the different emerging opinion clusters, gauging public states of mind via the collective valence, and detecting the prevalence of different emotions in the successive phases of the vaccination process.

Conclusions: The present combination in formal models of objective and subjective information would therefore provide a more accurate vision of social reality, in this case regarding the COVID-19 vaccination process in Spain, which will enable a more effective resolution of problems.

Keywords: COVID-19 vaccination process; Machine learning; Multivariate statistics; Sentiment analysis; Social mood; Tweets.

PubMed Disclaimer

Conflict of interest statement

None declared.

Figures

Fig. 1
Fig. 1
Methodology flow diagram for the study of social mood evolution.
Fig. 2
Fig. 2
Retweets network of the vaccination phases. The nodes are the users, and the arcs point goes from the retweeter to the author of the original tweet. The most retweeted authors are highlighted, and seven relatively clear clusters can be distinguished (each of them is formed by more than 2.5% of the total nodes and coloured in different colours). Within each cluster, those with highest number of retweets have been distinguished, appearing as the largest nodes in the graph.
Fig. 3
Fig. 3
Fourier plot trajectory of the tweets with the four phases (differently coloured). It represents emotional valence vs percentage of tweets (tweets date). In the upper side, the positive sentiments, and in the lower side, the negative ones. Local hotspots (green circles) and areas of trend change (purple circles) were marked by analysing the content of these tweets and relating them to relevant news and political decisions.
Fig. 4
Fig. 4
Percentage of words per emotion according to each of the phases.
Fig. 5
Fig. 5
Percentage of words per phase according to each of the emotions.

References

    1. Sattar N.S., Arifuzzaman S. COVID-19 vaccination awareness and aftermath: public sentiment analysis on twitter data and vaccinated population prediction in the USA. Appl Sci. 2021 Jun 30;11(13):6128.
    1. Yousefinaghani S., Dara R., Mubareka S., Papadopoulos A., Sharif S. An analysis of COVID-19 vaccine sentiments and opinions on Twitter. Int J Infect Dis. 2021 Jul;108:256–262. - PMC - PubMed
    1. Kapoor K.K., Tamilmani K., Rana N.P., Patil P., Dwivedi Y.K., Nerur S. Advances in social media research: past, present and future. Inf Syst Front. 2018 Jun 1;20(3):531–558.
    1. Öztürk N., Ayvaz S. Sentiment analysis on Twitter: a text mining approach to the Syrian refugee crisis. Telematics Inf. 2018 Apr;35(1):136–147.
    1. 2022. https://twitter.com/

Substances