1. Introduction
The Sustainable Development Agenda approved by the United Nations (UN) in 2015 is embodied in 17 Sustainable Development Goals (SDGs) and 169 associated targets to be achieved by 2030. This marked a significant milestone in global debate on issues ranging from education, gender equality, and the elimination of poverty to the fight against climate change, defense of the environment, and the design of our cities. One of these SDGs affects green energy. SDG 7 seeks to guarantee access to affordable, reliable, sustainable, and modern energy for all [
1]. This goal includes: 7.1. assuring universal access to energy services, 7.2. increasing the share of renewable energy in the pool of energy sources, 7.3. doubling the global rate of improvement in energy efficiency, 7.A. enhancing international cooperation to facilitate access to clean energy research and technology, and 7.B. expanding the infrastructure and upgrading technology to supply modern and sustainable energy services for all in developing countries [
2]. However, green energy does not only appear in SDG 7 as there are other goals such as SDG 13 (Climate Action) that are closely related to energy. At the end of the 20th century, the energy markets were oriented toward freedom of investment decisions [
3] but interest in caring for the environment and mitigating climate change had also started to raise interest in green energies. Green energy is clean and non-polluting energy that comes from 100% renewable sources, making it a more environmentally friendly and sustainable alternative to fossil fuels. Finally, taking into account the statement by the International Renewable Energy Agency (IRENA), asserting that doubling the share of renewable energies worldwide to 36% in 2030 would mean an increase in employment of more than 24 million people in the sector compared to the current 9.2 million and that the global economy would grow by 1.1% (the equivalent of 1.3 billion dollars), we can find significant synergies between green energy and others SDGs, such as SDG 1 (No Poverty), SDG 2 (Zero Hunger), SDG 3 (Good Health and Well-being), and SDG 8 (Decent Work and Economic Growth) [
4,
5,
6]. However, the adoption of the SDGs is taking place at a time when the world is facing serious social and economic problems, particularly the COVID-19 pandemic and the Ukrainian–Russo conflict. In this work, we aim to analyze how the 2022 Ukrainian–Russo conflict has affected social interest in green energy.
The terms “green energy”, “renewable energy”, and “clean energy” are often confused. Green energy is energy that comes from natural sources, such as the sun. Renewable energy is energy generated from resources that are continuously replenished, such as water. Clean energy is energy whose generation does not produce polluting emissions. There is consensus that all renewable energies are clean, but not all clean energies are renewable. Thus, nuclear energy is considered clean but not renewable energy. The difference between green and renewable energy raises more debate, for example, whether hydropower, which may require the modification of riverbeds and have an environmental impact, can be considered green energy.
The Intergovernmental Panel on Climate Change (IPCC) has published its Sixth Assessment Report (AR6), which will serve as the basis for the first global stocktaking of the Paris Agreement under the United Nations Framework Convention on Climate Change (UNFCCC) in 2023. The AR6 unequivocally shows the relationship between human activity and its responsibility for causing global warming. The IPCC indicates that without deep reductions in greenhouse gas (GHG) emissions in all sectors it will not be possible to limit global warming to 1.5 °C. This reduction requires global GHG emissions to be reduced by 43% by 2030, which also includes a substantial reduction in the level of methane emissions. However, despite all the recommendations included in the AR6, the prospects for improvement are not very good, due in part to the ongoing conflict in Ukraine, as some countries are reverting to coal and liquefied gas, which increase emissions.
The 2022 Ukrainian–Russo conflict is causing substantial damage to the global economy. In [
7], the author proved that after the war individuals expect lower economic growth and higher inflation, this effect being larger if the country has higher energy-import dependency. In [
8], the authors studied the impact of the conflict on the returns of stock markets all over the world and concluded that, as expected, the conflict had significant negative returns in all cases, these negative returns being larger in those countries that condemned the invasion and/or are geographically close to the conflict. In this vein, Ref. [
9] also found a negative impact of the conflict on stock markets, but they argued that variation at the country level is not only due to geographic proximity to conflict zones, but also to the importance of trade and economic ties with conflict countries. In spite of this, Ref. [
10] analyzed the impact of the Russia–Ukraine conflict from a capital market perspective and found that investors’ views on a possible acceleration of the green energy transition do not seem to be affected.
The Russo–Ukrainian conflict has led to sanctions against Russia and the goal of moving away from dependence on Russian gas and oil, resulting in other countries facing new dilemmas in their ambitious green energy transition plans. It should be noted that in the short term, many countries are once again thinking about coal and promoting new gas infrastructure as a way out of the current supply and price crisis. Although Frans Timmermans, Executive Vice-President of the European Commission, has indicated that “Putin’s war in Ukraine demonstrates the urgency of accelerating our green transition”, the increase in subsidies for oil and gas extraction casts doubt on the fulfillment of the commitment to reduce GHG emissions and expand renewable energies.
In the case of Europe, the International Energy Agency (IEA) has made a strong call for more renewable energy to reduce its dependence on Russia. Europe’s high energy dependency on Russia has hampered European efforts to counter 2022 Ukrainian–Russo conflict with sanctions, leaving the heavy lifting to the US, which has banned imports of Russian oil and gas.
In the midst of this difficult situation, the European Commission issued a statement on 8 March 2022, titled “REPowerEU: Joint European action for more affordable, secure and sustainable energy” in which it set out what measures should be implemented in the coming months to make Europe independent of fossil fuels originating in Russia. The REPowerEU plan calls for accelerating the use of renewable fuels (green hydrogen and biomethane) to replace gas and improvements in energy efficiency using renewable energy sources. European Commission President Ursula von der Leyen has said that the green transition must be accelerated. Executive Vice-President Frans Timmermans added that renewable energy is a cheap, clean, and inexhaustible source of energy that would create jobs in Europe.
The 2022 Ukrainian–Russo conflict is having medium and long-term repercussions that will boost green technologies which were previously being unevenly adopted by different countries. In this regard, the United Kingdom has drawn up a new energy strategy that affects sectors such as nuclear and renewable energies. Germany, despite missing its renewables deployment targets between 2010 and 2020, is bringing forward its deadline for a complete transition to renewables in its electricity sector to 2035. Italy has initiated talks to import green hydrogen from large solar installations set up in states such as Algeria and Libya. In the case of Spain, the installation of renewables has continued to grow at a considerable rate—although not without some peaks and troughs—reaching over 50% of electricity production by 2021. By the end of 2021, Europe and the United Kingdom had the capacity to produce around 49% of their electricity from renewable energies, almost twice as much as the United States.
The news and opinions that have been reaching us through the Internet about the 2022 Ukrainian–Russo conflict and green energy condition social opinion. One type of social opinion is the one collected through social networks such as Twitter, Facebook, Instagram, and LinkedIn, among others.
In [
11], the authors emphasized the importance and validity of social networks as gauges of human activity and sensors of human opinion. This is one of the reasons why the use of Twitter as a source of information to learn about public opinion is increasingly common in studies of different topics of general interest such as climate change [
12], sustainability [
13], financial education [
14], marketing strategies [
15], and the 2022 Ukrainian–Russo conflict [
16,
17,
18], among others.
Another relevant aspect is that the use of Twitter data allows us to capture the sentiment of society about a topic in an immediate and current way, which is a great advantage compared to information collected through surveys, whether they are periodic or punctual. Through the opinions expressed in social networks, it is possible to know the emotions and attitudes of public opinion on a topic. This sentiment analysis, also called opinion mining, is performed with the help of natural language processing (NLP) [
19].
In this paper, we examine the real-time effects of the 2022 Ukrainian–Russo conflict on the public’s perception of green energy using sentiment analysis on an extended sample of tweets. Knowing the trends of different topics of great interest to society, such as green energy, facilitates strategic decision-making by politicians, investors, and consumers. We utilize a collection of over 160,000 tweets from 16 February to 3 March 2022, that discuss green energy generated. The tweets were archived using the open-source program R. Our findings provide initial evidence of the immediate effects of the conflict, notably that green energy responded pessimistically to the negative events of the conflict. However, a high degree of hope regarding the future of green energy was perceived in the second period. Since the conflict started, a new debate has opened up about the need for a transition towards sustainable and green energy.
Our study reveals that once the impact of the conflict and the related negative emotions and sentiment passed, the light of a new opportunity to transit towards greener energy sources appeared, and sentiments such as trust or joy returned in our social listening. This is in line with the results obtained by [
20], who argued for using the opportunity presented by the need to eliminate energy dependence on Russian oil and gas to encourage governments to implement policies that promote the transition to green energy. In this vein, Ref. [
21] points out that the crisis arising from the situation in Ukraine can accelerate energy transition policies in the EU, although while these policies are being implemented the EU must secure energy supplies despite the sanctions imposed on Russia. Thus, Ref. [
22] find that Europe is likely to invest heavily in green energy and also in liquefied petroleum gas (LPG) import facilities to reduce energy dependence on Russia.
This work is novel and original in carrying out a text analysis of social listening on green energy in this period.
The remainder of the paper is arranged as follows.
Section 2 is a brief review of some of the literature on sentiment analysis and green energy. The following section is devoted to the methodology and data. The main results are provided in
Section 4 and, finally, conclusions are discussed in
Section 5.
2. Literature Review
Twitter is one of the most important and popular social media platforms. Since its appearance in 2006, millions of people have used Twitter to share opinions and reflections and it has become a very large source of information. Active users often learn about important news through Twitter before any other means. Currently, there are more than 1.3 billion Twitter accounts, publishing about 500 million tweets every day [
23]. In the last reporting quarter of 2021, the number of global monetizable daily active users (mDAU) on Twitter amounted to 217 million users and it is expected to grow upwards of 329 million in 2022 [
24].
There is no doubt about the importance and validity of social networks as gauges of human activity and sensors of human opinion [
25]. Although not everyone uses social networks to express their opinions, their widespread use supports their usefulness to gauge the opinions, attitudes, and sentiments of the general public [
26]. In [
27], the authors review the methods employed by different researchers using Twitter to measure public opinion and sentiment.
Twitter has been the subject of academic analyses that have focused on studying it as a means of information and communication in various fields, notably in relation to political and social issues, its use by populist politicians, during election campaigns (see [
28,
29] and the references therein), and concerning the COVID-19 pandemic [
30,
31]. Moreover, numerous researchers have shown how, in times of crisis and conflict, social networks play a key role in mobilizing people behind a common cause [
32].
A good example is the 2022 Ukrainian–Russo conflict. In [
17], the real-time effects of the escalating Ukrainian crisis on a series of economic indicators was examined and it was noted that most indices experienced a negative response to the conflict, with crude oil registering a strong, persistent response. In [
18], 33 million tweets were analyzed and it was found that most of them contain hashtags showing solidarity with the Ukrainian people. In [
33], this result was also obtained. These authors also explored the importance of information warfare and misinformation on social media during the conflict. In [
16], the authors found that Twitter deleted a significant number of tweets and users since the conflict began. They found that most of them misused Twitter, taking advantage of the Ukrainian government’s call for cryptocurrency donations by distributing unverified crypto addresses. In [
34], tweets related to the conflict in Ukraine were collected since its beginning, showing how negative feelings of sadness or rage were mostly related to tweets associated with Ukraine, as well as those in support of the country.
Another topic of interest in social media is climate change (see [
35] for a review of the literature). In [
12], the authors analyzed Twitter activity in Spain and the UK related to climate change and found that it was significantly related to the public demonstration and strike that happened in spring 2019. In Spain, the highest peak of social activity during their period of study occurred on June 29 when Europe was suffering an intense heatwave and Spain registered extreme temperatures. In [
36], communication about climate change on Twitter was analyzed. The authors focused on gender differences and found that men were more skeptical than women, who are more interested in the anthropogenic impact on the climate.
Concern about climate change necessarily leads to a focus on energy efficiency and the use of green or renewable energy. Again, social media can be useful to know the opinion of the population on this topic, and Twitter can help us to perform this social listening and know the pulse of society in real time. One of the most recent studies in this area is that of [
37], who analyzed a sample of tweets related to green energy during 2020 and found that the highest number of tweets coincided with events such as the anniversary of Earth Day or the broadcast of an election debate in which climate change was included for the first time. They also found that the majority of tweets were in English. Many other studies have analyzed views on alternative energies (renewable, green, clean) using social listening [
38,
39,
40,
41,
42]. Most of these works analyze the sentiments derived from different tweets.
Thus, in [
37] the sentiments revealed by tweets about green energy were analyzed, showing that they were mostly positive. The same result was obtained in [
12], where the opinion on Twitter in the UK and Spain about climate change and energy were studied and it was found that the populations of both countries support renewable energy. In [
38], the authors analyzed the discourse on Twitter related to renewable energy during 2017 and found that positive emotions were quadruple negative emotions; joy being the most frequent feeling. Similarly, in [
39] there was evidence of a positive relationship between public sentiment toward solar energy and renewable policies. Sentiment analysis was used by [
40,
41] to compare renewable energy sources. They found an optimistic attitude of people towards renewable sources of energy. A systematic review of the literature on the population’s opinion on renewable energies was made by [
42]. They found that the majority conclude that the population supports the use of renewable energies. In [
43], the authors indicated that it is important to understand the public’s concerns. In this way, a method can be created to resolve their objections to renewable energy in order to further expand renewable energy.
3. Methodology
In this research, we carried out a social listening analysis on green energy before and after 24 February 2022, the day when Russia invaded Ukraine. The methodology behind the analysis of this search is summarized in
Figure 1.
Social listening. In the first stage of the methodology, a database was created from tweets obtained by searching for the term “green energy” on the social network Twitter. The search was performed several times a day from 16 February 2022, to 3 March 2022. For this purpose, a script was developed using the R programming language with the Rtweet library, which facilitated communication with the Twitter graphical application interface (API). Repeated tweets were eliminated from the search results, obtaining a representative sample of the messages written by Twitter users during the period studied.
Text processing. Secondly, the text of the downloaded messages was cleaned with the help of R libraries (tidyverse, tidytext, stringi, and topicmodel) so that it could be analyzed later. Once the text was cleaned, words lacking semantic interest for the context of the study were removed. For this purpose, a dictionary of sensitive words to be eliminated was created from the stopwords dictionary provided by the tidytext library and from the words directly related to the studied topic that had little value in the analysis. The final result of the text processing was a corpus with clean text that could be analyzed using natural language processing (NLP) techniques.
Sentiment analysis. In the third phase, the emotions and sentiments conveyed in the studied social listening were identified. For this purpose, lexicon-based sentiment analysis was performed, comparing the text of the tweets with terms from the NRC dictionary of the R package syuzhet [
44]. This dictionary was selected due to its ability to identify the sentiment and emotion of each word. Ten new variables associated with each tweet were constructed: eight capturing the emotion and two measuring the latent sentiment in the message. The construction of these variables was based on quantification of the words that each of the tweets used and that corresponded to the feelings (negative and positive) and emotions (anger, anticipation, disgust, fear, joy, sadness, surprise, and trust) of the NRC dictionary.
In addition, a daily comparative analysis of feelings and emotions was performed. The results were visualized in daily data graphs and a stepwise analysis, before and after the conflict. A frequency analysis of the most repeated words in the social listening was performed and represented in daily word clouds showing the 500 most repeated words and the most frequent bigrams in each period. For this purpose, the Wordcloud library of R was used.
In order to polarize the messages, and according to the NRC dictionary, a Sentiment Index (SI) was defined from the variables generated in the second step of the methodology [
40]. For the
ith tweet with
words, we calculated its sentiment index as follows:
where
and
;
is the
jth word of the
ith tweet. According to the value of this index, the tweets could be labeled into three groups:
if the tweet is positive,
if the tweet is negative, and
if the tweet is neutral.
Statistical Data Analysis. In the last stage of the methodology, multivariate statistical analysis techniques were used. A reduction of the dimensions of the feelings and emotions by stage was carried out from a Factor Analysis (
FA). For this, Principal Component Analysis (
PCA) was used and factors were extracted following the Kaiser method [
45] with an orthogonal rotation (Varimax) to improve interpretability. This technique allowed us to identify how sentiments and emotions were grouped in each of the observed stages as well as the established relationship between them.
The factorial model expressed in matrix form is:
where
is the data matrix,
is the matrix of factor loadings,
is the matrix of factor scores, and
is the vector of single factors. Furthermore, the variance of the variable
is decomposed as follows:
where
is the factor loading of the variable
in the factor
.
The variability that is explained by the factors extracted from the observed variables corresponds to the first summand of Equation (3). To improve the interpretability of the result, the varimax factorial rotation method was used and the new factor loadings
were calculated under the condition of minimizing the number of variables with high factor loadings in one factor.
where
is the matrix of the factor loadings for the rotated factors,
is a rotation of
that verifies its same properties, and
is an orthogonal matrix. The square of the factorial loading
indicates the percentage of the variable
that is explained by each factor
. The variables of the feelings and emotions were grouped in the factors in which they reached a higher percentage of explainability. Variables classified in the same factor have similar behavior in social listening.
In addition, tweets were classified into two groups: those that had been retweeted and those that had not. An analysis of variance (ANOVA) was performed for each of the studied periods, considering each of the sentiments and emotions as an independent variable. This analysis provides information on the sentiment that most sensitized the social networks in each of the studied periods.
An ANOVA model with one factor was proposed for each of the 10 sentiment and emotion variables in each period of study for the two groups: tweets and retweets.
where
is the mean of the variable in each group and
is a random variable.
To estimate the model, a hypothesis test was performed:
H0: The two training methods produce identical results.
H1: The two training methods do not produce identical results.
Where, the contrast statistic
follows a
t-student probability distribution, as a particular case of the general statistic when there are more than two groups:
If the null hypothesis for the contrast is rejected, then we would be accepting that the studied variable has different behavior in the two samples with a significance of 5%. This technique allows us to compare the sentiments and emotions of the retweeted and non-re-tweeted messages.
4. Data Collection
Twitter data mining was conducted from 16 February 2022, through 3 March 2022. To see how the 2022 Ukrainian–Russo conflict affected social listening of green energy, the period analyzed was divided into period 1 (from 16 to 21 February), which covers the days before the outbreak of the conflict, and period 2 (from 22 February to 3 March), which covers the first days of the conflict.
All tweets containing the keyword string ‘green energy’ were systematically searched several times a day and all repeated tweets were removed. We extracted only the tweets that were written in the English language. The Twitter query used in the search was: tweets<- search_tweets (‘“green energy”’, token = twitter_token, urs = T, n = 18,000, lang = “en”, type = “mixed”, include_rts = TRUE, since = ‘2022-0x-xx’, until = ‘2022-0x-xx’, output_file_name = “tweets.csv”).
The final search provided a total of 285,992 tweets and 90 variables. To ensure that all of the studied days had the same representativeness, a simple random sample of 10,000 daily tweets was selected. The final database for the study consisted of 160,000 tweets. We differentiated between tweets and retweets (see
Table 1). The percentage of tweets and retweets in each of the periods did not vary considerably. Moreover, the percentage of retweets was almost double that of tweets in both periods.
Through a geographical analysis of the tweets for each period (
Figure 2 and
Figure 3), we can see how in both cases more than half of the tweets could not be classified; 52.03% and 51.56%, respectively. Given that the language chosen in the search was English, it is logical that most tweets would originate in the United States and the United Kingdom.
6. Conclusions
Sentiment analysis entails studying and analyzing the opinions, feelings, evaluations, attitudes, and emotions that people include in written documents on a given topic. Knowing the trends of different topics of great interest to society, such as green energy, climate change or others political, socioeconomic or environmental issues, facilitates strategic decision-making by politicians, investors and consumers.
In this paper, sentiment analysis of social listening on green energy was presented. We analyzed the emotions and sentiments expressed when talking about green energy on Twitter, one of the most prominent social media platforms.
The Ukrainian–Russo conflict is causing substantial damage to the global economy. Most production sectors are being affected by increases in prices of some raw materials and, above all, energy. In this sense, one of the sectors most affected by this crisis is the energy sector, which is currently experiencing one of its worst energy crises. To analyze whether the emotions and sentiments of tweets on the topic of green energy have been affected by this conflict, we considered two time periods—before and after the 2022 Ukrainian–Russo conflict started.
We compared tweets referring to green energy in these two periods against positive and negative sentiments as well as the emotions of anger, anticipation, disgust, fear, joy, sadness, surprise, and trust. We observed that there was a remarkable growth in negative sentiments once the conflict started due to the economic, political, and social uncertainty that the conflict has generated among the world population. In relation to emotions, the number of words in period 2 related to negative emotions increased considerably while those related to positive emotions practically remained the same. This shows that the 2022 Ukrainian–Russo conflict has given rise to an important turn in the debate on green energy.
The daily analysis supports this conclusion, although it also showed how the increase in trust on some days of the second period was related to the arrival of news that advocated an energy transition toward green energies.
Factor analysis allowed us to observe two latent variables in the first period; one optimistic and the other pessimistic. In the first period, the optimistic one had more weight. However, in the second period, the pessimistic variable had more weight and the optimistic variable was broken down into two variables: one that continued to reflect optimism and the other that contained the uncertainty (anticipation and surprise) experienced in this second period with respect to green energy.
If we distinguish between tweets and retweets, we can observe how there was a considerable increase in retweets related to negative sentiment in the second period. Regarding emotions, we observed that, in general, retweets corresponding to negative emotions increased, with sadness standing out in particular because the average number of words related to this emotion used in each retweet was triple that in tweets.
On a theoretical level, the obtained results increase the understanding of how the tweeters view and engage with the concept of green energy. This has practical implications for stakeholders in developing strategies for reaching and engaging audiences on Twitter and for politicians to ensure that the political energies are well received by society.
The limitations we can highlight in this study mainly concern the data sample. It is important to note that Twitter limits data collection, and only a part of the total volume of tweets can be retrieved. Therefore, we cannot be sure to what extent the data sample is representative of the population of tweeters.
This study presents opportunities for further research. In this sense, unsupervised classification techniques of matching learning could be used to identify different profiles regarding characteristics of social interest, such as gender, location, and others. Another line of future research could be to observe and create a temporal database of social listening. This is a challenge that would allow us to quickly identify changes in the perception of the consequences of an energy transition to green energy. It would also be possible to estimate predictive models of social opinion on green energies.