An R, Yang Y, Batcheller Q, Zhou Q. Sentiment Analysis of Tweets on Soda Taxes.
JOURNAL OF PUBLIC HEALTH MANAGEMENT AND PRACTICE 2023;
29:633-639. [PMID:
36812042 DOI:
10.1097/phh.0000000000001721]
[Citation(s) in RCA: 0] [Impact Index Per Article: 0] [Reference Citation Analysis] [Abstract] [MESH Headings] [Track Full Text] [Journal Information] [Subscribe] [Scholar Register] [Indexed: 02/24/2023]
Abstract
CONTEXT
As a primary source of added sugars, sugar-sweetened beverage (SSB) consumption may contribute to the obesity epidemic. A soda tax is an excise tax charged on selling SSBs to reduce consumption. Currently, 8 cities/counties in the United States have imposed soda taxes.
OBJECTIVE
This study assessed people's sentiments toward soda taxes in the United States based on social media posts on Twitter.
DESIGN
We designed a search algorithm to systematically identify and collect soda tax-related tweets posted on Twitter. We built deep neural network models to classify tweets by sentiments.
SETTING
Computer modeling.
PARTICIPANTS
Approximately 370 000 soda tax-related tweets posted on Twitter from January 1, 2015, to April 16, 2022.
MAIN OUTCOME MEASURE
Sentiment associated with a tweet.
RESULTS
Public attention paid to soda taxes, indicated by the number of tweets posted annually, peaked in 2016, but has declined considerably ever since. The decreasing prevalence of tweets quoting soda tax-related news without revealing sentiments coincided with the rapid increase in tweets expressing a neutral sentiment toward soda taxes. The prevalence of tweets expressing a negative sentiment rose steadily from 2015 to 2019 and then slightly leveled off, whereas that of tweets expressing a positive sentiment remained unchanged. Excluding news-quoting tweets, tweets with neutral, negative, and positive sentiments occupied roughly 56%, 29%, and 15%, respectively, during 2015-2022. The authors' total number of tweets posted, followers, and retweets predicted tweet sentiment. The finalized neural network model achieved an accuracy of 88% and an F1 score of 0.87 in predicting tweet sentiments in the test set.
CONCLUSIONS
Despite its potential to shape public opinion and catalyze social changes, social media remains an underutilized source of information to inform government decision making. Social media sentiment analysis may inform the design, implementation, and modification of soda tax policies to gain social support while minimizing confusion and misinterpretation.
Collapse