knitr::opts_chunk$set(echo = TRUE)
setwd("~/Geology Msc UCL/GEOL0065 Research Methods and Skills/R Coding/Assignment 2")
getwd()
## [1] "C:/Users/Raymondo/Documents/Geology Msc UCL/GEOL0065 Research Methods and Skills/R Coding/Assignment 2"
library("tidyverse")
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5     v purrr   0.3.4
## v tibble  3.1.5     v dplyr   1.0.7
## v tidyr   1.1.4     v stringr 1.4.0
## v readr   2.0.2     v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library("readr")
library("lubridate")
## 
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
## 
##     date, intersect, setdiff, union
library("grid")
library("gridExtra")
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine
options(digits = 3)

Recommended libraries installed and imported (tidyverse, readr, lubridate, grid, gridExtra).
Number of significant figures set to 3.

energy <- read_csv("global-energy-data.csv")
## Rows: 15707 Columns: 34
## -- Column specification --------------------------------------------------------
## Delimiter: ","
## chr  (2): iso_code, country
## dbl (32): year, population, gdp, primary_energy_consumption, electricity_gen...
## 
## i Use `spec()` to retrieve the full column specification for this data.
## i Specify the column types or set `show_col_types = FALSE` to quiet this message.
class(energy)
## [1] "spec_tbl_df" "tbl_df"      "tbl"         "data.frame"

global-energy-data.csv imported into new data chunk.
Data class checked to ensure in form of data frame.
Column data types match the data contained.

Question 1

Design your own custom theme. You may use the custom theme you already worked with in the practical as a guide, but we are expecting you to extend this and customise the appearance of your plots for yourself.

myTheme <- theme(legend.text = element_text(face = "bold",
colour = "black", family = "Arial"),
axis.title = element_text(colour = "black", family =
"Arial"),
axis.line = element_line(size = 1, colour = "#BF360C"),
axis.ticks = element_line(colour = "grey"),
panel.grid.major = element_line(colour = "#FFCC80"),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "#FFF59D"),
legend.title = element_text(colour = "black", face = "italic",
family = "Arial"),
legend.position = "right",
plot.title = element_text(colour = "black", face = "bold",
family = "Arial", size = 18, hjust = 0.5))

myTheme2 <- theme(legend.text = element_text(face = "bold",
colour = "black", family = "Arial"),
axis.title = element_text(colour = "black", family =
"Arial"),
axis.line = element_line(size = 1, colour = "#BF360C"),
axis.ticks = element_line(colour = "grey"),
axis.text.x = element_text(angle = 25),
panel.grid.major = element_line(colour = "#FFCC80"),
panel.grid.minor = element_blank(),
panel.background = element_rect(fill = "#FFF59D"),
legend.title = element_text(colour = "black", face = "italic",
family = "Arial"),
legend.position = "right",
plot.title = element_text(colour = "black", face = "bold",
family = "Arial", size = 18, hjust = 0.5))

Question 2

Generate a scatter plot (geom_point()) figure to visualise the change in global energy consumption from renewable sources (combined) over time, as a function of total primary energy consumption and population. Scale the axes appropriately, label your axes/title/legend, and apply your Custom Theme.

GlobalRenew <- energy %>%
  filter(country == "World", year %in% (1960:2020))
plot1 <- ggplot(data = GlobalRenew, aes(x = year, y = renewables_consumption, size = primary_energy_consumption, colour = population, na.rm = TRUE )) + geom_point(shape = 18) + ggtitle("Renewables consumption over time by 
primary energy consumption and population") + ylab("Renewable energy consumption") + xlab("Year") +
labs(colour = "Primary Energy Consumption\n", size = "Population (billion)") + myTheme
print(plot1)
## Warning: Removed 6 rows containing missing values (geom_point).
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
## found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
## found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
## found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

Question 3

Generate a line graph (geom_line()) figure to visualise how renewable energy sources (combined) have contributed to (a) total energy consumption and (b) total electricity consumption over time. Scale the axes appropriately, label your axes/title/legend, and apply your Custom Theme.

RenewCon <- energy %>%
  filter(country == "World", year %in% (1960:2020))
plot1 <- ggplot() + 
geom_line(data = RenewCon, aes(x = year, y = renewables_consumption, colour = "renewables consumption")) +
geom_line(data = RenewCon, aes(x = year, y = primary_energy_consumption, colour = "total energy consumption")) + 
geom_line(data = RenewCon, aes(x = year, y = electricity_generation, colour = "total electricity consumption")) + ggtitle("Renewables contribution to energy and 
electricity consumption over time") + ylab("Energy consumption") + xlab("Year") +
labs(colour = "Key\n") + myTheme
print(plot1)
## Warning: Removed 6 row(s) containing missing values (geom_path).

## Warning: Removed 6 row(s) containing missing values (geom_path).
## Warning: Removed 25 row(s) containing missing values (geom_path).
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

Question 4

Conduct a small-scale investigation into the relative contributions of different types of renewable energy sources in those countries where renewable energy is >30% of the total energy consumption. You will need to select which data are relevant to your investigation from the database, choose how to plot these data in an informative and accessible way, include a short caption for each of your plots to explain what is being shown, and finally write a short summary of your data interpretation.

Great30Renew <- energy %>%
  filter(year == 2019, renewables_share_energy >= 30)
Great30Renew %>% glimpse()
## Rows: 9
## Columns: 34
## $ iso_code                     <chr> "AUT", "BRA", "DNK", "ECU", "ISL", "NZL",~
## $ country                      <chr> "Austria", "Brazil", "Denmark", "Ecuador"~
## $ year                         <dbl> 2019, 2019, 2019, 2019, 2019, 2019, 2019,~
## $ population                   <dbl> 8.96e+06, 2.11e+08, 5.77e+06, 1.74e+07, 3~
## $ gdp                          <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA
## $ primary_energy_consumption   <dbl> 417, 3445, 194, 207, 61, 255, 491, 623, 3~
## $ electricity_generation       <dbl> 71.6, 615.4, 29.8, 31.7, 19.3, 43.4, 132.~
## $ renewables_share_electricity <dbl> 77.0, 83.0, 76.0, 78.9, 100.0, 82.4, 98.2~
## $ renewables_share_energy      <dbl> 33.7, 45.0, 30.2, 30.4, 79.1, 35.4, 66.2,~
## $ renewables_consumption       <dbl> 140.4, 1551.0, 58.4, 62.8, 48.2, 90.1, 32~
## $ hydro_share_electricity      <dbl> 58.13, 64.01, 0.05, 77.08, 69.17, 58.33, ~
## $ hydro_share_energy           <dbl> 24.209, 28.698, 0.022, 29.541, 54.625, 24~
## $ hydro_consumption            <dbl> 100.861, 988.747, 0.042, 61.074, 33.325, ~
## $ solar_share_electricity      <dbl> 1.889, 1.081, 3.218, 0.120, 0.000, 0.283,~
## $ solar_share_energy           <dbl> 0.803, 0.400, 1.232, 0.199, 0.000, 0.123,~
## $ solar_consumption            <dbl> 3.347, 13.774, 2.385, 0.412, 0.000, 0.314~
## $ wind_share_electricity       <dbl> 10.611, 9.098, 53.332, 0.271, 0.033, 5.11~
## $ wind_share_energy            <dbl> 4.419, 4.013, 20.660, 0.102, 0.027, 2.194~
## $ wind_consumption             <dbl> 18.412, 138.255, 39.991, 0.212, 0.016, 5.~
## $ biofuel_share_electricity    <dbl> 6.33, 8.86, 19.35, 1.44, 0.00, 1.40, 0.34~
## $ biofuel_share_energy         <dbl> 1.42, 7.86, 0.00, 0.00, 0.00, 0.00, 0.00,~
## $ biofuel_consumption          <dbl> 5.94, 270.92, 0.00, 0.00, 0.00, 0.00, 0.0~
## $ fossil_share_electricity     <dbl> 23.034, 14.476, 24.047, 21.091, 0.015, 17~
## $ fossil_share_energy          <dbl> 66.3, 53.8, 68.4, 69.5, 20.6, 64.6, 32.9,~
## $ fossil_fuel_consumption      <dbl> 276.2, 1854.4, 132.5, 143.6, 12.6, 164.4,~
## $ gas_share_electricity        <dbl> 16.220, 9.214, 6.203, 10.607, 0.000, 7.69~
## $ gas_share_energy             <dbl> 21.36, 10.39, 15.08, 3.06, 0.00, 18.85, 9~
## $ gas_consumption              <dbl> 89.00, 358.10, 29.19, 6.32, 0.00, 48.00, ~
## $ oil_share_electricity        <dbl> 4.533, 1.234, 3.743, 10.485, 0.015, 2.351~
## $ oil_share_energy             <dbl> 36.5, 38.1, 47.8, 66.4, 18.4, 39.0, 21.9,~
## $ oil_consumption              <dbl> 152.3, 1314.0, 92.5, 137.3, 11.2, 99.2, 1~
## $ nuclear_share_electricity    <dbl> 0.00, 2.47, 0.00, 0.00, 0.00, 0.00, 0.00,~
## $ nuclear_share_energy         <dbl> 0.00, 1.16, 0.00, 0.00, 0.00, 0.00, 0.00,~
## $ nuclear_consumption          <dbl> 0, 40, 0, 0, 0, 0, 0, 166, 57
plot1 <- ggplot(data = Great30Renew, aes(x = country, y = renewables_share_energy, fill = country)) + geom_bar(stat = "identity") + ggtitle("Contributions of renewables to 
total energy consumption per country") + ylab("renewable share of total energy (%)") + xlab("country") + myTheme2
print(plot1)
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

Graph 1

This bar graph shows percentage contribution of renewable energies to the total energy consumption
of countries in 2019. The data was filtered so that only countries where renewable energy makes up over 30%
of the total energy consumption are shown.

energy_share <- Great30Renew %>% 
  tidyr::pivot_longer(cols = contains("share_energy"), names_to = "renewables_type", values_to = "energy_share") 
energy_share %>% glimpse()
## Rows: 81
## Columns: 27
## $ iso_code                     <chr> "AUT", "AUT", "AUT", "AUT", "AUT", "AUT",~
## $ country                      <chr> "Austria", "Austria", "Austria", "Austria~
## $ year                         <dbl> 2019, 2019, 2019, 2019, 2019, 2019, 2019,~
## $ population                   <dbl> 8.96e+06, 8.96e+06, 8.96e+06, 8.96e+06, 8~
## $ gdp                          <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N~
## $ primary_energy_consumption   <dbl> 417, 417, 417, 417, 417, 417, 417, 417, 4~
## $ electricity_generation       <dbl> 71.6, 71.6, 71.6, 71.6, 71.6, 71.6, 71.6,~
## $ renewables_share_electricity <dbl> 77, 77, 77, 77, 77, 77, 77, 77, 77, 83, 8~
## $ renewables_consumption       <dbl> 140.4, 140.4, 140.4, 140.4, 140.4, 140.4,~
## $ hydro_share_electricity      <dbl> 58.13, 58.13, 58.13, 58.13, 58.13, 58.13,~
## $ hydro_consumption            <dbl> 100.861, 100.861, 100.861, 100.861, 100.8~
## $ solar_share_electricity      <dbl> 1.89, 1.89, 1.89, 1.89, 1.89, 1.89, 1.89,~
## $ solar_consumption            <dbl> 3.35, 3.35, 3.35, 3.35, 3.35, 3.35, 3.35,~
## $ wind_share_electricity       <dbl> 10.6, 10.6, 10.6, 10.6, 10.6, 10.6, 10.6,~
## $ wind_consumption             <dbl> 18.4, 18.4, 18.4, 18.4, 18.4, 18.4, 18.4,~
## $ biofuel_share_electricity    <dbl> 6.33, 6.33, 6.33, 6.33, 6.33, 6.33, 6.33,~
## $ biofuel_consumption          <dbl> 5.94, 5.94, 5.94, 5.94, 5.94, 5.94, 5.94,~
## $ fossil_share_electricity     <dbl> 23.0, 23.0, 23.0, 23.0, 23.0, 23.0, 23.0,~
## $ fossil_fuel_consumption      <dbl> 276, 276, 276, 276, 276, 276, 276, 276, 2~
## $ gas_share_electricity        <dbl> 16.22, 16.22, 16.22, 16.22, 16.22, 16.22,~
## $ gas_consumption              <dbl> 89.0, 89.0, 89.0, 89.0, 89.0, 89.0, 89.0,~
## $ oil_share_electricity        <dbl> 4.53, 4.53, 4.53, 4.53, 4.53, 4.53, 4.53,~
## $ oil_consumption              <dbl> 152.3, 152.3, 152.3, 152.3, 152.3, 152.3,~
## $ nuclear_share_electricity    <dbl> 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,~
## $ nuclear_consumption          <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 40, 40, 40~
## $ renewables_type              <chr> "renewables_share_energy", "hydro_share_e~
## $ energy_share                 <dbl> 33.702, 24.209, 0.803, 4.419, 1.425, 66.2~
plot2 <- ggplot(data = energy_share %>% filter(renewables_type == "biofuel_share_energy" | renewables_type == "solar_share_energy" | renewables_type == "wind_share_energy" | renewables_type == "hydro_share_energy" ), aes(x = country, y = energy_share, fill = renewables_type)) + geom_bar(position = "fill", stat = "identity") + ggtitle("Renewable energy type shares per country") + ylab("Percentage of total renewables contribution") + xlab("country") + labs(colour = "renewables type\n") + myTheme2
print(plot2)
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

Graph 2

This stacked bar histogram shows the percentage contribution of different renewable energy types
within renewable energy shares of each country with a renewable energy contribution to total energy
consumption above 30% in 2019.

Great30RenewTime <- energy %>%
  filter(renewables_share_energy >= 30, year %in% (1960:2020))
plot3 <- ggplot() + 
geom_line(data = Great30RenewTime %>% filter(country == "Austria"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() +
geom_line(data = Great30RenewTime %>% filter(country == "Brazil"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() +
geom_line(data = Great30RenewTime %>% filter(country == "Denmark"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() +
geom_line(data = Great30RenewTime %>% filter(country == "Equador"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() +
geom_line(data = Great30RenewTime %>% filter(country == "Iceland"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() +
geom_line(data = Great30RenewTime %>% filter(country == "New Zealand"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() +
geom_line(data = Great30RenewTime %>% filter(country == "Norway"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() +  
geom_line(data = Great30RenewTime %>% filter(country == "Sweden"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() +
geom_line(data = Great30RenewTime %>% filter(country == "Switzerland"), aes(x = year, y = renewables_share_energy, colour = country)) + geom_line() + geom_point() + ggtitle("Graph comparing contribution of renewables to 
total energy consumption over time") + ylab("renewable share of total energy (%)") + xlab("Year") +
labs(colour = "country\n") + myTheme
print(plot3)
## geom_path: Each group consists of only one observation. Do you need to adjust
## the group aesthetic?
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database

Graph 3

This line graph shows the changes in the proportion of energy derived from renewable energy between
1960 and 2020, and compares these changes between different countries. The countries with a renewable
energy contribution to total energy consumption above 30% in 2019 are used for ease of comparison
across graphs and to prevent line overcrowding, although other countries move into the >30% renewables  range in previous years.

Summary of data interpretation

Graph 1 shows the countries which in 2019 had >30% of their energy consumption provided by renewable energy. Iceland had the highest percentage, with renewable energy making up 79.1% of Iceland’s energy consumption.
Analysing this data by renewable energy type in Graph 2 shows the major sources of renewable energy in these countries. The greatest percentage of renewable energy comes from hydroelectric energy, with every country excluding Denmark on the histogram showing hydroelectric energy as the dominant renewable source. Denmark is dominated by wind energy and produces very little hydroelectric energy as the country is very flat and so unsuitable for hydropower. These differences in countries renewable sectors suggest that the dominant renewable energy resource in a country depends on its resources, geology and geographical location. Other points of note are that only 3 of the countries obtain a significant percentage of their renewable energy from biofuel, and that solar energy seems to only make up a very small percentage of the total renewables contribution across the countries.
Looking at the changes in the percentage contribution of renewable energy to each of the countries between 1960-2020 in Graph 3, the countries show different trends. Notably, the total energy share of renewables in Iceland has increased significantly over time, whereas other countries show either slight increases (Sweden, Austria), slight decreases (Switzerland), or have overall stayed on the same track with some peaks and troughs (Norway). Brazil shows a sharp rise in renewable energy usage in the 1980s, perhaps reflecting increasing usage of biofuels and hydroelectric dam construction.