Ghana Twitter Trends Explained: Social Media Usage and Sentiment Analysis

Ghana has around 15 million social media users, a number expected to increase in the coming years. Besides the growing usage, these platforms are also the most preferred by the country’s population. Also, most users are on the platforms primarily to keep in touch with friends and family, fill their spare time, or make new connections.

For most social network platforms, the share of male users was higher than that of women. Around 60 percent of them were men, while the remaining percentage were women. For instance, male Instagram users covered over 55 percent of the total usage, which was dominated by people aged 18 to 34 years. In Ghana, the majority of the people that advertising firms could reach on social media were men and women between the ages of 25 and 34 years.

With the advent of social media, people resort to sharing their opinions and interacting with peers, thus generating vast volumes of social media content.

What is Sentiment Analysis?

Sentiment analysis, often known as opinion mining, is an approach to natural language processing (NLP) that determines the emotional tone behind a body of text [3]. Sentiment Analysis (SA) and Opinion Mining (OM) are used interchangeably.

Sentiment Analysis detects and analyzes the sentiment represented in a document, whereas Opinion Mining extracts and analyzes people's opinions on a subject. As a result, SA's purpose is to find people with strong beliefs, figure out what they are saying, and then characterize their polarity. Sentiment analysis is concerned with a text's polarity (positive, negative, or neutral), but it may also detect specific moods and emotions (angry, joyful, sad, etc.), urgency (urgent, not urgent), and even intents (interested versus not interested).

Fine-grained Sentiment Analysis: Graded Sentiment is used to understand ratings. Emotion detection: Emotion detection sentiment analysis deals with interpreting emotions like happiness, frustration, anger, and sadness. Aspect-Based Sentiment Analysis: It assists in determining which conversation components are being discussed. Intent Analysis: The intent analysis can assist figure out whether a customer is looking to buy anything or is just looking around. When these fundamental notions are combined, they form a powerful tool for evaluating millions of brand dialogues with human-level accuracy.

Read also: Baskets from Ghana

Sentiments have been shared on various mainstream tabloids and social media through posts, comments, and reactions. People shared their opinions on the mammoth anti-government protest in the 1995 dubbed “Kume Preko,” literally translated as “kill me now” demo. This protest was held to express displeasure at the Jerry John Rawlings’ government’s introduced Value Added Tax (VAT) idea and the untold economic hardships experienced by Ghanaians at the time [4]; all these were sentiments.

Sentiment Analysis is a term that refers to the application of Natural Language Processing (NLP), text analysis, and computational linguistics to determine a speaker's or writer's opinion toward a particular issue [5]. It aids in determining whether a text expresses good, negative, or neutral thoughts. Sentiment analysis is one of the most popular research topics in Natural Language Processing. Opinion mining, recommender systems, and event detection are a few of sentiment analysis's scientific and commercial applications [6].

Ghana had approximately eight million social media users as of January 2021, according to Statista.com. Anguish, as well as pleasure, can be used to indicate rejection or approval of specific regulations. Therefore, there is a need to conduct sentiment analysis on the proposed E-Levy introduced by the government of Ghana. The two primary strategies for sentiment analysis are lexicon-based and machine-learning-based approaches. The article aims to understand how the general public feels and reacts in response to this new government policy.

This study proposes a sentiment analysis concept to understand users’ reaction to the proposed E-Levy policy by the government. With the increased usage of social media in the recent times, user sentiment analysis is an impressive tool to understand the emotions of a target audience. This paper shall guide governments, state agencies, and industries to make informed decisions to strategically propose, announce and impose policies.

Methodology

Our strategy assumes that people use social media platforms to express their feelings, opinions, attitudes, and sentiments. These emotions and thoughts are communicated through short sentences that include terms and words that represent their hidden beliefs and attitudes about laws, concepts, and other topics. The language and words employed to symbolize the hidden driving forces of people's views about the electronic levy are considered in this scenario.

Read also: Ghanaian Business Profile: Franko Trading

Fig. 1 Sentiment analysis workflow of the study

We first identified a specific hashtag in the sample of collected tweets. We collected the tweets containing the hashtag using Python’s snscrape library. Next, the collected data was pre-processed turning raw data into a format that computers and machine learning can understand and evaluate [17]. The pre-processing steps included text cleaning, stemming and lemmatization, and stopword removal.

After preprocessing, we performed text feature representation and selection, selecting the most robust qualities that reflect a text and could be utilized to successfully and efficiently forecast the sentiment class of the text [18,19,20,21,22,23,24,25]. The polarity of each tweet is computed to determine the sentiment in each data sample. The collected data is divided into five different categories: phase 1, phase 2, phase 3, phase 4, and phase 5. The phases were deemed necessary for our study to ascertain the real sentiments of the citizens from when the e-levy policy was first announced in parliament to when it gained traction in the mainstream and on social media. Finally, we compare the user sentiments in each of these phases.

Data Collection

Ghana had over 16 million internet users as of January 2022, up from 15.70 million in 2021 and 14.76 million in 2020 [26]. The country had approximately eight million social media users as of January 2021 [26].

Fig. 2 Internet usage trend in Ghana

Read also: Ghana Soccer Jersey

Snscrape returns thousands of tweets in seconds, and its extensive search features allow highly customizable searches. We filtered the tweets using the hashtag #elevy in all the tweets posted between November 17, 2021, and January 31, 2022. We filtered Ghana as the targeted country because the electronic levy tax on mobile transactions was specific to the residents of Ghana.

During the first phase from November 17, 2021 to November 30, 2021, 1400 tweets were collected. This could be referred as the ‘Policy Introduction’ phase. This was when the policy was first announced in the parliament by the Ghanian finance minister. The mainstream media started discussing the policy and gaining citizens' attention. This phase recorded the least recorded data, attributable to the policy's novelty.

The second phase recorded 4554 tweets between December 01, 2021 and December 14, 2021. The data collected in phase 2 increased due to the popularity the policy gained since its announcement, thus named as the ‘Popularity Phase’. The topic was widely discussed in the media and on social media. The third data collection phase, named as the ‘Discussion Phase’, dates from December 15, 2021 to December 30, 2021 with a total of 7679 tweets. The minority and majority caucuses met to discuss whether the electronic levy tax should be accepted, and more people were aware of the policy. Both sides engaged in a heated argument, and Ghanaians voiced their opinions and feelings about the policy.

Furthermore, the fourth and fifth phases were from December 31, 2021, to January 15, 2022, and January 16, 2022 to January 31, 2022, with a total tweet of 1,701 and 18,423, respectively. Our research shows that due to the Christmas holiday, there was little discussion about the policy in phase 4, thus named as the ‘Feeble Phase’ when the people's attention got drawn away from the electronic tax. Phase 5, the ‘Debate Phase’, recorded the highest amount of data. The issue was debated in the parliament, and public opinion was expressed on both traditional and social media. A total of 33,757 tweets were used for our analysis. The tweets were scraped using the Python snscrape package, and the codes were executed on the Google Colab platform.

Table 2: 2-Week interval tweet collection
PhaseDatesNumber of Tweets
Phase 1November 17, 2021 - November 30, 20211400
Phase 2December 01, 2021 - December 14, 20214554
Phase 3December 15, 2021 - December 30, 20217679
Phase 4December 31, 2021 - January 15, 20221701
Phase 5January 16, 2022 - January 31, 202218423

Data Pre-processing

Data pre-processing involves cleaning and preparing the text for classification [41,42,43]. Noise and uninformative sections such as HTML tags, scripts, and ads are common in online writings [27]. We decreased the text noise to help increase the classifier's performance and speed up the classification process, allowing for real-time sentiment analysis. The terms or phrases (features) that represent the positive or negative opinion most strongly are extracted.

The following steps are used in our pre-processing approach: online text cleaning, white space removal, expanding abbreviations/contractions, stemming, stop words removal, negation handling, and finally, the feature selection filtering stage.

Feature Selection

Feature selection is also known as variable selection or attribute selection. The automatic selection of attributes in the data is performed to identify and remove data's unneeded, irrelevant, and redundant attributes. We employ the Term Frequency-Inverse Document Frequency method to select the desired features.

Polarity Calculation

Sentiment Analysis (SA) is a widely discussed task in Natural Language Processing (NLP). There are a variety of approaches for determining the state of sentiment (positive or negative feeling) in a text [6]. After the data collection, pre-processing and feature extraction steps, we calculate the sentiment polarity to check the data's neutral, positive and negative counts, as in Eq. 3.

To categorize the tweets according to their sentiments, the tweets with a polarity score greater than zero are classified as positive, those with a polarity score less than zero are classified as negative and the rest are classified as neutral.

Results and Findings

In this section, the results and findings of the paper are presented. It provides an in-depth analysis of various sentiments related to the E-Levy in Ghana, gathered from Twitter data.

Popular articles:

tags: #Ghana