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
. 2020 Nov 25;22(11):e20550.
doi: 10.2196/20550.

Twitter Discussions and Emotions About the COVID-19 Pandemic: Machine Learning Approach

Affiliations

Twitter Discussions and Emotions About the COVID-19 Pandemic: Machine Learning Approach

Jia Xue et al. J Med Internet Res. .

Abstract

Background: It is important to measure the public response to the COVID-19 pandemic. Twitter is an important data source for infodemiology studies involving public response monitoring.

Objective: The objective of this study is to examine COVID-19-related discussions, concerns, and sentiments using tweets posted by Twitter users.

Methods: We analyzed 4 million Twitter messages related to the COVID-19 pandemic using a list of 20 hashtags (eg, "coronavirus," "COVID-19," "quarantine") from March 7 to April 21, 2020. We used a machine learning approach, Latent Dirichlet Allocation (LDA), to identify popular unigrams and bigrams, salient topics and themes, and sentiments in the collected tweets.

Results: Popular unigrams included "virus," "lockdown," and "quarantine." Popular bigrams included "COVID-19," "stay home," "corona virus," "social distancing," and "new cases." We identified 13 discussion topics and categorized them into 5 different themes: (1) public health measures to slow the spread of COVID-19, (2) social stigma associated with COVID-19, (3) COVID-19 news, cases, and deaths, (4) COVID-19 in the United States, and (5) COVID-19 in the rest of the world. Across all identified topics, the dominant sentiments for the spread of COVID-19 were anticipation that measures can be taken, followed by mixed feelings of trust, anger, and fear related to different topics. The public tweets revealed a significant feeling of fear when people discussed new COVID-19 cases and deaths compared to other topics.

Conclusions: This study showed that Twitter data and machine learning approaches can be leveraged for an infodemiology study, enabling research into evolving public discussions and sentiments during the COVID-19 pandemic. As the situation rapidly evolves, several topics are consistently dominant on Twitter, such as confirmed cases and death rates, preventive measures, health authorities and government policies, COVID-19 stigma, and negative psychological reactions (eg, fear). Real-time monitoring and assessment of Twitter discussions and concerns could provide useful data for public health emergency responses and planning. Pandemic-related fear, stigma, and mental health concerns are already evident and may continue to influence public trust when a second wave of COVID-19 occurs or there is a new surge of the current pandemic.

Keywords: COVID-19; Twitter; Twitter data; infodemic; infodemiology; infoveillance; machine learning; public discussion; public sentiment; social media; virus.

PubMed Disclaimer

Conflict of interest statement

Conflicts of Interest: None declared.

Figures

Figure 1
Figure 1
Twitter data mining pipeline.
Figure 2
Figure 2
Tweet preprocessing chart.
Figure 3
Figure 3
The word cloud of the most popular unigram.
Figure 4
Figure 4
Word cloud of the most popular bigrams.
Figure 5
Figure 5
The number of topics based on the coherence model.
Figure 6
Figure 6
Sentiment analysis for each of the 13 latent topics.

Similar articles

Cited by

References

    1. Center for Systems Science and Engineering (CSSE) COVID-19 Dashboard by CSSE at Johns Hopkins University (JHU) [2020-06-16]. https://www.arcgis.com/apps/opsdashboard/index.html#/bda7594740fd4029942....
    1. Rosenberg H, Syed S, Rezaie S. The Twitter pandemic: The critical role of Twitter in the dissemination of medical information and misinformation during the COVID-19 pandemic. CJEM. 2020 Jul;22(4):418–421. doi: 10.1017/cem.2020.361. http://europepmc.org/abstract/MED/32248871 - DOI - PMC - PubMed
    1. Scanfeld D, Scanfeld V, Larson EL. Dissemination of health information through social networks: twitter and antibiotics. Am J Infect Control. 2010 Apr;38(3):182–8. doi: 10.1016/j.ajic.2009.11.004. http://europepmc.org/abstract/MED/20347636 - DOI - PMC - PubMed
    1. Xue J, Chen J, Chen C, Hu R, Zhu T. The Hidden Pandemic of Family Violence During COVID-19: Unsupervised Learning of Tweets. J Med Internet Res. 2020 Nov 06;22(11):e24361–53. doi: 10.2196/24361. doi: 10.2196/24361. - DOI - DOI - PMC - PubMed
    1. Cheong M, Lee VCS. A microblogging-based approach to terrorism informatics: Exploration and chronicling civilian sentiment and response to terrorism events via Twitter. Inf Syst Front. 2010 Sep 29;13(1):45–59. doi: 10.1007/s10796-010-9273-x. - DOI