Introduction

The coronavirus disease (COVID-19) impacted people across the globe and dramatically changed lives, impacted livelihoods and restricted liberties at an unprecedented speed and scale [1]. Given the pathogen’s exponential growth and the absence of a vaccine, governments in sub-Saharan Africa (SSA) implemented strict non-pharmaceutical interventions (NPIs), e.g. lockdowns with all but essential internal travel banned, mandated or voluntary work-from-home, closures of school, non-essential businesses and international borders, bans on large gatherings in religious institutions, entertainment and sport centres, curfews and quarantines to isolate symptomatic individuals and their contacts, as well as behavioural changes (e.g., the use of face masks in public) [2,3,4]. This was done in a bid to flatten the curve and reduce patients’ burden on the largely underfunded and already strained health system as they dealt with the pandemic’s effects [5].

Studies have indicated that the restriction of liberty, morbidity and loss of lives due to COVID-19 have far-reaching implications on the mental health and subjective well-being of the populace [6,7,8]. For instance, the pandemic and the resultant measures affected people’s employment status, created financial insecurity, isolated individuals from their social circles, leading to loneliness, and exacerbated pre-existing mental problems due to the fear of contracting the virus, anxiety about the future, and grief from losing loved ones [9,10,11,12]. The state of one’s mental health and subjective well-being could affect their choices, behaviours and outcomes, thereby potentially impacting their future physical health and longevity [13].

This paper estimates the impact of the COVID-19 pandemic-induced school closures on the relative search volumes (RSVs) of well-being-relevant topics in 30 low- and lower- middle-income countries in SSA. The study adopts graphical analyses, difference-in- differences (DiD) and event study to assess the association between the timing of school closures and changes in topic searches. The data was sourced from Google Trends® (GT), a publicly available real-time source of data that can be useful in analysing public reactions to social policies when traditional (questionnaires and face- to-face interviews) or virtual (phone surveys, web surveys and video conferencing) methods cannot be frequently used, are costly, time-consuming, and limited in scope, e.g., in emergencies where participants are hard-to-reach or hard-to-survey [14]. This study, to our knowledge, is the first to estimate the impact of the COVID- 19 pandemic on well-being-related GT searches in SSA. The study contributes to the literature on the impact of COVID-19 on well-being, particularly on those that use GT data to answer research questions on health and social issues [7, 8, 11, 15].

The rest of the paper is structured as follows. Section 2 describes the study’s context and the literature. Section 3 describes the data and the analytical strategy. Section 4 presents the results, Sect. 5 discusses the study’s findings, strengths and limitations. Finally, Sect. 6 concludes the study.

Context of the study

COVID-19 pandemic and government responses in Sub-Saharan Africa

The 2020 coronavirus outbreak, declared a pandemic on March 11 2020, is the largest challenge to public health in this century [16]. As of December 2021, over 280 million people had been infected, and over 5 million deaths reported globally [17]. In SSA, the first case was confirmed on February 28, 2020, in Nigeria [18], and the first death was reported on March 13, 2020, in Sudan [16] (Table 1 below). Following the first case in Nigeria, other SSA countries in this study confirmed their first cases between March 2 and May 13, 2020. As of March 9, 2020, the first ten cases in SSA were confirmed and reported in Cameroon, Nigeria, Senegal, South Africa and Togo. As of March 22, 2020, the first ten deaths were confirmed and were reported in Burkina Faso, the Democratic Republic of Congo, Gabon, Ghana, Mauritius, and Sudan. As of September 2020, more than one million confirmed COVID-19 cases and more than 25,000 associated deaths were reported, with South Africa, Ethiopia, and Nigeria having more than 50,000 cases and 1,000 deaths [19].

Regarding NPIs, school closures were first initiated in Mauritius on March 10, 2020 [20]. By March 31, 2020, 38 countries had closed their educational institutions disrupting learning activities for over 237 million students [20]. The length of the school closures varied among the SSA countries, with some countries introducing partial openings within one month (e.g., Madagascar) to nine months (e.g., Sudan). To ensure continuity of learning, countries introduced distance learning modalities, including instruction through radio, TV and online channels [20]. In addition to school closures, several countries had localised or national lockdowns. For instance, the Democratic Republic of Congo first initiated a localised lockdown on March 19, 2020, and Rwanda initiated a full lockdown two days later [21] (Table 2 below). Among the 30 countries in this study, only eight adopted nationalised lockdowns (Angola, Djibouti, Kenya, Lesotho, Republic of Congo, Rwanda, Uganda, and Zimbabwe) [21].

Table 1 Starting dates of COVID-19 in Sub-Saharan Africa and the world
Table 2 Starting dates of the COVID-19 pandemic in Sub-Saharan Africa

COVID-19’s impact on well-being

Mental health and well-being are essential for individuals to realise their potential, cope with the normal stresses of life, work productively, and contribute fruitfully to their community [25]. Poor mental health and well-being adds to the global burden of disease, lowers the quality of life and have substantial socioeconomic costs [26]. Extreme events such as COVID-19 have direct and indirect implications for mental health and well-being [27, 28]. For instance, the stringent NPIs implied unprecedented loss of usual routine, changes in day-to-day lives, disruption in learning, loss of jobs and sources of income, an increase in informal employment, and physical isolation from families, friends, and acquaintances [10, 29,30,31,32,33]. The by-products of school closures such as unemployment, social isolation (due to disruption in learning and entertaining), and lack of freedom, are common risk factors for social dysfunction and poor well-being [12, 34, 35]. For young people, feelings of fear, anger, sadness and boredom were among the emotions shown during this period [31, 36], as the restrictions prevented them from attending school in-person and having physical interactions with peers [37]. Although positive steps can be taken to improve well-being (learning new skills, staying close to family members and friends virtually, doing exercise and expressing love to friends), they require mental fortitude to cope psychologically with the new normal stresses of life [38].

Materials and methods

Sample and study design

This paper estimates the association between COVID-19 school closures and well- being-related topic searches in 30 SSA countries (Table 2 below). The 30 countries were purposively sampled from the list of 48 countries across the four regions of SSA (Central, Eastern, Southern, and Western Africa) [39], based on the availability of the Google Trends data for the topics under investigation. In addition, these countries were among the 38 countries that had imposed school closures as of March 31, 2020 [20] following the declaration of COVID-19 as a pandemic [16]. Please refer to Fig. 1 below for the flowchart depicting the sample selection process.

Fig. 1
figure 1

Flowchart of the sample selection process

Data source and data query

The data was extracted using the GTrends R package [40, 41], which automatically retrieves search data from the GT Explorer Tool, which is an index scaled from 0 to100, indicating the popularity of searches during the study period [15]. On a particular day, if there is insufficient RSV the value is zero, and 100 represents peak popularity [42]. The two-letter code provided by the explorer tool was used to restrict the geographical location for each country. For instance, data on Nigeria was extracted using ’NG’ as the code (see https://trends.google.com/trends/?geo=NG).

We relied on daily and weekly search data collected in June 2021 for January to August of each year (2019 and 2020), and the 2019 data acts as a counterfactual dataset. The study period coincides with the dates when schools were closed in March 2020 (Table 2 below for details). The school closure dates provided by the United Nations Educational, Scientific and Cultural Organisation (UNESCO) [20], were used instead of the lockdown dates since many SSA countries did not impose national lockdown. Furthermore, the school closure dates mostly preceded and lasted longer than the lockdown dates for countries that imposed localised or national lockdown. Using the school closure dates helps account for any psychosocial effects that may have emerged as soon as mobility restrictions were adopted. Additionally, school closures have been linked to poor mental well-being due to their effects on the daily routines of school-going individuals, their parents/caregivers, and their family members [36].

Furthermore, the study period coincided with marked concerns and changes in circumstances due to COVID-19 and changes in population circumstances [11]. To ensure comparability with the 2020 data, we applied Brodeur et al.’s, (2021) [7] scaling procedure which adjusts for seasonal fluctuations and complications due to unexplained peaks, valleys, and null searches over weeks. This entails generating weekly search interest weights, using the weights to re-scale the daily data for each by topic i and year t; D¯i,t, and then normalising them to a range of 0 to 100 [7].

Measures

We selected the macro topics for the study following a review of related articles on the impact on COVID-19 on searches for mental health and subjective well-being [6,7,8]. The final topics were grouped into three themes: Social dysfunction (Anger, Boredom and Loneliness); Anxiety (Fear, Panic, Sleep and Worry); and Sadness (Sadness and Suicide) [6,7,8]. To accommodate related search terms and account for differences in upper and lower cases, as well as group words that share the same concept in any language, the study adopted topic queries instead of search terms. The advantage of using ‘topic queries’ is that it includes the semantics of the words as they cover all search terms related to the keywords [37].

In addition to the aforementioned topics, we analysed the impact of school closures on an unfiltered sample of search requests for two plausible coping mechanisms during a crisis: prayer and exercise. In the SSA region, on average, 96% of adults identified as religious: 63% identifying as Christian, 30% as Muslim, and 3% as practitioners of folk or traditional religions [38]. Research indicates that religion plays a significant role in people’s lives, particularly during times of crisis when individuals must confront unpredictable and overwhelming events like natural disasters, the death of a loved one, or life-threatening illnesses or accidents. Prayer serves as a means of finding comfort, seeking explanations, and fostering a closer relationship with God [39, 40]. For example, following the Christchurch New Zealand earthquake, individuals reported increased religious faith [41], and after the September 11, 2001 terrorist attacks, 90% of Americans reported relying on religion to cope with the aftermath [42]. Furthermore, research has shown that exercise can be a protective factor against poor mental health [43].

Analytical strategy

Initially, we utilized graphical analysis to illustrate the trends in mental health and well-being-related search patterns. Following this, we employed the difference-in-difference (DiD) estimator to assess the combined impact of the COVID-19 pandemic and school closures on searches related to well-being. To account for seasonal variations within countries, we compared pre- and post-pandemic search patterns in 2020 with the same period in 2019. Finally, we conducted an event study analysis as a robustness check for the main DiD estimates and to examine the effects of population adaptation to the pandemic and the school closures. All analyses were conducted using Stata version 14 (StataCorp LLC, Texas, United States of America) and statistical significance was set at the 5% level.

Difference-in-differences estimator of school closures

The DiD regression model is as follows:

$$\eqalign{{WB}_{ i,c} & ={\alpha T}_{i,c} \times {Year}_{i}\cr & +{\beta T}_{i,c}+{\delta X}_{i-1,c}+{\mu }_{i }+{\rho }_{c }+{\epsilon}_{i,c}}$$
(1)

where WBi,c denotes the RSV on day i for country c. The estimate α reflects the impact of a school closure on the RSV for topic WB on day i in country c. Ti,c is a dummy that equals one for days after the school closure and zero otherwise, while Yeari corresponds to 2020. Equation 1 adjusts for seasonal variations or weekly cycles using the year, week, and day fixed effects in the vector µ, and the country fixed effects ρ. The identification strategy in Eq. 1 depends on two assumptions: (1) school closures vary between the countries. and (2) the comparison of the Google search intensity (RSV) for topic WB before and after the school closure date in 2020 to the difference in the RSV for the same topic before and after the same date in 2019. The standard errors are robust and clustered at the day level. The variable Xi−1,c controls for COVID-19 intensity data extracted from the OxCGRT data [43], defined as the lagged number of confirmed COVID deaths per day per million in each analysed country.

The DiD approach has a significant limitation and in this study it is associated with an individual’s level of awareness of the COVID-19 pandemic. For instance, an individual may decide to distance themselves physically for reasons unrelated to NPIs, which could result in loneliness and reduced well-being. Our baseline equation’s key assumption is that, in the absence of school closures, the average Google user’s search behaviour in the sample countries would have followed the same trend observed in 2019. This means that ‘the trajectories across areas would have evolved to preserve pre-existing differences, so any subsequent deviations between areas can be attributed to the pandemic’ [44]. This assumption would be invalid if individuals residing in the countries in the sample experienced specific shocks that differ from those experienced in 2019.

Event study estimator of school closures

The event study model is defined as follows:

$$\eqalign{{WB}_{ i,c} & ={\sum }_{k=-3}^{k=10}{\alpha }_{k}^{{\prime }{\prime }}{E}_{k,c}\times {Year}_{i}+{\sum }_{k=-3}^{k=10} \cr & {\beta }_{k}^{{\prime }{\prime }}{E}_{k,c}+ {\gamma }^{{\prime }{\prime }}{X}_{i-1,c}+{\mu }_{i}^{{\prime }{\prime }}+{\rho }_{c}^{{\prime }{\prime }}+{\epsilon}_{i}^{{\prime }{\prime }}}$$
(2)

where \({E}_{k,c}\) is a set of dummy variables that takes the value of one for the three weeks before the schools were closed in each country and the ten weeks after (which is interacted with the dummy variable \({Year}_{i}\) for the year 2020). The reference period is the fourth week before the school closures and takes the value of zero. The \({E}_{k,c}\) dummies are the estimated coefficients and indicate the effect of being in a particular week after school were closed (for example, the sixth week, (\({}_{6,c}\)) compared to four weeks before. Equation 2 also adjusts for the year, week, and day fixed effects in vector \({\mu }_{i}^{{\prime }{\prime }}\) to account for seasonal effects, and the country fixed effects \({\rho }_{c}^{{\prime }{\prime }}\) that consider for time-invariant differences across the countries.

Results

Graphical analysis

To illustrate the pre- and post-school closure search patterns, figuresS1-S4 (see supplementary material) show the raw daily searches for the topics 56 days before and 28 days after schools closed due to the pandemic. The red and black lines represent the average searches for 2020 and 2019, respectively. Overall, we observed considerable variation in daily searches over time. The RSVs for anger, boredom and prayer increased sharply around the time of school closures in 2020. The figures also display noticeable increases in anxiety-related topics, and fear peaked in the second week of school closures. However, the uptick in panic began two weeks before the school closures. Regarding sleep and worry, the results suggest that the RSV began to rise around the school closure dates but peaked at different times. Specifically, the RSV for sleep peaked in the second week after school closures, whereas searches for worry reached their highest point at the end of the first week.

The search for sadness peaked in the second week of school closures, while no clear patterns were observed for the raw searches related to suicide. Finally, searches for exercise saw an uptick in the second week of school closures and peaked at the end of the third week following the school closures.

Difference-in-differences estimation results

Figure S5 (See supplementary material) depicts the estimated effects, while Table 3 presents coefficients. The findings indicate a significant increase in the RSV of anger and boredom at the 1% level. The model coefficients in Table 3 suggest that the RSV for ‘Boredom’ was approximately 10 times higher (α = 9.64, p < 0.001) post-school closure, compared to the pre-school closure period. School closures were also significantly and positively associated with the relative search volume for ‘Anger’. The RSV for anger was, on average, 6.7 times higher (α = 6.65, p < 0.001) post-school closure, relative to the pre-school closure period. There was no evidence of an association between school closures and the relative search volume of loneliness.

The results for anxiety-related topics (fear, panic, sleep and worry)are mixed. The coefficients for fear (α = 5.18, p < 0.001) and sleep (α = 1.93, p < 0.001) are positive and statistically different from zero, while the coefficient for panic (α = -2.87, p < 0.001) is negative and statistically significant. There was no evidence of an association between school closures and the relative search volume for ‘Worry’. Additionally, the coefficients for sadness and suicide are positive but statistically insignificant. Finally, the results show a positive and significant association between school closures and the search intensity for the coping-related topics: prayer and exercise. The RSV for prayer was approximately 4 times higher (p < 0.001) post-school closure, relative to the pre-school closure period. For exercise, the RSV was on average 2.2 times higher (p < 0.001) post-school closure, relative to the pre-school closure period.

Table 3 The Effects of School Closures - DiD Estimates (Figs. S1-S4).

As previously stated, to test the sensitivity of the estimates, we restrict the sample to 13 countries (Angola, Eswatini, Ethiopia, Guinea, Kenya, Liberia, Nigeria, Republic of Congo, Sudan, The Gambia, Uganda, Zimbabwe) with high death rates per million population and high average stringency index. We find that the results are quantitatively similar (Fig.S4 and Table 4 below). It is not surprising that the the estimates for anger, boredom, fear, panic, exercise, and prayer are larger, and similar conclusions can be drawn regarding the effects of school closures on well-being-related Google searches.

Table 4 The Effects of School Closure Order - DiD Estimates (Robustness Checks)

Event study results

As explained above, we conducted an event study analysis to examine adaptation to the pandemic and the associated school closures. The results are presented in Figures S6, S7 and S8 (See supplementary material) for social dysfunction, anxiety, sadness, and coping, respectively. The findings suggest that the effects of school closures on well-being related topics are mixed. For instance, searches for boredom began to rise before the school closures and lasted for about five weeks. Additionally, the RSV for fear increased weeks before the school closures but began to decline at the school closure and dropped to zero by the fifth week (see the first graph in figure S7). The searches for exercise began to rise in the week before the school closures, and remained above the baseline level for 10 weeks post-school closure. Finally, the effects on prayer began to rise before the school closures and remained higher than the baseline level for 7 weeks following the school closures.

Discussion of findings

In response to the threat of the COVID-19 pandemic, governments worldwide implemented school closures as part of mobility restrictions. This study utilised multiple approaches to estimate the impact of the pandemic-induced school closures on mental health and well-beings, as well as coping strategies in selected Sub-Saharan Africa (SSA) countries. We quantified this impact by examining changes in the search volume for topics related to three themes on Google Trends (GT): Social dysfunction (Anger, Boredom and Loneliness), Anxiety (Fear, Panic, Sleep and Worry), and Sadness (Sadness and Suicide). Searches for two coping mechanisms, namely exercise and prayer, were also included in the analysis. We leveraged the availability of GT data, and the temporal and cross-sectional variation in school closures to provide a unique opportunity to estimate the population’s responses to school closures.

The study findings produced mixed results. On one hand, pandemic-induced school closures had a positive and statistically significant effect on the search volume for anger, boredom, fear, sleep, prayer and exercise. The event-study results indicated that the higher search volume lasted for several weeks following the school closures. For example, increased searches for boredom and fear persisted for approximately five weeks, while those for prayer lasted for seven weeks, and exercise lasted for about 10 weeks. On the other hand, we observed significantly lower searches for panic. Finally, we find no discernible evidence of an effect of school closures on topics related to loneliness, sadness, suicide, worry.

Previous studies that tracked temporal changes in health and well-being-related topics before and during the pandemic’s mobility restrictions [6,7,8, 42, 45] also noted higher search volumes for topics related to boredom and anger. If we assume that Google users search topics based on their mood, the findings suggest that the population was more bored during the school closures. However, over time, these searches decreased which could be due to adaptation to the “new normal” and the introduction of online learning and working strategies adopted in different countries [7, 20]. Anger is also a basic emotion experienced during the pandemic. It has been noted in the literature that the fear state (fear of the disease and fear of change due to the disease) which was evident during the pandemic, can trigger anger [46]. For instance, the lack of proper communication and education about NPIs (e.g., wearing of face masks while outdoors) may have caused arguments and confrontation regarding political control of people’s liberties [47].

The lack of discernible effects of school closures on loneliness could be attributed to the availability of social media platforms (such as Facebook, Instagram, TikTok, and YouTube) and online messaging platforms (such as WhatsApp), which may have allowed for frequent virtual contact with family and friends, as well as entertainment. These virtual means of staying connected and receiving emotional support may have mitigated the negative effects of the pandemic, reducing the impact on loneliness [48]. The presence of social media may have presented the opportunity for individuals to find creative ways to fulfil their need for social connection.

It is not surprising that school closures had no significant impact on the relative search volume for sadness and suicide. Like loneliness, the presence of social media and online messaging platforms may have reduced the impact of the physical restrictions on sadness, thus decreasing the likelihood of suicidal ideation or thoughts. In addition to virtual social contact, the sense of a “coming together” phenomenon during the crisis, the availability of financial safety nets, and the decline in the monetary and psychosocial costs of commuting, especially for poorer individuals who travel long distances to school and work, may have moderated the negative effects of COVID-19 [49, 50].

The finding of a positive effect on prayer is consistent with other studies conducted in countries with a higher prevalence of religious populations, including those with large populations of Christians and Muslims, as well as countries where religion is practised sporadically or not at all [51, 52]. Prayer can have a positive effect on mental health and improve well-being by helping people cope with stressful situations, thereby reducing anxiety and tension [53]. This effect is particularly pronounced for individuals who regularly confront adversity [51]. Bentzen [51] noted that during times of adversity or uncertainty, when people need to cope, their use of religion is mainly intrinsic (such as private prayers for relief, understanding, and comfort) rather than extrinsic, such as attendance at religious institutions like churches. However, comparing these motivations and determining whether the rise in searches for prayer is permanent is beyond the scope of this study.

The results for the higher search volume for fear confirm the finding of other studies that the pandemic and the NPIs introduced to curb the transmission of the coronavirus introduced anxiety, especially at the early stages of the pandemic [7, 11]. The increased searches for fear could be attributed to several factors including the fear of contracting or having a loved one infected with COVID-19, as well as concerns about economic insecurity and future prospects [6, 54]. Fear-related searches by the population began before the school closures were implemented, which is consistent with the findings of other studies [45, 55]. The literature suggests that fear surrounding infection began to increase shortly after COVID-19 was declared a pandemic in the absence of an effective treatment, and began to decrease as mobility restrictions were imposed and people adapted psychologically to the presence of COViD-19 [45, 55].

Similarly, the increase in panic-related searches began before the implementation of school closures, which can be attributed to the observation of the pandemic’s development in other countries and the panic-buying that arose as people planned for possible mobility restrictions [56]. The heightened searches for sleep and exercise may be linked to the increased boredom and fear among the population. Given the sudden changes in daily life and more time on their hands, individuals may increase their online searches, looking for guidance on improving sleep quality or including forms of exercise to include into their daily routine [57], or have become more aware of the benefits of sleep and exercise for physical and mental health [58].

Strengths and limitations

This study utilised data from GT® to investigate the association between COVID-19 pandemic-induced school closures in SSA countries and searches for key mental health and subjective well-being topics. GT® provides an alternative to traditional data sources as it provides another source of data. The data can be seamlessly exported into a comma separated value (.csv) file and imported into analytical software such as Stata for analysis. Although imperfect, the GT® data allows researchers to use big data and circumvent some of the biases that are common in survey data, such as self-reporting bias (where survey respondents may not disclose the truth), recall bias (due to the time lag between the event and the survey), and social desirability bias (due to perceived interviewer-expectations). Another key advantage of the GT® data is that it allows researchers to document public responses and examine the effects of the COVID-19 measures on well-being at a time when data collection was expensive, and participants were harder to reach. Moreover, it allows for the exploration of associations between mobility restrictions and mental health and well-being for a large group of countries.

Despite the benefits, there are limitations that warrant discussion. First, the nature of the data does not allow heterogeneity based on the searchers’ sociodemographic characteristics, such as age, sex, housing conditions, educational level, occupation, perceived risk of infection, and access to mental healthcare services. Second, the sample is not representative of the population, as most of the internet users in the region are young and relatively well-off, those who can afford smart devices and internet data costs. Thus, the results may be skewed towards predicting the searches of this group and ignore vulnerable groups, such as the poor, elderly, and those living with pre-existing mental health issues or disabilities who may not be active searchers. Third, the data does not efficiently account for unique social, political, and economic realities that present diverse experiences within and across the countries under investigation.

Conclusion

The COVID-19 outbreak posed a significant threat to population health and well-being. This paper assessed the association between COVID-19 school closures and searches for anger, boredom, loneliness, fear, panic, sleep, worry, sadness, suicide, exercise, and prayer in selected countries of Sub-Saharan Africa using GT® data. The study provides evidence demonstrating the potential for GT® data to be leveraged as a data source for understanding how populations across countries reacted to the COVID-19 pandemic and the resultant social policies. Although the increases in the relative search volumes of several well-being related and coping topics (anger, boredom, fear, sleep, exercise, and prayer) may not necessarily indicate individuals developing long-term mental distress and poor subjective well-being, they highlight the importance of increased vigilance and proactive communication from the government and policy makers to the general population. These are necessary in emergencies when social policies that restrict lives, livelihoods and liberties must be adopted. The study’s findings should be interpreted as the average impact of the mobility restrictions on the well-being interests of Google Search users pre- and post–school closures in 2020 to the same period in 2019, and not taken as a ‘window into the soul’ of the population. It is important that SSA countries collect detailed surveys on mental health and well-being, which can be triangulated with GT® data to provide reliable evidence for policies on population health and well-being.