Methodology for Calculating the Energy Security Index of the State: Taking into Account Modern Megatrends

: Energy issue stays a top priority for the national security of most countries. Despite numerous international forums, large-scale geoeconomic research, international and national projects, and the development of appropriate strategies, the issue of energy security assessment and understanding of its terminology is not a universal practice. The presented study has an ambitious goal to develop a methodology that can provide an objective picture of the energy sector on an international scale with cross-country comparisons under the inﬂuence of modern megatrends. Based on 29 indicators, according to the World Bank data since 1991, the energy security index is calculated for the set of world states with further analysis of the cluster dynamics of their common trends in energy security. The index showed its objectivity and resistance to existing shocks in geoeconomic dynamics. An important feature of the proposed index is the possibility to compare the energy security index with 1. This value is, in fact, a European average: if a country has an energy security index greater than 1, it means that its energy level is currently better than the European average, and if it is lower than 1, it means that it is inferior to the level of energy security currently achieved on average in Europe. The concept of calculating the index of energy security of the state is based on a uniﬁed comparison of all countries, which allows us to move away from the use of signaling approaches and eliminate subjectivity in calculations, as well as provide a basis for dynamic comparison of energy security. The vital aspect of the index is that it takes into account changes in the energy paradigm, the transition to alternative energy sources, and the comprehension of the role of energy efﬁciency, in particular, of fossil fuels. The study identiﬁes clusters of countries that have consistent similarities in energy security, which can usually be of practical interest in developing energy strategies and understanding the similarity of geoeconomic interests of these states. Thus, this article contributes not only to the development of scientiﬁc approaches to the assessment of energy issues, in particular, through the methodological development of a representative index, but also through the presentation of statistically sound results for further effective management decisions at the state level.


Introduction
Energy is widely understood as an important component of national security [1]. The concept of "energy security" has become widely used and closely related to the security of the country [2], given that the problem of providing the economy and population with energy resources is becoming more complicated every year in general (in particular, from a European point of view). The world currently faces the fight and intensive search for a European point of view). The world currently faces the fight and intensive search for energy resources. Despite the technological development and the integration of robots in our life, still, most wars and world conflicts are about energy resources. Quite obviously, most governments and international unions are increasingly worried about the stability in the energy sector and the availability of peaceful alternatives that will be harmless to the environment [3].
Despite the constant steps towards circular economy and sustainable development, countries are increasing electricity consumption ( Figure 1); one of the triggers for this is, in particular, digitalization. Scientists' forecasts show that energy consumption will not decrease in the coming decades [4]. The term "energy security" is used almost everywhere in economic and political discussions related to energy supply [5]. However, it should be emphasized that different authors attach several meanings to the concept of energy security. Quite often, this term is used to give more importance or relevance to the issues covered, which are often not inherently related to energy security [6]. For example, the Shannon-Wiener formula addresses the issue of diversification of resource use, rather than the direction of their supply [7]. The trilemma index focuses on only three areas of energy security [8,9].
Energy security, in general, can be seen as ensuring uninterrupted access to energy resources at an affordable price [9,10]. Currently, there is a systematic reduction in hydrocarbon fuel reserves. It stimulates the ongoing efforts of some countries, mainly oil and natural gas exporters, to put pressure on energy importers to achieve their political goals. Thus, the issue of energy security becomes even more important.
The concept of "energy security" first became the subject of theoretical and practical research only in the early 1970s because of the first world energy crisis, which was associated with the embargo of OPEC member countries on oil supplies to developed countries [11]. The response to these challenges has been in the realization of a comprehensive definition of energy security by the UN World Energy Council as the assurance that energy will be available in the quantity and quality required under such economic conditions [12].
Based on the above definitions, it is advisable to identify the characteristics of energy security of the state: • first, it is one of the most important components of economic security that shows the level of energy resources that guarantee to the state its full life; The term "energy security" is used almost everywhere in economic and political discussions related to energy supply [5]. However, it should be emphasized that different authors attach several meanings to the concept of energy security. Quite often, this term is used to give more importance or relevance to the issues covered, which are often not inherently related to energy security [6]. For example, the Shannon-Wiener formula addresses the issue of diversification of resource use, rather than the direction of their supply [7]. The trilemma index focuses on only three areas of energy security [8,9].
Energy security, in general, can be seen as ensuring uninterrupted access to energy resources at an affordable price [9,10]. Currently, there is a systematic reduction in hydrocarbon fuel reserves. It stimulates the ongoing efforts of some countries, mainly oil and natural gas exporters, to put pressure on energy importers to achieve their political goals. Thus, the issue of energy security becomes even more important.
The concept of "energy security" first became the subject of theoretical and practical research only in the early 1970s because of the first world energy crisis, which was associated with the embargo of OPEC member countries on oil supplies to developed countries [11]. The response to these challenges has been in the realization of a comprehensive definition of energy security by the UN World Energy Council as the assurance that energy will be available in the quantity and quality required under such economic conditions [12].
Based on the above definitions, it is advisable to identify the characteristics of energy security of the state: • first, it is one of the most important components of economic security that shows the level of energy resources that guarantee to the state its full life; • second, it is considered in the scale of the appropriate state of security of the fuel and energy complex and its ability to ensure energy independence of the country.
The country's energy independence is determined by the readiness of the country's fuel and energy complex to withstand the destabilizing influence of internal and external factors that threaten the country's independent policy in the field of energy supply of the economy and population [13]. In addition to the usual diversification of fuels, this includes ensuring the invulnerability of its own extracted minerals, independence in making geopolitical decisions, and assessing the reliability and predictability of actions of energy exporting partners to prevent pressure, such as has occurred with the Russian Federation's push on Ukraine.
The energy security of the state has quantitative and qualitative indicators. A quite principal indicator is the production of energy [14]. Prospects for the development of the fuel and energy complex (FEC) of any modern state, as well as strategic objectives to strengthen the country's position in the global system of division of labour, make new demands on the security and reliability of almost all FEC facilities. For example, under modern conditions of strengthening terrorism, this factor must be taken into account when forecasting existing or potential forms of danger to high-risk facilities, which include fuel and energy facilities-nuclear and hydropower plants, oilrigs, gas and oil pipelines, hydrocarbon storage facilities, power lines, and others. Damage to these facilities can lead to emergencies and significant losses to the national economy, the death of hundreds of thousands of people, significant economic damage, and large-scale environmental consequences [15].
Special emphasis should be placed on the paradigm shift in energy security in recent years, which is associated with the transition to alternative energy sources and ensuring the greening of energy security.
Thus, attempts to define the essence of the concept of "energy security" were not systematic and were marked by a variety of approaches (i.e., [16][17][18][19]) and some with insufficient justification. The same applies to methods of calculating energy security. In particular, the most common of them are:

•
International energy security risk index-analysis of the methodological settings [ Different approaches are also characterized by attempts to develop analytical tools for assessing the level of threats and the state of energy security, but they do not make it possible to clearly define the subject field of energy security and define the scope of its concept. At the same time, the need to assess the level of energy security in Europe and the world, in general, is urgent [20]. Therefore, the scientific problem of the paper is to supplement the existing literature with enhanced methodology of the energy security assessment that could be adaptive to the current situation in the world and spread over a wide range of states.
This article, as a research paper, considers the possibility of creating a methodological approach to energy security assessment that takes into account the strengths of existing methods but is easy to calculate, adapted to existing data in open access, effective in cross-country comparisons, and takes into account current megatrends and geopolitical trends. Note that we consider megatrends as "trends that occur on a large scale; they, therefore, affect large groups of humans, states, regions, and in many cases, the entire world", according to [21]. Such a formulation of the research question stimulated the presentation of the material in the following logical sequence: the introduction reveals the problem area and emphasizes the feasibility and relevance of this scientific research, which aims to close a scientific gap and be a springboard for further research by a wide range of scholars of this field [22]. The literature review is based on three vectors to confirm scientific methodology and justify the novelty of the work: the consideration of key searches for the term "energy security" in the last 10 years, -the analysis of existing publications on methods of energy security assessment, -a critical consideration of scientific works to confirm or refute the hypothesis of the impact of economic development and modern megatrends on energy security [23].
The methodology section reveals the key essence of the authors' approach to the calculation of the energy security index. It follows up with the assessment of the countries of the world by the authors' approach, their clustering and critical qualitative understanding of the obtained quantitative results. That is reflected in the results section [24]. Conclusions and consideration of the possibilities of continuing the scientific discussion on the chosen topic conclude this article.

Literature Review
Energy security is the most important component of the comprehensive security of both individual states and the world as a whole [25]. At the same time, it is impossible to allow the access factor, depending on the energy sector, to become a cornerstone in geopolitical and geoeconomic areas. Rationalization of the use and integration of energy markets should be based on a well-thought-out symbiosis of supranational and national competence in the form of clearly defined economic and legal models of both states and supranational structures [26]. In addition, emergencies and cyclical crises in the energy sector and in ensuring its security are on the agenda when developing strategies to universalize relations between energy producers and consumers. At the same time, the tasks facing states differ significantly from countries that consume energy and countries that deal with their supply or transit [27].
Energy security is a systemic process, part of which are national policies and international institutions [28]. Their goal is to respond in a coordinated manner to failures, problems, and operational emergencies. Thus, ensuring energy security is impossible without active international cooperation, the basis of which should be international institutions. The importance of the problem of energy security policy is based on the general social significance of energy, which consists of four main aspects of its use by the socio-economic system [29]: (1) functioning, i.e., ensuring basic human needs and energy supply of economic activity; (2) maintaining the existing level of infrastructure of modern society; (3) use of energy to ensure population growth, capital, and consumption; (4) ensuring the dynamics of changes in economic infrastructure, technical progress, and productivity growth.
An important factor that should be highlighted when considering energy security is the depletion of natural resources, and these resources are usually extracted in the so-called "developing countries" and consumed mostly by developed countries, which leads to imbalances in socio-economic relations between these groups of states [30]. To ensure the reduction of this gap in the level of socio-economic development, an updated architecture of international institutions capable of prudent control of national and supranational relations in this area is needed [31].
In general, most articles on energy security introduce their wording of the term "energy security", such as [32]. For example, energy security is defined by the World Energy Council as " . . . the confidence that energy will be available and in the quantity and quality required by economic conditions . . . " [33]. International Energy Agency formulates energy security as " . . . continuous physical availability of resources at a price that is acceptable in terms of environmental compliance . . . " [10, [34][35][36][37][38][39]. However, all scientists agree that energy security is a dynamic phenomenon [40]. Thus, there are longterm and short-term energy security's aspects. The first is mostly about the economic aspects of timely energy supply and environmental safety [36]. The second is oriented on the prompt adaptation of the energy system to sudden threats or changes in the energy balance [10].
Based on the above [37][38][39][40][41][42], the following definition of energy security in the system of modern geoeconomic threats can be given: Energy security is the state's ability to ensure efficient use of its fuel and energy, to optimize diversification of sources and resources to ensure the livelihood of the population and volatility of prices for fuel and energy resources or to create conditions for rapid adaptation of the national economy to new prices for these resources.
Therefore, the authors' approach clarifies the definition of "energy security" as the correspondence of the country's development indicators to similar indicators of other countries, which allows for a dynamic comparison of countries without taking into account certain weights, as well as automatically taking into account any fundamental changes in the world.
Analyzing the methods of assessing energy security over the past 10 years, several typical trends can be noted: (1) the state of energy security and its components is assessed using appropriate methods and analysis of specially designed sets of representative quantitative indicators [43]. Their composition depends on many factors [44], for example, geography and country size [45], the type of the economy [46], and the level of economic development, i.e., GDP [47], and the specific indicators of living standards, etc. [48]; (2) due to the diversity of energy structures, national energy balances, each country tries to build its energy security system and adapt it optimally to its priorities to counter internal and external threats, including economic, increased international economic interdependence, and the desire to increase own level of global competitiveness [49]; (3) there are a few features of the calculating method of the state and indicators of energy security. The first step of the calculation algorithm is the determination of the normalized values of individual indicators, for example, index-indicators [49,50] of the individual sectors of the economy [47] or the economy as a whole [51]. Then, the integrated index of energy security is determined on this basis, using the weights of the special procedure determined; (4) the indicators used to assess safety are, to some extent, inherent in the properties of the criteria. It is believed that "the true criterion for building any system (energy security system) is the possibility of its accounting" [52]. It is also obvious that the number of indicators for the region [53] or a type of economic activity [54] is much smaller than for the country as a whole [55]. It can be expected that any set of indicators is not final and will be adjusted, improved, or refined over time [56]. Therefore, the methods usually assume their periodic updating; sometimes it is drastic in the life cycle and the emergence of new threats to the risks of hazards. (5) some countries, such as Ukraine, do not have a specially developed and officially recognized method for calculating energy security [57]. For example, in Ukraine, there are recommendations for the definition of energy security as a component of economic security that are contained only in the methods of economic security calculating (since 2007). That was the first time when the indicators of the components of the economic security of this state, and hence, the energy security, received more or less objective quantitative estimates [58].
After the critical review of world practices, it is likely to claim that the GEI world survey (Global Energy Institute) is particularly successful. It was conducted for a long period of historical data for a large set of countries, which insures its validation. GEI as a research organization at the US Department of Energy's Chamber of Commerce has developed and is supporting the international energy security index project [10,59]. The project "international index of energy security risks" provides a rating assessment of energy security for different countries. Relevant editions of 2018, 2019, and 2020 are publicly available [International index 2020]. These estimates are performed on 29 parameters of energy security profiles. In this case, the base year is 1980, i.e., the risks are calibrated according to OECD indicators in 1980, which correspond to 1000 points. In general, GEI energy security assessments cover the period from 1995 to the present [60].
Critical consideration of scientific work on the confirmation or refutation of the hypothesis of the impact of economic development and modern megatrends on energy security allows us to identify the following meaningful triggers: (1) to test these hypotheses, most scientists use the production function, which describes the functional relationship between production volumes and economic costs [61]; econometric modelling [62]; systems of network analogies of optimization models of production type; optimization problems; the economic and mathematical model of the fuel supply system, presented in the form of a theoretical fuel supply network; a model taking into account the indicator of energy security "share of imports from one source"; and the linear programming [63]; (2) the autoreactive evolution of energy use and new technologies pushed economic growth [64,65]. There is the proven opinion that energy prices have had a crucial long-term role in economic development as well [66,67].
Thus, the analysis of modern scientific literature and international practice proves the existence of a scientific gap in both methodological and substantive sense of energy security assessment, which is the task of this study.

Methodology
The modern economy assumes that the main actors in the market are households and firms that are related by certain relationships. These are the entities that determine the main components of our analysis. The exchange of certain resources is required for the functioning of firms and households. The availability of the resource market should reflect the state of supply of various resources, availability, and the efficiency of their use. First, we should focus on indicators that characterize energy security. In particular, the following groups of indicators are identified: (1) indicators of consumption of natural resources; (2) indicators of resource depletion; (3) indicators of efficient use of resources; (4) indicators of attracting new energy sources; (5) indicators of pollution due to mining activities; (6) indicators of access to resources.
It should be noted that this division requires further development and selection of specific indicators for each group of indicators. In this case, the following certain principles are applied to obtain comparative data: (1) indicators cannot be selected as officially calculated only in the national currency. This is because countries have been able to devalue their currencies at convenient times, which does not reflect the real state of affairs at purchasing power parity; (2) indicators cannot be estimated in nominal terms, such as population, as these indicators only indicate the potential of the economy but not the state of their effective use or involvement in economic processes; (3) the indicators cannot be incomparable with the indicators of other countries. The peculiarity of the authors' methodology is that any indicator must be compared with a certain world level, and therefore, the method of their calculation should be similar; (4) indicators must have a certain history, at least 10 years. It should be noted that all calculations should be based on a complete database.
Thus, the calculation of the new energy security index should be based on these principles. Obviously, the variety of links increasing should not change the concept of security but only indicate a set of relevant indicators. It is clear that the more interconnections are created in the economy, the more accurate the calculation of energy security will be.
To create an adequate comparative base, each of the parameters selected for the calculation of a particular type of security must be normalized to a certain world value. Intuitively, the average value for all countries can be considered as such an indicator. In addition, it is possible to conduct rationing to the leading country, but, in our opinion, such a calculation will lead to certain distortions, because the leading country on one indicator may be an outsider on the other.
The question remains-which mechanism of combining indicators should be taken into account? In most scientific papers [68,69], the authors gave some weight to each indicator, which created a rather subjective nature of the study. Indeed, if today a scientist believes that macroeconomic stability is unimportant and gives it a weight of, for example, 0.2, then in a few years, during a financial or economic crisis, other scientists will require a completely different weight, for example, 0.8. Due to this subjectivity, the weight approach cannot be used in the long run. One solution is to find a certain mean value that is not based on the arithmetic mean. Apparently, this value can take the same values for indicators with high and low volatility. In our opinion, a country with a stable security indicator should not have significantly volatile indicators. Therefore, the geometric mean is quite appropriate to calculate the safety index based on several indicators. Therefore, the objective function decreases if the components differ significantly from each other.
Special mention should be made of the rules of rationing of disincentives. If the indicator characterizes the state of the economy as positive, then obviously, the greater its growth, the better for the economy. However, if the indicator harms the economy, it is not possible to direct its inclusion in the calculations [70,71]. To solve this problem, such indicators were listed individually. For example, if an indicator shows a percentage of a certain value, then another is used instead that is equal to the difference between 100 and the initial indicator. In addition, if the indicator measures the number of days for bureaucratic procedures, which is understandably a disincentive for the economy, it is normalized by the obvious formula: Thus, the energy security index for country s at time t is calculated by the formula: where: g jts -the value of the safety indicator for the j-th group of the index at time t in the country s; g jtw -the value of the safety indicator for the j-th group of the index at time t on average in all countries of the world participating in the study; u-the number of parameters when calculating the index; f (·)-conversion function that allows normalizing the value. In most cases, such a function can use a root of a degree that corresponds to the number of elements taken into account in the formula.
The value of the indicator within the group is based on similar formulas, but special functions are used to eliminate the impact of the lack of data in the database: where: , if K jkts exists and K jktw is calcualted for more than 30 countries, 1, otherwise, K jts -the k-th statistical indicator from the database for the country s, which is used to calculate the indicator of the j-th group of the index at time t; K jtw -the average value for the above indicator for all countries for which information is available at time t; p ij -the number of indicators for calculating the indicator of the j-th group of the index; W(·)-rationing function, which can change the impact of a particular indicator. This study uses a linear rationing function, which guarantees the same weight of all considered indicators.
The description of the composition and structure of each safety index indicator is the next stage. Remember that the state of provision and efficient use of available resources and the possibility of obtaining them is considered the level of energy security. The list of indicators for different groups of the indicator is given in Tables 1-6. The role of fossil fuels in modern economies should decrease; the share of this indicator, which exceeds the world average, will be a disincentive for resource security.

Destimulator
Renewable energy consumption (% of total final energy consumption) The role of energy from renewable sources is constantly growing. The more a country introduces new technologies, the less it depends on energy supplies; the resource security is increasing. Energy depletion is the ratio of the cost of energy reserves to its remaining service life. It covers coal, crude oil, and natural gas. Obviously, the higher this figure, the worse for resource security.

Destimulator
Adjusted savings: mineral depletion (% of GNI) The same indicator but only applied to resources such as tin, gold, lead, zinc, iron, copper, nickel, silver, bauxite, and phosphate.

Destimulator
Adjusted savings: natural resources depletion (% of GNI) Depletion of natural resources is the sum of net depletion of forests, depletion of energy and depletion of minerals. Destimulator Adjusted savings: net forest depletion (% of GNI) Pure forest depletion shows how much deforestation exceeds natural growth. Apparently, it is a disincentive. Destimulator Table 3. Indicators for calculating resource security: resource efficiency group.

Title of the Indicator in the World Bank Database Description of Indicators The Role of the Indicator
Energy intensity level of primary energy (MJ/$2011 PPP GDP) Energy intensity shows how much energy is used to produce one unit of economic output. The less energy is needed to produce, the more efficient a country is.
Destimulator GDP per unit of energy use (constant 2011 PPP $ per kg of oil equivalent) An indicator that demonstrates energy efficiency. Stimulator Electric power transmission and distribution losses (% of output) The greater the losses are, the more technologically backward the country is. Destimulator Fuel exports (% of merchandise exports) The more fuel a country can export, the less dependent it is on other countries. Stimulator Table 4. Indicators for calculating resource security: group to attract new energy sources.

Title of the Indicator in the World Bank Database Description of Indicators The Role of the Indicator
Renewable energy consumption (% of total final energy consumption) The indicator indicates the technological development of the country is a stimulating parameter. Stimulator Alternative and nuclear energy (% of total energy use) An indicator that shows how much the country uses nuclear energy. On the one hand, such energy is evidence of the technological capabilities of the state, on the other-it is a threat to the environment, which was evidenced by the Chernobyl and Fukushima accidents. Therefore, this parameter should be considered as a disincentive.

Destimulator
Combustible renewables and waste (% of total energy) This indicator indicates the degree of waste recycling in the country. Obviously, the more fully the waste is recycled, the better for the environment and the people in the country, so it is a stimulating indicator.

Stimulator
Electricity production from renewable sources, excluding hydroelectric (% of total) The more the country attracts renewables, the better for the human economy, so it is a stimulus. Stimulator Renewable electricity output (% of total electricity output) Similar to the previous indicator, this indicator is a stimulus. Stimulator The lower the cost of carbon dioxide, the better for the country's security. Destimulator Table 6. Indicators for calculating resource security: resource access group.

Title of the Indicator in the World Bank Database Description of Indicators The Role of the Indicator
Access to electricity (% of the population) The more people have the opportunity to use energy, the more developed the country is. Stimulator Access to electricity, rural (% of rural population) The indicator is similar to the previous one; it only determines how developed the countryside is in the country. Stimulator Access to electricity, urban (% of urban population) This indicator defines how developed cities are in the country. Stimulator It should be noted that the part of the indicators, which according to the logic of construction, should have a positive sign, were negative according to the World Bank. The following procedure is used to resolve this issue. If negative values are observed for a certain relative indicator, the number 100 is added to it, which makes it positive. This is necessary to enable the correct usage of the conversion tool for destimulators. The study found that such a mechanism should be used for the indicator "Energy imports, net (% of energy consumption)".
This concept is the basis for calculating the energy security index for different countries, but in this paper, only European countries are depicted. Schematically, the calculation of the economic security index was carried out in several stages ( Figure 2).
Energies 2021, 14, x FOR PEER REVIEW 10 of 21 Table 6. Indicators for calculating resource security: resource access group.

Title of the Indicator in the World Bank Database Description of Indicators The Role of the Indicator
Access to electricity (% of the population) The more people have the opportunity to use energy, the more developed the country is. Stimulator Access to electricity, rural (% of rural population) The indicator is similar to the previous one; it only determines how developed the countryside is in the country. Stimulator Access to electricity, urban (% of urban population) This indicator defines how developed cities are in the country. Stimulator It should be noted that the part of the indicators, which according to the logic of construction, should have a positive sign, were negative according to the World Bank. The following procedure is used to resolve this issue. If negative values are observed for a certain relative indicator, the number 100 is added to it, which makes it positive. This is necessary to enable the correct usage of the conversion tool for destimulators. The study found that such a mechanism should be used for the indicator "Energy imports, net (% of energy consumption)".
This concept is the basis for calculating the energy security index for different countries, but in this paper, only European countries are depicted. Schematically, the calculation of the economic security index was carried out in several stages ( Figure 2). The first stage of research was the collection of a database that allowed the calculation of all the parameters considered. In the study, annual data from the World Bank database since 1991 were used (Appendix A Table A1). The database indicated the appropriate stimulants and destimulators in accordance with the method, the normalization of data according to the above rules.  The first stage of research was the collection of a database that allowed the calculation of all the parameters considered. In the study, annual data from the World Bank database since 1991 were used (Appendix A Table A1). The database indicated the appropriate stimulants and destimulators in accordance with the method, the normalization of data according to the above rules.
In the second stage, all the necessary calculations described in the methodology were performed. For European countries, the undoubted advantage of the analysis is the completeness of the data. In fact, for observations of all 183 indicators, until 2016, most of the data are present, and since 1995-almost all data for all countries. Due to this, from this year on, it is not necessary to apply the rule according to which only those indicators calculated for at least 30 states are taken into analysis. In total, calculations were performed for 49 European countries. Unfortunately, the World Bank database does not have a significant amount of data for 2003-2005 and partly for 2016-2017, which forced us to abandon some of the calculations for these years.

Results
The results of the calculations are given in Appendix A Tables A2 and A3. Tables A2 and A3 shows that the volatility of the change in the energy security index is quite moderate and does not change dramatically. Even during the financial crisis of 2008, the changes were not fundamental, which is an obvious advantage of the proposed methodology. This was achieved by comparing the changes in one country with the European level. Thus, during the crisis of 2008, prices for oil and other resources fell significantly, which led to the restructuring of the entire energy market. Accordingly, countries exporting raw materials experienced significant problems with filling the budget, maintaining domestic stability, and ensuring a high level of economic and energy security. If we calculate the energy security index by standard (known) methods, then for most countries, it would be necessary to show a significant decline. However, this situation was typical of a large number of states, and therefore, due to the competitiveness of the newly developed index, the fall of one country was not significant relative to other states. That is supposed to be the main advantage of the presented methodology, the index that is sensitive only to the state's tangible changes but not to the general changes over the world.
An important issue is to compare the energy security index with 1. This value is, in fact, a European average: if a country has an energy security index greater than 1, it means that its energy level is currently better than the European average, and if it is lower than 1, it means that it is inferior to the level of energy security currently achieved on average in Europe. For example, Norway consistently shows above the level of 1, selling its resources, accumulating its assets in a special fund, and developing green energy through economic incentives.
Given a large number of indicators for calculations, it should be understood that any changes in several indicators will not have an immediate effect on energy security, but the study of trends provides an understanding of what to expect from the country and how to influence this index.
The next block of research is the clustering of countries and the study of the dynamics of changes in the composition of clusters.
In general, it should be noted that the changes in energy security in Europe were not particularly dramatic. Most states, if they changed the cluster, usually returned to it in a few periods. Thus, it can be stated that the dynamic change of clusters is associated in most cases only with the manifestations of competition or the uneven introduction of new technologies.
A particular case should be mentioned-Ukraine should be analyzed separately as it has visited five different clusters in 20 years according to the integrated indicator. Noticeably, this is primarily due to the different geopolitical components of the state's development. If, at the beginning of 2000, there was significant energy influence from the Russian Federation, then after the revolutions of 2004 and 2014, the energy balance was transformed. The 2004 revolution changed one oligarchic system to another. This change was not easy in the energy sector as Ukraine was forced to switch to market energy prices. Not taking into account the significant corruption component, such a transition led to a significant reduction in resource consumption, the abolition of energy purchases in Turkmenistan, changes in gas transit payments, and so on. These changes were significant and were accompanied by gas and gasoline wars. The revolution of 2014 led to the war with Russia, the seizure of the energy regions of Donbas and Crimea by Russia, and the fall in the production of its energy resources by almost a third. Ukraine has also refused to purchase gas from Russia, buying it from European partners. This transformation completely changed the energy balance of the country and led to the formation of completely new schemes for the transportation of raw materials and pricing in the energy market.
Very often, clustering puts Ukraine in the same group as Malta, Cyprus, Armenia, Poland, and Hungary, i.e., countries that are highly dependent on energy supplies. At the same time, a group of Scandinavian countries, led by Norway and Sweden, seems to be stable. They have a strong resource supply and made significant progress in the introduction of alternative energy sources (Table 7). Thus, the clustering of the states represents the groups of states that have the most common situation in energy security. These results could be helpful for geopolicy development, indicating possible partners for alliances or considering competitors in the search for new fuel sources or additional volumes, as well, the fragility of the fuel-energy complexes could be assessed as similar inside each state.

Discussion
This study analyzed the problem of energy security in the world. It has been shown that despite numerous attempts to propose a single methodology for analyzing the state of energy security, they have not provided an adequate final answer in the medium-and long-term [72]. The main problems of most methods are: limited factors for analysis, focus on purely national issues, lack of comparison with international counterparts, and failure to take into account technological changes in the analysis [73]. Indeed, if we consider the existing methods of the energy security index calculation, they primarily use a given set of indicators that are considered important for a particular country but that is irrelevant for another. None of the methods can take into account the effectiveness of systemic changes in the energy market: for example, the transition from coal to oil, from oil to gas, and from gas to alternative energy sources [74,75].
The proposed methodology for the energy security index calculating is based on the comparison of indicators of different countries, which allows us to automatically take into account new trends. For example, if all countries reduce oil consumption by 20% in favor of gas in the next five years, the ratio of indices will remain unchanged [57]. A similar situation will be observed in the case of new energy sources [58]. At the same time, if one of the countries is late with the transition, its energy security index will decrease significantly [59].
It is impossible to say that this approach seems to be ideal. Of course, any methodology has its drawbacks. In particular, the question of why all factors are in fact weighted with the same weight is debatable [60]. Obviously, further research can determine the optimal ratio of factor levers that will make the technique more accurate [61]. This is primarily due to the coefficients that determine the efficiency of resource use, the attraction of alternative energy sources, and the level of losses in energy transmission [73].
The second shortcoming of the methodology is related to the insufficient speed of providing statistical information to world databases [74]. It should be noted that some data are missing for a significant number of countries for 2017-2019, which forced us to make forecasts and, accordingly, reduce the accuracy of the calculation of the energy security index [75]. It is obvious that this problem will decrease with increasing quality and speed of filling of world databases or development of more efficient and reliable artificial intelligence models, as well as statistical analyses usable in forecasting methods resistant to missing or incomplete data. During the COVID-19 pandemic, most governments significantly increased their spending [76][77][78][79][80], so determining the impact on the energy sector seems relevant.

Conclusions
At the same time, the obtained results are already quite interesting to analyze. In particular, the paper clustered countries according to the energy security index for 2000, 2010, and 2020. This allowed us to identify common elements in the implementation of energy policy in groups of countries, as well as to determine which countries have become more or less competitive in this area. Of particular note is the increase in the index in the Nordic and Baltic countries due to the active use of alternative fuel sources and the replacement of fossil fuels.
The obtained results also contribute to further research in this direction. In particular, with the help of economic and mathematical modeling, it is possible to study the impact of fiscal and monetary policy on the state of the energy security index in European countries. Such an analysis would be particularly useful using panel regression, which would allow the study of commonalities and differences in response to relevant macroeconomic shocks.
The calculated table of energy security indices also allows studying in more detail the dynamics of changes in individual countries and their relationship with macroeconomic parameters. This area of research is designed to promote the development of national energy strategies.
No less important is the analysis of changes in energy security indices in geopolitical discourse. For example, the struggle for energy spheres creates a controversy over the feasibility of building certain gas pipelines in Europe, such as Nord Stream-2. Evidently, the proposed method automatically takes into account all changes without reconfiguration and, therefore, allows the predicting of the index in different scenarios.  Table A1).
Acknowledgments: Authors would like to acknowledge the support given by the Institute of Information Technology, Lodz University of Technology and FINN sp. z o. o. for sharing a research infrastructure as well as technical and essential support.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.