Using social media data to explore how the COVID-19 pandemic impacted consumer attitudes to food
COVID-19 shook global food supply chains to the core – but did this result in any long-term changes in societal attitudes towards food? A project funded by the STFC Food Network+ (SFN) combined the power of machine learning approaches with large-scale Twitter data to find out.
The COVID-19 pandemic impacted every aspect of our lives, with food being no exception. For instance, as countries went into lockdown and panic buying swept supermarket shelves bare, many people experienced food insecurity for the first time. And whilst communal meals and eating out became impossible, online shopping and home meal preparation kits soared in popularity. Meanwhile, the sudden increase in home cooking led to greater interest in the health and nutritional attributes of what we eat.
But now that most countries are returning to ‘near normality’, it remains unclear what the long-term repercussions of the pandemic will be. Did these sudden societal changes result in any long-term fundamental shifts in our purchasing behaviours and attitudes towards food? Understanding this could help policy makers to identify the most important food supply concerns of consumers during a crisis situation, which could inform strategies to respond to future emergencies.
Twitter: an ideal tool for research
To investigate whether consumer attitudes towards food were affected by the pandemic, a project backed by the SFN used machine learning methods to mine food-related information contained within social media posts on Twitter. With more than 500 million users worldwide, Twitter has become a global tool for sharing news, expressing opinions, and interacting with others in real time. This makes it highly suitable for capturing large amounts of organic data to explore sentiment and attitudes surrounding food concerns both before and during the COVID-19 pandemic.
“Public attitudes on Twitter have already been used to evaluate consumer perceptions towards brands, predict stock market fluctuations, and assess the success of political campaigns” said project lead, Mohammad Delgosha, Associate Professor in Business Analytics at the University of Birmingham. “But up to now, little attention has been given to the feelings and perceptions of consumers regarding the unique and sheer scale of the impact of the COVID-19 pandemic on food supply chains.”
Mohammad’s research focuses on data mining, specifically analysing Big Data by employing machine learning techniques to large amounts of unstructured data to find solutions for social, environmental, cultural and practical challenges. In the past, for instance, Mohammad has used textual Big Data to investigate the positives and negatives of automated algorithms being used to manage gig workers in digital platforms such as Uber or Deliveroo.
According to him, Twitter data is highly useful for exploring consumer opinions in an unbiased way. “When we use surveys to try and assess consumer sentiment, these are inevitably constrained to the researcher’s existing knowledge or speculation. Twitter, on the other hand, offers significant amounts of open-ended data to explore open-ended questions” he said.
Capturing meaning from Big Data
The first stage of the project involved capturing tweets generated during two 16-week periods: from 7 August to 8 December 2019, and then the 16 weeks immediately after the World Health Organization declared COVID-19 as a global pandemic on 11 March 2020. By applying search algorithms to Twitter’s Application Programming Interface, posts were extracted that contained keywords related to food (for instance, food, crop, fruits, vegetables, meat, milk, and groceries) or supply-related terms (such as supply, chain, logistics, systems). This resulted in a dataset of around 182,000 tweets from 109,600 different people before COVID-19, and 427,000 tweets from 183,000 people after the lockdowns started.
The sheer size of this dataset meant it would have been impossible to manually analyse it using human coders. So Mohammad used two natural language processing techniques, called topic modelling and sentiment analysis.
“Topic modelling is an unsupervised statistical method for discovering abstract ‘topics’ within textual data. Its principal function is to combine main concepts within a text into a single, understandable structure” said Mohammad. This method scans the collection of text to detect frequently used words or phrases, and groups them to provide a summary that best represents the information in the document.
Sentiment analysis, on the other hand, is a tool used to understand the emotion, opinion, or judgment behind written or spoken language, and to evaluate if this communicates a favourable, unfavourable, or neutral message. Businesses, for example, often apply sentiment analysis to customer comments or online reviews to assess how their customers feel about their product, services, or brand.
The impact of COVID-19 on consumer concerns about food
“Our results indicate that the public sentiment and topics associated with food systems were markedly transformed by the COVID-19 pandemic” said Mohammad. The sentiment analysis, for instance, showed that overall public attitudes towards food had a more negative tone and became more pessimistic during the initial COVID-19 wave, compared with before the pandemic. For instance, before the pandemic, around 47% of tweets had an average positive sentiment, with 36% being negative, and 17% neutral. During the first phase of the pandemic, however, the proportion of negative tweets jumped to 54%, with 24% being positive and 22% being neutral.
Meanwhile, the topic modelling analysis found that the type of food-related concern also changed dramatically. “Before COVID-19, people were concerned more about social and environmental issues such as climate change, ethical concerns, children and healthcare, organic food, animal welfare, and diets” Mohammad explained. “From March to July 2020, however, food insecurity concerns significantly increased, becoming the main concern for the public. In addition, food donation, panic shopping, and the healthcare of workers in the food supply chain became other important concerns during the pandemic. This indicates that policy makers should focus on sustainable food systems and take actions for designing and implementing diverse and resilient food networks, especially for managing global shocks like COVID-19.”
Despite this being the first time Mohammad has used Twitter data within a research project, he is already planning future investigations using similar methods. “Working on this project with the SFN has opened a new chapter for my research profile to continue using textual data from Twitter to answer important and fundamental questions about food supply chains, especially understanding and modelling food security issues in the UK or globally” he said. “Currently, my colleagues and I are working on two different research projects utilizing Twitter data for supply chain management purposes and analysing complaint management by businesses.”
Mohammad would like to thank Nastaran Hajiheydari, Senior Lecturer in Digital Marketing and Analytics at Queen Mary University of London, for his help in collecting and analysing the Twitter data for this project.
September 2022 - Caroline Wood, Freelance Science Writer