The African Journal of Information and Communication (Jun 2023)
Exploring COVID-19 public perceptions in South Africa through sentiment analysis and topic modelling of Twitter posts
Abstract
The narratives shared on social media during a health crisis such as COVID-19 reflect public perceptions of the crisis. This article provides findings from a study of the perceptions of South African citizens regarding the government’s response to the COVID-19 pandemic from March to May 2020. The study analysed Twitter data from posts by government officials and the public in South Africa to measure the public’s confidence in how the government was handling the pandemic. Results produced by four popular machine-learning classifiers for sentiment analysis— logistic regression (LR), support vector machine (SVM), random forest (RF), and extreme gradient boosting (XGBoost)—demonstrated these classifiers’ levels of effectiveness. In addition, the study used, and evaluated the effectiveness of, two topic-modelling algorithms—latent dirichlet allocation (LDA) and non-negative matrix factorisation (NMF)—in the classification of social media discourses in terms of frequently occurring topics. In terms of South African public sentiment towards COVID-19 and the government’s response, it was found that, based on the Twitter data, South Africans held predominantly negative views.