We cannot live without electricity. The way it is connected to our daily lives shows how indispensable it is to people. However, power consumption, including use of electricity, is corrupting our future. Burning down fossil fuels, which is the common way in producing energy, is proven to be a hazard on air, water, and all sorts of natural substances. Economic alliances and several countries, leaded by group of OECD countries, are asserting mandatory control on energy consumption regarding its future threats.
This brings us question of whether the significance of energy consumption is well accepted to nations. With this in mind we would like to find out world power consumption level and the growth rate to see whether nations are acknowledging the potential threat. Furthermore, we would like to analyze continents and economic alliances that well reduced energy consumption to rank the leading groups in accomplishing their duties and get some insights from these countries. This would be useful to those with the highest power consumption growth rate. At last verification of external factors that influence energy consumption will be proceeded.
The dataset outlines the quantity of terawatt (TWh) produced through various sets of energy, consists of both non-renewable energy and renewable energy.
Energy Consumption: All the energy used to perform an action, manufacture something or simply inhabit a building.
TWh: A unit of energy equal to outputting one trillion watts for one hour. This value is large enough to express annual electricity generation for entire countries, and is often used when describing major energy production or consumption.
Source https://yearbook.enerdata.net/total-energy/world-consumption-statistics.html
Who is the Enerdata? Enerdata is an independent research and consulting firm specialising in the analysis and modelling of the global energy markets and its drivers. Created in 1991, Enerdata now has over 25 years of experience on past and present issues shaping the energy industry. Their teams are made up of energy experts, analysts, engineers and IT specialists. Capitalising on its databases and forecasting models, Enerdata brings its expertise to cover the political, economic and environmental aspects of energy systems.
Continent_consumption_TWH
* The dataset lists up the amount of energy consumption(TWh) group by 7 continents and 3 organizations from year 1990 to 2020. Specifically organizations analyzed in the dataset are OECD, BRICS, and CIS.
Country_consumption_TWH
* It is the dataset that lists up the amount of power consumption of 44 countries from year 1990 to 2020.
library(tidyverse)
library(ggplot2)
library(rmarkdown)
library(knitr)
library(ggthemes)
cont_consump<-read.csv("Continent_Consumption_TWH.csv")
country_consump<-read.csv("Country_Consumption_TWH.csv")
str(cont_consump)
unique(cont_consump$Year)
sum(is.na(cont_consump))
head(cont_consump,5)
summary(cont_consump)
str(country_consump)
unique(country_consump$Year)
sum(is.na(country_consump))
country_consump <- na.omit(country_consump)
country_consump<-rename(country_consump,"Saudi Arabia" = "Saudi.Arabia")
country_consump<-rename(country_consump,"United Kingdom" = "United.Kingdom")
country_consump<-rename(country_consump,"United States" = "United.States")
country_consump<-rename(country_consump,"New Zealand" = "New.Zealand")
country_consump<-rename(country_consump,"South Africa" = "South.Africa")
country_consump<-rename(country_consump,"South Korea" = "South.Korea")
country_consump<-rename(country_consump,"United Arab Emirates" = "United.Arab.Emirates")
head(country_consump,5)
ggplot(
filter(gather(cont_consump, continent, Twh, World:CIS), continent == "World"),
aes(Year, Twh))+
geom_point()+
geom_line()
filter(gather(cont_consump,continent,Twh,World:CIS),continent == "World") %>%
mutate(percent_increase = (Twh - lag(Twh, default = first(Twh)))/ lag(Twh, default = first(Twh))) %>%
ggplot(aes(Year, percent_increase))+
geom_point() +
geom_smooth(method = "lm")
Energy consumption has been increasing for a total of 30 years
from 1990 to 2020.
If you look at the points where energy consumption suddenly decreased in 2009 and 2020, there are two outliers in the amount of change, and it is on the decline.
The previous graph is transferred to highlight the rate of
percentage change from 1990 to 2020.
There are only two points that showed a negative percentage
growth of energy consumption.
Each are found in 2009 and 2020, which each implies financial crisis and COVID-19, respectively.
ggplot(
filter(gather(cont_consump,continent,Twh,World:CIS),continent != "World"& continent != "CIS" & continent != "BRICS" & continent != "OECD"),
aes(Year,Twh, color = continent)) +
geom_point() +
geom_smooth()
ggplot(
filter(gather(cont_consump,continent,Twh,World:CIS),continent != "World"& continent != "CIS" & continent != "BRICS" & continent != "OECD" & continent != "Asia"),
aes(Year,Twh, color = continent)) +
geom_point() +
geom_smooth() +
facet_wrap(~continent)
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplot(
filter(gather(cont_consump,continent,Twh,World:CIS),continent != "World"& continent != "CIS" & continent != "BRICS" & continent != "OECD",
continent != "Asia",continent != "Africa",continent != "Latin.America",continent != "Middle.East",continent != "Pacific"),
aes(Year,Twh, color = continent)) +
geom_point() +
geom_smooth() +
facet_wrap(~continent)
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplot(
filter(gather(cont_consump,continent,Twh,World:CIS),continent != "Africa" & continent != "Asia"
& continent != "Europe" & continent != "Latin.America"
& continent != "Middle.East" & continent != "North.America"
& continent != "Pacific"),
aes(continent,Twh, fill = continent)) +
geom_col()
ggplot(
filter(gather(cont_consump,continent,Twh,World:CIS),continent != "Africa" & continent != "Asia"
& continent != "Europe" & continent != "Latin.America"
& continent != "Middle.East" & continent != "North.America"
& continent != "Pacific" & continent != "World"),
aes(Year,Twh, color = continent)) +
geom_point() +
geom_line()
gather(select(cont_consump, "Year", "BRICS", "CIS", "OECD"), economic_alliances, Twh, BRICS:OECD) %>%
ggplot(aes(Year, Twh, color = economic_alliances)) +
geom_point() +
geom_smooth(method = "lm")
## `geom_smooth()` using formula 'y ~ x'
gather(select(cont_consump,"Year","BRICS", "CIS", "OECD"),economic_alliances, Twh, BRICS:OECD) %>%
ggplot(aes(economic_alliances, Twh, fill = economic_alliances))+ geom_col()
gather(select(cont_consump,"Year","BRICS", "CIS", "OECD"),economic_alliances, Twh, BRICS:OECD) %>%
ggplot(aes( Twh, fill = economic_alliances))+ geom_boxplot()
ggplot(gather(country_consump, country, energy_consump, c(2:45)), aes(country, energy_consump, fill = as.factor(Year))) +
geom_col() +
theme(axis.text.x = element_text(angle = 90))
aggregate(energy_consump ~ country ,gather(country_consump, country, energy_consump, c(2:45)), FUN = "sum") %>%
arrange(desc(energy_consump)) %>%
head(10) %>%
ggplot(aes(country, energy_consump, fill = country)) +
geom_col()
Top 10 Energy Consumption Countries
gat <- gather(country_consump,country,energy_consump, c(2:45))
agg <- aggregate(energy_consump ~ country ,gather(country_consump,country,energy_consump, c(2:45)), FUN = "sum")
ggplot(merge(gat, agg %>%
arrange(desc(energy_consump)) %>%
select(country) %>%
head(10)),
aes(Year, energy_consump, color = country)) +
geom_point() +
geom_line() +
geom_smooth(method = "lm") +
facet_wrap(~country)
ggplot(merge(gat, agg %>%
arrange(desc(energy_consump)) %>%
select(country) %>%
head(10)) %>%
group_by(country) %>%
arrange(country, Year) %>%
mutate(percent_increase =(energy_consump - lag(energy_consump, default = first(energy_consump))) / lag(energy_consump, default = first(energy_consump))),
aes(Year, percent_increase, color = country)) +
geom_point() +
facet_wrap(~country) +
geom_smooth(method = "lm")
Low 10 Energy Consumption Countries
aggregate(energy_consump ~ country, gather(country_consump, country, energy_consump, c(2:45)), FUN = "sum") %>%
arrange(energy_consump) %>%
head(10) %>%
ggplot(aes(country, energy_consump, fill = country)) + geom_col() + theme(axis.text.x = element_text(angle = 90))
The Country with the lowest energy Consumption is New Zealand. Most countries with low energy consumption seem to be developing countries. This can be looked into further.
Developed countries with low energy consumption should be analyzed with attention.
New Zealand: high use of renewable energy combined with ardent legal action. (IEA,2020)
Norway: The abundant natural energy resources and a relatively small population made it easy for technology development leading to green shift. (Norsk Industry, 2021)
Portugal: Owns restriction toward carbon emission and coal- produced energy. (IEA,2020)
# Energy consumption/energy use over time period
ggplot(merge(gather(country_consump,country,energy_consump, c(2:45)),
aggregate(energy_consump ~ country ,gather(country_consump,country,energy_consump, c(2:45)), FUN = "sum") %>%
arrange(energy_consump) %>%
select(country) %>%
head(10)),aes(Year,energy_consump, color = country)) + geom_point() + geom_line()
## Warning: Removed 20 rows containing missing values (geom_point).
## Warning: Removed 20 row(s) containing missing values (geom_path).
# percentage increase each year
ggplot(merge(gather(country_consump,country,energy_consump, c(2:45)),
aggregate(energy_consump ~ country ,gather(country_consump,country,energy_consump, c(2:45)), FUN = "sum") %>%
arrange(energy_consump) %>%
select(country) %>%
head(10)) %>%
group_by(country) %>%
arrange(country,Year) %>%
mutate(percent_increase = (energy_consump - lag(energy_consump, default = first(energy_consump)))/lag(energy_consump, default = first(energy_consump))),
aes(Year,percent_increase,color = country)) + geom_point() + facet_wrap(~country)+ geom_smooth(method = "lm")
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (stat_smooth).
## Warning: Removed 20 rows containing missing values (geom_point).
organization_consumption_rate <- cont_consump %>%
rename("Middle-East" = "Middle.East", year = Year) %>%
select(year,OECD,CIS,"Middle-East",BRICS) %>%
pivot_longer(names_to = "Economic_Alliance", values_to = "Consumption", -year) %>%
group_by(Economic_Alliance) %>%
arrange(Economic_Alliance, year) %>%
mutate(Growth_Rate = 100 * (Consumption - lag(Consumption)) / lag(Consumption)) %>%
filter(!is.na(Growth_Rate))
Covid_Economic_Alliances <- organization_consumption_rate %>%
filter(year == 2020)
Covid_EA <- ggplot(Covid_Economic_Alliances, aes(x = reorder(Economic_Alliance, -Growth_Rate), y = Growth_Rate)) + geom_col(width = 0.3) +
labs(title = "Impact of Covid19 Pandemic on Energy Consumption", x="\nEconomic Alliance", y="Growth Rate(%)\n") +
theme_economist()
Covid_EA + theme(plot.title = element_text(family = "serif", face = "bold", hjust = 0.5, size = 15, color = "darkblue"),
axis.title.x = element_text(face = "bold", size = 9, color = "darkblue"),
axis.title.y = element_text(face = "bold", size = 9, color = "darkblue"))
Covid_Economic_Alliances1 <- Covid_Economic_Alliances %>%
select(Economic_Alliance, Growth_Rate) %>%
arrange(Growth_Rate)
Covid_Economic_Alliances1
## # A tibble: 4 x 2
## # Groups: Economic_Alliance [4]
## Economic_Alliance Growth_Rate
## <chr> <dbl>
## 1 OECD -7.02
## 2 CIS -5.49
## 3 Middle-East -1.23
## 4 BRICS -0.147
Why BRICS did not get affected by COVID19 as much as OECD or CIS did?
cont_consump_rate <- cont_consump %>%
rename("North-America" = "North.America", "Latin-America" = "Latin.America", "Middle-East" = Middle.East, year = Year) %>%
select(year, Europe, "North-America", "Latin-America", Asia, Pacific, Africa, "Middle-East") %>%
pivot_longer(names_to = "Continent", values_to = "Consumption", -year) %>%
group_by(Continent) %>%
arrange(Continent, year) %>%
mutate(Growth_Rate = 100 * (Consumption - lag(Consumption)) / lag(Consumption)) %>%
filter(!is.na(Growth_Rate))
Covid_continent <- cont_consump_rate %>%
filter(year == 2020)
Covid_Continent <- ggplot(Covid_continent, aes(x = reorder(Continent, -Growth_Rate), y = Growth_Rate)) + geom_col(width = 0.3) +
labs(title = "Impact of Covid19 Pandemic on Energy Consumption", x="\nContinent", y="Growth Rate(%)\n") +
theme_economist()
Covid_Continent + theme(plot.title = element_text(family = "serif", face = "bold", hjust = 0.5, size = 15, color = "darkblue"),
axis.title.x = element_text(face = "bold", size = 9, color = "darkblue"),
axis.title.y = element_text(face = "bold", size = 9, color = "darkblue"),
axis.text.x = element_text(size = 9, angle = 90, hjust = 1),
axis.text.y = element_text(size = 9))
# The rate of decline on Energy Consumption due to COVID19.
Covid_continent_Rate <- Covid_continent %>%
select(Continent, Growth_Rate) %>%
arrange(Growth_Rate)
Covid_continent_Rate
## # A tibble: 7 x 2
## # Groups: Continent [7]
## Continent Growth_Rate
## <chr> <dbl>
## 1 North-America -7.48
## 2 Latin-America -6.99
## 3 Europe -6.74
## 4 Africa -2.41
## 5 Pacific -1.94
## 6 Middle-East -1.23
## 7 Asia -0.468
Why Europe, Latin-America, North-America showed a significant decline in energy consumption? And why Asia, Middle-East, Pacific did not?
The corona virus disease (COVID-19) has affected countries as a whole, but the effects have been more acutely felt in urban centers. While commercial, public, and social services were either halted or partially restricted during lockdown, there was still a need for Required Core Urban Service Standards.
These service standards are broadly crosscutting and while energy is directly needed in both heating and cooling and electricity, energy remains essential in delivering all core urban services.
In short, The more urbanized countries were, the more energy consumption would have decreased.
Actually, The rate of urbanization by continent is highest in North America, followed by Latin America and Europe, and Asia and Africa are the lowest.
country_consump_rate <- country_consump %>%
rename(year = Year, "United States" = "United.States", "United Kingdom" = "United.Kingdom",
"South Korea" = "South.Korea", "New Zealand" = "New.Zealand",
"South Africa" = "South.Africa", "Saudi Arabia" = "Saudi.Arabia",
"United Arab Emirates" = "United.Arab.Emirates") %>%
pivot_longer(names_to = "Country", values_to = "Consumption", -year) %>%
group_by(Country) %>%
arrange(Country, year) %>%
mutate(Growth_Rate = 100 * (Consumption - lag(Consumption)) / lag(Consumption)) %>%
filter(!is.na(Growth_Rate))
Covid19_country <- country_consump_rate %>%
filter(year == 2020)
Covid_country <- ggplot(Covid19_country, aes(x = reorder(Country, -Growth_Rate), y = Growth_Rate)) + geom_col(width = 0.4) +
labs(title = "Impact of Covid19 Pandemic on Energy Consumption", x="\nCountry", y="Growth Rate(%)\n") +
theme_economist()
Covid_country + theme(plot.title = element_text(family = "serif", face = "bold", hjust = 0.5, size = 15, color = "darkblue"),
axis.title.x = element_text(face = "bold", size = 9, color = "darkblue"),
axis.title.y = element_text(face = "bold", size = 9, color = "darkblue"),
axis.text.x = element_text(face = "bold", size = 8, angle = 90, hjust = 1),
axis.text.y = element_text(size = 9))
Top5_country_covid <- Covid19_country %>% select(Country, Growth_Rate) %>%
arrange(Growth_Rate)
head(Top5_country_covid, 5)
## # A tibble: 5 x 2
## # Groups: Country [5]
## Country Growth_Rate
## <chr> <dbl>
## 1 Venezuela -19.4
## 2 Mexico -14.2
## 3 Spain -11.6
## 4 France -10.7
## 5 United Kingdom -9.41
Low5_country_covid <- Covid19_country %>% select(Country, Growth_Rate) %>%
arrange(desc(Growth_Rate))
head(Low5_country_covid, 5)
## # A tibble: 5 x 2
## # Groups: Country [5]
## Country Growth_Rate
## <chr> <dbl>
## 1 Kuwait 5.56
## 2 China 2.18
## 3 Nigeria 1.27
## 4 New Zealand 0
## 5 Iran -0.372
How China could maintain a balanced energy consumption?
Economic_Crsis_Alliances <- organization_consumption_rate %>%
filter(year == 2009)
Crisis_EA <- ggplot(Economic_Crsis_Alliances, aes(x = reorder(Economic_Alliance, -Growth_Rate), y = Growth_Rate)) + geom_col(width = 0.3) +
labs(title = "Impact of Economic Crisis on Energy Consumption", x="\nEconomic Alliance", y="Growth Rate(%)\n") +
theme_economist()
Crisis_EA + theme(plot.title = element_text(family = "serif", face = "bold", hjust = 0.5, size = 15, color = "darkblue"),
axis.title.x = element_text(face = "bold", size = 9, color = "darkblue"),
axis.title.y = element_text(face = "bold", size = 9, color = "darkblue"))
Economic_Crisis_Alliances1 <- Economic_Crsis_Alliances %>%
select(Economic_Alliance, Growth_Rate) %>%
arrange(Growth_Rate)
Economic_Crisis_Alliances1
## # A tibble: 4 x 2
## # Groups: Economic_Alliance [4]
## Economic_Alliance Growth_Rate
## <chr> <dbl>
## 1 CIS -7.64
## 2 OECD -4.43
## 3 Middle-East 3.06
## 4 BRICS 4.01
Economic_Crisis_continent <- cont_consump_rate %>%
filter(year == 2009)
Economic_Crisis_Continent <- ggplot(Economic_Crisis_continent, aes(x = reorder(Continent, -Growth_Rate), y = Growth_Rate)) + geom_col(width = 0.3) +
labs(title = "Impact of Economic Crisis on Energy Consumption", x="\nContinent", y="Growth Rate(%)\n") +
theme_economist()
Economic_Crisis_Continent + theme(plot.title = element_text(family = "serif", face = "bold", hjust = 0.5, size = 15, color = "darkblue"),
axis.title.x = element_text(face = "bold", size = 9, color = "darkblue"),
axis.title.y = element_text(face = "bold", size = 9, color = "darkblue"),
axis.text.x = element_text(size = 9, angle = 90, hjust = 1),
axis.text.y = element_text(size = 9))
EC_continent_Rate <- Economic_Crisis_continent %>%
select(Continent, Growth_Rate) %>%
arrange(Growth_Rate)
EC_continent_Rate
## # A tibble: 7 x 2
## # Groups: Continent [7]
## Continent Growth_Rate
## <chr> <dbl>
## 1 Europe -5.35
## 2 North-America -4.83
## 3 Latin-America -2.52
## 4 Pacific 0
## 5 Africa 2.19
## 6 Middle-East 3.06
## 7 Asia 4.48
Economic_Crisis_country <- country_consump_rate %>%
filter(year == 2009)
EC_country <- ggplot(Economic_Crisis_country, aes(x = reorder(Country, -Growth_Rate), y = Growth_Rate)) + geom_col(width = 0.4) +
labs(title = "Impact of Economic Crisis on Energy Consumption", x="\nCountry", y="Growth Rate(%)\n") +
theme_economist()
EC_country + theme(plot.title = element_text(family = "serif", face = "bold", hjust = 0.5, size = 15, color = "darkblue"),
axis.title.x = element_text(face = "bold", size = 9, color = "darkblue"),
axis.title.y = element_text(face = "bold", size = 9, color = "darkblue"),
axis.text.x = element_text(face = "bold", size = 8, angle = 90, hjust = 1),
axis.text.y = element_text(size = 9))
Top5_country_crisis <- Economic_Crisis_country %>% select(Country, Growth_Rate) %>%
arrange(Growth_Rate)
head(Top5_country_crisis, 5)
## # A tibble: 5 x 2
## # Groups: Country [5]
## Country Growth_Rate
## <chr> <dbl>
## 1 Ukraine -15.6
## 2 Romania -12.5
## 3 Kazakhstan -10
## 4 Sweden -10
## 5 Spain -8.63
Low5_country_crisis <- Economic_Crisis_country %>% select(Country, Growth_Rate) %>%
arrange(desc(Growth_Rate))
head(Low5_country_crisis, 5)
## # A tibble: 5 x 2
## # Groups: Country [5]
## Country Growth_Rate
## <chr> <dbl>
## 1 Algeria 10.8
## 2 India 9.77
## 3 United Arab Emirates 8.47
## 4 China 6.59
## 5 Indonesia 5.95
Why Ukraina especially got affected by Economic Crisis on Energy consumption?
Hypothesis1 : The energy consumption varies greatly among different geographical locations and economic alliances(BRICS, CIS, and OECD).
Hypothesis2 : According to various situational variables (2008 financial crisis, COVID-19, etc.), consumption of energy will decrease temporarily.
Hypothesis3 : G2 countries(United States and China) will account for a large proportion of energy consumption.
Why Covid19 is impacted most several countries on energy
consumption?
What will be the impact of COVID19 pandemic and its variants on energy consumption for year 2021, 2022 and 2023?
According to www.chooseenergy.com which stated that “the world’s
food systems account for approximately 30% of global energy
consumption”; we know that the Covid 19 pandemic is causing global
energy consumption to drop significantly to -4%.
ARE WE IN THE AFTERMATH OF A GLOBAL FOOD CRISIS?