Skip to main content

Research Repository

Advanced Search

Artificial intelligence--enabled analysis of public attitudes on facebook and twitter toward covid-19 vaccines in the united kingdom and the united states: Observational study

Hussain, Amir; Tahir, Ahsen; Hussain, Zain; Sheikh, Zakariya; Gogate, Mandar; Dashtipour, Kia; Ali, Azhar; Sheikh, Aziz


Ahsen Tahir

Zain Hussain

Zakariya Sheikh

Azhar Ali

Aziz Sheikh


Background: Global efforts toward the development and deployment of a vaccine for COVID-19 are rapidly advancing. To achieve herd immunity, widespread administration of vaccines is required, which necessitates significant cooperation from the general public. As such, it is crucial that governments and public health agencies understand public sentiments toward vaccines, which can help guide educational campaigns and other targeted policy interventions.

Objective: The aim of this study was to develop and apply an artificial intelligence–based approach to analyze public sentiments on social media in the United Kingdom and the United States toward COVID-19 vaccines to better understand the public attitude and concerns regarding COVID-19 vaccines.

Methods: Over 300,000 social media posts related to COVID-19 vaccines were extracted, including 23,571 Facebook posts from the United Kingdom and 144,864 from the United States, along with 40,268 tweets from the United Kingdom and 98,385 from the United States from March 1 to November 22, 2020. We used natural language processing and deep learning–based techniques to predict average sentiments, sentiment trends, and topics of discussion. These factors were analyzed longitudinally and geospatially, and manual reading of randomly selected posts on points of interest helped identify underlying themes and validated insights from the analysis.

Results: Overall averaged positive, negative, and neutral sentiments were at 58%, 22%, and 17% in the United Kingdom, compared to 56%, 24%, and 18% in the United States, respectively. Public optimism over vaccine development, effectiveness, and trials as well as concerns over their safety, economic viability, and corporation control were identified. We compared our findings to those of nationwide surveys in both countries and found them to correlate broadly.

Conclusions: Artificial intelligence–enabled social media analysis should be considered for adoption by institutions and governments alongside surveys and other conventional methods of assessing public attitude. Such analyses could enable real-time assessment, at scale, of public confidence and trust in COVID-19 vaccines, help address the concerns of vaccine sceptics, and help develop more effective policies and communication strategies to maximize uptake.

Journal Article Type Article
Acceptance Date Jan 31, 2021
Online Publication Date Apr 5, 2021
Publication Date 2021-04
Deposit Date May 4, 2021
Publicly Available Date May 4, 2021
Print ISSN 1439-4456
Electronic ISSN 1438-8871
Publisher Journal of Medical Internet Research
Peer Reviewed Peer Reviewed
Volume 23
Issue 4
Article Number e26627
Keywords artificial intelligence; COVID-19; deep learning; Facebook; health informatics; natural language processing; public health; sentiment analysis; social media; Twitter; infodemiology; vaccination
Public URL


Artificial Intelligence–Enabled Analysis of Public Attitudes on Facebook and Twitter Toward COVID-19 Vaccines in the United Kingdom and the United States: Observational Study (729 Kb)

Publisher Licence URL

Copyright Statement
This is an open-access article distributed under the terms of the Creative Commons Attribution License (, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in the Journal of Medical Internet Research, is properly cited.

You might also like

Downloadable Citations