journal article Mar 21, 2024

Using Natural Language Processing to Explore Social Media Opinions on Food Security: Sentiment Analysis and Topic Modeling Study

Abstract
Background
Social media has the potential to be of great value in understanding patterns in public health using large-scale analysis approaches (eg, data science and natural language processing [NLP]), 2 of which have been used in public health: sentiment analysis and topic modeling; however, their use in the area of food security and public health nutrition is limited.


Objective
This study aims to explore the potential use of NLP tools to gather insights from real-world social media data on the public health issue of food security.


Methods
A search strategy for obtaining tweets was developed using food security terms. Tweets were collected using the Twitter application programming interface from January 1, 2019, to December 31, 2021, filtered for Australia-based users only. Sentiment analysis of the tweets was performed using the Valence Aware Dictionary and Sentiment Reasoner. Topic modeling exploring the content of tweets was conducted using latent Dirichlet allocation with BigML (BigML, Inc). Sentiment, topic, and engagement (the sum of likes, retweets, quotations, and replies) were compared across years.


Results
In total, 38,070 tweets were collected from 14,880 Twitter users. Overall, the sentiment when discussing food security was positive, although this varied across the 3 years. Positive sentiment remained higher during the COVID-19 lockdown periods in Australia. The topic model contained 10 topics (in order from highest to lowest probability in the data set): “Global production,” “Food insecurity and health,” “Use of food banks,” “Giving to food banks,” “Family poverty,” “Food relief provision,” “Global food insecurity,” “Climate change,” “Australian food insecurity,” and “Human rights.” The topic “Giving to food banks,” which focused on support and donation, had the highest proportion of positive sentiment, and “Global food insecurity,” which covered food insecurity prevalence worldwide, had the highest proportion of negative sentiment. When compared with news, there were some events, such as COVID-19 support payment introduction and bushfires across Australia, that were associated with high periods of positive or negative sentiment. Topics related to food insecurity prevalence, poverty, and food relief in Australia were not consistently more prominent during the COVID-19 pandemic than before the pandemic. Negative tweets received substantially higher engagement across 2019 and 2020. There was no clear relationship between topics that were more likely to be positive or negative and have higher or lower engagement, indicating that the identified topics are discrete issues.


Conclusions
In this study, we demonstrated the potential use of sentiment analysis and topic modeling to explore evolution in conversations on food security using social media data. Future use of NLP in food security requires the context of and interpretation by public health experts and the use of broader data sets, with the potential to track dimensions or events related to food security to inform evidence-based decision-making in this area.
Topics

No keywords indexed for this article. Browse by subject →

References
100
[1]
Social Media Use for Health Purposes: Systematic Review

Junhan Chen, Yuan Wang

Journal of Medical Internet Research 10.2196/17917
[3]
An introduction to the basic concepts of food securityFood and Agriculture Organization20082021-06-18http://www.fao.org/3/al936e/al936e.pdf
[4]
Advances in natural language processing

Julia Hirschberg, Christopher D. Manning

Science 10.1126/science.aaa8685
[7]
LiSTopic modeling and Latent Dirichlet Allocation (LDA) in PythonMedium20182021-08-31https://towardsdatascience.com/topic-modeling-and-latent-dirichlet-allocation-in-python-9bf156893c24
[8]
Application Programming Interface (API)IBM Cloud Education20202021-04-13https://www.ibm.com/topics/api
[9]
What is data science?IBM2021-04-13https://www.ibm.com/au-en/topics/data-science
[10]
Introducing JSONJSON2023-04-03https://www.json.org/json-en.html
[12]
Machine learning: what it is and why it mattersSAS20212023-02-17https://www.sas.com/en_au/insights/analytics/machine-learning.html
[13]
Sloan, L The SAGE Handbook of Social Media Research Methods (2017)
[14]
Stemming and lemmatizationCambridge University Press20082023-02-17https://nlp.stanford.edu/IR-book/html/htmledition/stemming-and-lemmatization-1.html
[15]
How to get the blue checkmark on TwitterTwitter2023-02-17https://help.twitter.com/en/managing-your-account/about-twitter-verified-accounts
[16]
What is machine learning?IBM Corp2021-08-09https://www.ibm.com/au-en/cloud/learn/machine-learning
[17]
Farzindar, A Natural Language Processing for Social Media. 2nd Edition (2018) 10.1007/978-3-031-02167-1
[26]
Infodemiology and Infoveillance: Scoping Review

Amaryllis Mavragani

Journal of Medical Internet Research 10.2196/16206
[28]
Sentiment Analysis in Health and Well-Being: Systematic Review

Anastazia Zunic, Padraig Corcoran, Irena Spasic

JMIR Medical Informatics 10.2196/16023
[33]
Probabilistic topic models

David M. Blei

Communications of the ACM 10.1145/2133806.2133826
[40]
Goal 2: end hunger, achieve food security and improved nutrition and promote sustainable agricultureUnited Nations20212021-06-18https://sdgs.un.org/goals/goal2
[41]
Food security and nutrition around the world in 2020Food and Agriculture Organization2021-06-18http://www.fao.org/3/ca9692en/online/ca9692en.html#chapter-1_1
[47]
BowdenMUnderstanding food insecurity in AustraliaAustralian Institute of Family Studies20202024-01-29https://aifs.gov.au/resources/policy-and-practice-papers/understanding-food-insecurity-australia

Showing 50 of 100 references

Metrics
31
Citations
100
References
Details
Published
Mar 21, 2024
Vol/Issue
26
Pages
e47826
Cite This Article
Annika Molenaar, Dickson Lukose, Linda Brennan, et al. (2024). Using Natural Language Processing to Explore Social Media Opinions on Food Security: Sentiment Analysis and Topic Modeling Study. Journal of Medical Internet Research, 26, e47826. https://doi.org/10.2196/47826