Callum Ke

Contents

Analysing Britain's Sentiment During COVID-19

During the pandemic, I found myself in a debate with a friend (I'll call him Bob) about lockdown policies and how the general population in Britain would react. Bob and I particularly disagreed on two points: first, whether public sentiment would vary based on region and/or country; and second, whether people had become numb to or simply didn't care about the rising death counts across the country. I was positive on the former and negative on the latter.

Given my admitted boredom after submitting my thesis and wanting to prove a point. It was only right to kill two birds with one stone by doing the thing. Did this end up taking a lot longer than I though? Yes. Did I learn something? I think so. Was I right? Well let's not spoil that just yet.

Needless to say, please do take any conclusions I make with a heavy tablespoon of salt. Again, this was to prove a point to my friend and not supposed to be submitted to a scientific journal. You'll understand why below.

Getting good data is hard.

Okay we all understand the importance of data but boy did I not prepare myself how hard it was to actually compile a useful set of data and prepare it for analysis.

Twitter(now X). What a pain. Good thing I found snscrape to get around the rate limiting. I compiled two set of Tweet's(X's?) relating to COVID and lockdown, labelled by geocode and date. Admittedly I could've used this curated dataset by Panacea but alas.

UK Geographic Data. Why is this so difficult to find a centralised source? I had to use three different data sources(ONS, Met Office, City Population) all with different formats and for some reason county definitions aren't consistent.

UK COVID Statistics. dot gov and Public Health Wales did it's job here. Thankfully we have open repositories for COVID stats. I was looking for deaths and number of infections. But Northern Ireland why didn't you have anything I could find?

Event's. Used the Guardian API. Prop's to them for maintaining it. Though admittedly the outlet has a particular political leaning.

Evaluating sentiment is not an exact science.

Honestly, I had no experience with NLP and never really had any interest in the field (note: this is pre-ChatGPT and the LLM boom). However, it was admittedly quite fun to experiment with various libraries and models. It was also ammusing to see the differences between them. Nothing better than finding correlation's you didn't predict.

I used the following sentiment analysis methods.

  • Vader: rule-based model, small dictionary size(missing = neutral sentiment) but does allow for emoji's, acronyms and slang which is particularly useful for the British lexicon and Tweets.
  • LSTM: deep-learning based model using a RNN and a standard soft-max activation function.
  • TextBlob: simple model, similar to Vader but doesn't work for the social-media lingo.
  • Naive Bayes: probablistic model as you can guess by the name. Assume's the position of the word is irrelevant/independent of it's effect.

Here's a quick comparison of how they compared over both Tweet data-sets. Note: I normalised the sentiment values across models for better comparison.

NLP Model Comparison - Covid Dataset

[COVID-19 Dataset]

Interestingly the peaks and trough's are pretty consistent between models and the sentiment is mostly positive between models. Naive-Bayes is perhaps overly optimistic?

NLP Model Comparison - Lockdown Dataset

[Lockdown Dataset]

Unsuprisingly the sentiment of lock-down trends down over time.

Who was right?

Regional Sentiment Variations

One clear trend is that Scotland’s sentiment is almost always below England and Wales. My hypothesis was that stricter and more prolonged periods of lockdown endured in Scotland would result in suppresion of the populations mood over time. If you didn't know Scotland and England have separate parliaments(as do the other devolved nations) but the animosity between these two countries are particularly harsh. I also had a sneaky suspicion that the Scottish population were less likely to be happy with Boris Johnson due to the political climate (Brexit, Indepedence etc). Callum 1-0 Bob

Naive-Bayes: Sentiment across countries 2020-2021

Ayrshire and Fife were the grumpiest counties. As an "Auld Reekie" i.e. someone from Edinburgh (translation: Old Stinky due to the fumes in the Old Town back way before I was born), I find it funny that our neighbours are so vocally angry on Twitter. Though I guess this doesn't differ much from their day-to-day attitude.

Naive-Bayes: Happiest and saddest counties

Numb-ness to Deaths and Infections

Sticking with Scotland, though the trends are broadly the same across England, Wales and Northern Ireland, you may observe some clear patterns. At the start of June, COVID deaths had decreased by 75% from the previous peak in April. This coincided with the beginnings of an upward trend in how the public were feeling. Throughout June and July, sentiment remained above average. Brit's do love their time in the sun after all.

[Naive Bayes] Sentiment vs COVID infection and death rates.

However, through August, sentiment began to decrease substantially, reaching its lowest point since May 30th. The correlation between public sentiment and pandemic-related deaths and cases is strong between January and February. During these months, sentiment remained low as COVID deaths reached an all-time high. This peak in deaths corresponded with the lowest sentiment recorded since November. By the end of February, as COVID deaths decreased by 60% from their all-time high, sentiment began to recover.

Callum 2-0 Bob.

So what [else] do you know now?

If you didn't get the "You're Dead to Me" reference then we probably can't be friends, I'm sorry.

Statistic Overview

Making use of Guardian's News API, we can figure out why certain dates stood out. The day with the lowest lockdown sentiment was the 3rd of January 2021. This is also the day Boris Johnson announced that coronavirus restrictions would likely get tougher.

[England, Naive-Bayes] Lockdown Sentiment versus Covid Rates

The day with the highest Covid sentiment across the UK was the 21st of March 2020. Again the Prime Minister Boris Johnson announced the people of the UK can ’turn the tide of coronavirus’ within 12 weeks.

[England, Naive-Bayes] COVID Sentiment versus Covid Rates

On the 3rd of October, Dominic Raab announced that he feared Boris Johnson might die when he was taken into intensive care. Though I was half expecting Scotland to rejoice. But alas. The next day would only worsen: Scotland’s COVID cases doubling in a week; the Prime Minister saying the road to Christmas will be ’bumpy’; Conservative members turn on Boris Johnson over the handling of the pandemic and a document revealing plans for different local lockdown tiers is leaked. Understandably, these events caused the lowest recorded sentiment for the whole of the UK on the 4th of October. Not great.

Fini

I may as well give you this graph given that Vader enables the functionality. I'll leave it up-to you for interpretation.

Emoji Sentiment
Oh and here's a word-cloud for fun.
Word Cloud

Enough rambling, have fun exploring the data here.