Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.

Original


>


Figure 1: 2016 Global greenhouse gas emission by sector (source: Hannah Ritchie, Max Roser and Pablo Rosado (2020) - ‘CO₂ and Greenhouse Gas Emissions’. Published online at OurWorldInData.org. Retrieved from: ‘https://ourworldindata.org/emissions-by-sector’)


Objective

The visualisation of ‘greenhouse gas emission by sector’ is for the world wide public audience. The purpose is, as quoted by the authors Hannah Ritchie, Max Roser and Pablo Rosado (2020):

‘To effectively reduce emissions we need to know where they are coming from – which sectors contribute the most? How can we use this understanding to develop effective solutions and mitigation strategies?’

The visualisation chosen had the following three main issues:

  • Pie and 1.5 doughnuts : Human are not good in deciphering the areas and angles, especially if they are almost similar, as can be seen in the above visual. “Things get tricky when the proportions are similar”, as quoted by James Baglin (2020:Chapter4). Apart from the visual deceptive issue, having both pie and 1.5 doughnuts also mean over plotting. Readers will need to take a long time to understand the chart.


    Figure 2: Pie + 1.5 doughnuts = deceptive over plot

  • Text inconsistencies : The text sizes are different for the doughnut segments. Some are big and some are even too small to read. The text direction is also inconsistent, with some being vertical to the doughnut and some along the doughnut curve.

  • Colour choices are poor : The choice of green and red is not colour blind friendly. This is even compounded by placing the red and green side by side, for the chart, as well as for the text. The colours in the doughnut segments will be hard to decipher, as demonstrated in the figure below. The colour hues are also strong. They can be of softer tints so that the readers will not have eye fatigue since they chart requires long reading time to understand the emission sectors.


>


Figure 3: Colour blind simulation results on the original chart (generated through Matthew Wickline and the Human-Computer Interaction Resource Network (2000)-‘Colbindor’, at website ‘https://www.color-blindness.com/coblis-color-blindness-simulator/’)


Reference

Hannah Ritchie, Max Roser and Pablo Rosado (2020) ‘CO₂ and Greenhouse Gas Emissions’, Our World in Data, accessed 23 July 2022, https://ourworldindata.org/emissions-by-sector.

James Baglin (2020) ‘Chapter 4 Avoiding Deception’, Data Visualisation: From Theory to Practice, accessed 23 July 2022, https://dark-star-151510.appspot.com/secured/_book/avoiding-deception.html.

Matthew Wickline and the Human-Computer Interaction Resource Network (2000) ‘Colbindor’, accessed 30 July 2022, https://www.color-blindness.com/coblis-color-blindness-simulator/.

Code

The following code was used to fix the issues identified in the original.

# This report is written in *R* (R Core Team 2021) with the following packages utilised.
library(readxl)    #(Hadley & Jennifer 2019) for excel manipulation
library(ggplot2)   #(Hadley Wickham 2016) for graphics
library(dplyr)     #(Hadley et al. 2022) for data manipulation
library(magrittr)  #(Stephan & Hadley 2022) for forward pipe operator
library(stringr)   #(Hadley Wickham 2019) for string operations
library(gridExtra) #(Baptiste Auguie 2017) for grid function
library(grid)      #(R Core Team 2022) for grid
library(ggpubr)    #(Alboukadel Kassambara 2020) for arranging plot


# Download the file from url and read
var_url<-'https://ourworldindata.org/uploads/2020/09/Global-GHG-Emissions-by-sector-based-on-WRI-2020.xlsx'
var_tempfile <- tempfile()
download.file(var_url, var_tempfile, mode="wb")
df_sector <- read_excel(path = var_tempfile, sheet =  'Sector')  
df_sub_sector <- read_excel(path = var_tempfile, sheet = 'Sub-sector')
df_sub_sector_further<- read_excel(path = var_tempfile, sheet = 'Sub-sector (further breakdown)')


# Data wraggling for Sector

# Shorten the text
df_sector[df_sector == "Agriculture, Forestry & Land Use (AFOLU)"] <- "Agriculture, Forestry & Land Use"

# Create factor for sector
df_sector$Sector <- df_sector$Sector %>%
factor(levels = df_sector$Sector[order(df_sector$`Share of global greenhouse gas emissions (%)`)])

# Create display text for sector
df_sector$`Display text` <- paste(df_sector$`Share of global greenhouse gas emissions (%)`,"%", "\n", df_sector$Sector)
df_sector[4, 3] <- paste("18.4", "%", "\n", "Agriculture, Forestry", "\n",  "& Land Use")   #word wrap

# Split sectors into different data frame for display
df_energy_m <- df_sector %>% filter(`Sector`=="Energy")
df_aflu_m <- df_sector %>% filter(`Sector`=="Agriculture, Forestry & Land Use")
df_industrial_m <- df_sector %>% filter(`Sector`=="Industrial processes")
df_waste_m <- df_sector %>% filter(`Sector`=="Waste")



# Data wraggling for Sub-sector

# Assign Sector category to the Sub-sector
df_sub_sector %<>% mutate("Sector" = case_when(str_detect(`Sub-sector`,"Cement") ~ "Industrial processes",
          str_detect(`Sub-sector`, "industri") ~ "Industrial processes",
          str_detect(`Sub-sector`, "Wastewater") ~ "Waste",
          str_detect(`Sub-sector`, "Landfills") ~ "Waste",
          str_detect(`Sub-sector`, "Crop") ~ "Agriculture, Forestry & Land Use",
          str_detect(`Sub-sector`, "Grass") ~ "Agriculture, Forestry & Land Use",
          str_detect(`Sub-sector`, "Forest") ~ "Agriculture, Forestry & Land Use",
          str_detect(`Sub-sector`, "Rice") ~ "Agriculture, Forestry & Land Use",
          str_detect(`Sub-sector`, "Soil") ~ "Agriculture, Forestry & Land Use",
          str_detect(`Sub-sector`, "Livestock") ~ "Agriculture, Forestry & Land Use",
          TRUE ~ "Energy"))

# Clean up text for the Sub-sector
df_sub_sector %<>% mutate(`Sub-sector` = case_when(str_detect(`Sub-sector`,"Energy in industry") ~ "Industry",
          str_detect(`Sub-sector`, "Energy in buildings") ~ "Buildings (elec & heat)",
          str_detect(`Sub-sector`, "Chemical & petrochemical") ~ "Chemical & petrochemical",
          TRUE ~ `Sub-sector`))

# Create factor for Sector in the Sub sector data frame
df_sub_sector$Sector %<>% factor(levels = levels(df_sector$Sector), labels = levels(df_sector$Sector))

# Create display text for the Sub sector
df_sub_sector$`Display text` <- paste(df_sub_sector$`Share of global greenhouse gas emissions (%)`,"%", df_sub_sector$`Sub-sector`)

# split the Sub sectors into different data frame
df_energy_1 <- df_sub_sector %>% filter(`Sector`=="Energy")
df_e_industry_1 <- df_energy_1 %>% filter(`Sub-sector`=="Industry")
df_e_building_1 <- df_energy_1 %>% filter(`Sub-sector`=="Buildings (elec & heat)")
df_e_transport_1 <- df_energy_1 %>% filter(`Sub-sector`=="Transport")
df_e_other_1     <- rbind(df_energy_1[4,], df_energy_1[5,], df_energy_1[6,])
df_aflu_1 <- df_sub_sector %>% filter(`Sector`=="Agriculture, Forestry & Land Use")
df_industrial_1 <- df_sub_sector %>% filter(`Sector`=="Industrial processes")
df_waste_1 <- df_sub_sector %>% filter(`Sector`=="Waste")

# Create sort order
df_energy_1 %<>% arrange(desc(`Sector`),desc(`Share of global greenhouse gas emissions (%)`)) 
v_energy_1_sort <- df_energy_1$`Sub-sector`
v_e_other_1_sort <- c("Unallocated fuel combustion", "Fugitive emissions from energy", "Energy in Agri & Fishing")
df_aflu_1 %<>% arrange(desc(`Sector`),desc(`Share of global greenhouse gas emissions (%)`)) 
v_aflu_1_sort <- df_aflu_1$`Sub-sector`
df_industrial_1 %<>% arrange(desc(`Sector`),desc(`Share of global greenhouse gas emissions (%)`)) 
v_industrial_1_sort <- df_industrial_1$`Sub-sector`
df_waste_1 %<>% arrange(desc(`Sector`),desc(`Share of global greenhouse gas emissions (%)`)) 
v_waste_1_sort <- df_waste_1$`Sub-sector`

# Data wraggling for Sub sector further breakdown 

# Asssign Sector category to the Sub-sector further breakdown
df_sub_sector_further %<>% mutate("Sector" = case_when(str_detect(`Sub-sector`,"Cement") ~ "Industrial processes",
                            str_detect(`Sub-sector`, "industri") ~ "Industrial processes",
                            str_detect(`Sub-sector`, "Wastewater") ~ "Waste",
                            str_detect(`Sub-sector`, "Landfills") ~ "Waste",
                            str_detect(`Sub-sector`, "Crop") ~ "Agriculture, Forestry & Land Use",
                            str_detect(`Sub-sector`, "Grass") ~ "Agriculture, Forestry & Land Use",
                            str_detect(`Sub-sector`, "Forest") ~ "Agriculture, Forestry & Land Use",
                            str_detect(`Sub-sector`, "Rice") ~ "Agriculture, Forestry & Land Use",
                            str_detect(`Sub-sector`, "Soil") ~ "Agriculture, Forestry & Land Use",
                            str_detect(`Sub-sector`, "Livestock") ~ "Agriculture, Forestry & Land Use",
                            TRUE ~ "Energy"))

# Assign Sub sector category to the Sub sector breakdown 
df_sub_sector_further %<>% mutate("Sub parent" = case_when(str_detect(`Sub-sector`, "Road") ~ "Energy in Transport",
                            str_detect(`Sub-sector`, "Aviation") ~ "Energy in Transport",
                            str_detect(`Sub-sector`, "Rail") ~ "Energy in Transport",
                            str_detect(`Sub-sector`, "Pipeline") ~ "Energy in Transport",
                            str_detect(`Sub-sector`, "Ship") ~ "Energy in Transport",
                            str_detect(`Sub-sector`, "Residential") ~ "Energy in Building",
                            str_detect(`Sub-sector`, "Commercial") ~ "Energy in Building",
                            str_detect(`Sub-sector`, "Iron & Steel") ~ "Energy in Industry",
                            str_detect(`Sub-sector`, "Non-ferous metals") ~ "Energy in Industry",
                            str_detect(`Sub-sector`, "Machinery") ~ "Energy in Industry",
                            str_detect(`Sub-sector`, "Food and tobacco") ~ "Energy in Industry",
                            str_detect(`Sub-sector`, "Paper, pulp & printing") ~ "Energy in Industry",
                            str_detect(`Sub-sector`, "energy") ~ "Energy in Industry",
                            str_detect(`Sub-sector`, "Other industry") ~ "Energy in Industry",
                            TRUE ~ "N/A"))

# Create factor for the Sector in the Sub sector breakdown data frame
df_sub_sector_further$Sector %<>% factor(levels = levels(df_sector$Sector), labels = levels(df_sector$Sector))

# Create display text for the Sub sector breakdown
df_sub_sector_further$`Display text` <- paste(df_sub_sector_further$`Share of global greenhouse gas emissions (%)`,"%", df_sub_sector_further$`Sub-sector`)

# Split the Sub sector further breakdown into different data frame
df_e_transport <- df_sub_sector_further %>% filter(`Sub parent`=="Energy in Transport")
df_e_industry <- df_sub_sector_further %>% filter(`Sub parent`=="Energy in Industry")
df_e_building <- df_sub_sector_further %>% filter(`Sub parent`=="Energy in Building")

# Create sort order for the Sub sector breakdown
df_e_transport %<>% arrange(desc(`Sector`),desc(`Share of global greenhouse gas emissions (%)`)) 
v_e_transport_sort <- df_e_transport$`Sub-sector`
df_e_industry %<>% arrange(desc(`Sector`),desc(`Share of global greenhouse gas emissions (%)`)) 
v_e_industry_sort <- df_e_industry$`Sub-sector`
df_e_building %<>% arrange(desc(`Sector`),desc(`Share of global greenhouse gas emissions (%)`)) 
v_e_building_sort <- df_e_building$`Sub-sector`

#Choose colours
#create a vector of colour blind friendly colours from Color Brewer
#url https://colorbrewer2.org/#type=qualitative&scheme=Paired&n=4
myColours <- c( "Energy"='#a6cee3',
                "Industrial processes"='#b2df8a',
                "Agriculture, Forestry & Land Use"='#33a02c',
                "Waste"='#1f78b4')

# Create bar charts

# Plot energy Sector
plot_m1 <- ggplot(data = df_energy_m, aes(`Sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(breaks = c("1Energy"),
                       labels = c("")) +
      geom_bar(stat = "identity") +
      coord_flip() +
      scale_fill_manual(values=myColours) + 
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 1.7)) +
      theme(legend.position = "none",
            plot.title = element_text(size = 18, face = "bold"),
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
            xlab("") + ylab("") +
            ggtitle("by sector")

# Plot Agriculture Forest Land Use Sector
plot_m2 <- ggplot(data = df_aflu_m, aes(`Sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) + 
      scale_x_discrete( breaks = c("2Agriculture, Forestry & Land Use"),
                       labels = c("")) +  
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) + 
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 1.7)) +
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
            xlab("") + ylab("")

# Plot industrial processes Sector
plot_m3 <- ggplot(data = df_industrial_m, aes(`Sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) + 
      scale_x_discrete(breaks = c("3Industrial processes"),
                       labels = c("")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) + 
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 1.7)) +
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
            xlab("") + ylab("")

# Plot waste Sector 
plot_m4 <- ggplot(data = df_waste_m, aes(`Sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) + 
      scale_x_discrete(breaks = c("4Waste"),
                       labels = c("")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) + 
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 1.7)) +
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
            xlab("") + ylab("")


# Plot energy Sub sector
plot_b1 <- ggplot(data = df_energy_1, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(limits=rev(v_energy_1_sort),
                       breaks = df_energy_1$`Sub-sector`,
                       labels = c("", "", "", "", "", "")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("")

# Plot energy Sub sector industry
plot_b1_industry <- ggplot(data = df_e_industry_1, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(breaks = c("Industry"),
                       labels = c("")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            plot.title = element_text(size = 18, face = "bold"),            
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("") +
      ggtitle("by sub-sector")

# Plot energy Sub sector building
plot_b1_building <- ggplot(data = df_e_building_1, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(breaks = c("Buildings (elec & heat)"),
                       labels = c("")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("")

# Plot energy Sub sector transport 
plot_b1_transport <- ggplot(data = df_e_transport_1, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(breaks = c("Transport"),
                       labels = c("")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("")

# Plot energy Sub sector remnants
plot_b1_other <- ggplot(data = df_e_other_1, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(limits=rev(v_e_other_1_sort),
                       breaks = df_e_other_1$`Sub-sector`,
                       labels = c("", "", "" )) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("")

# Plot agriculture forest land use Sub sector
plot_b2 <- ggplot(data = df_aflu_1, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(limits=rev(v_aflu_1_sort),
                       breaks = df_aflu_1$`Sub-sector`,
                       labels = c("", "", "", "", "", "", "")) +
      coord_flip() + 
      geom_bar(stat = "identity") +
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("")

# Plot industrial processes sub sector
plot_b3 <- ggplot(data = df_industrial_1, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(limits=rev(v_industrial_1_sort),
                       breaks = df_industrial_1$`Sub-sector`,
                       labels = c("", "")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
        xlab("") + ylab("")

# Plot waste Sub sector
plot_b4 <- ggplot(data = df_waste_1, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(limits=rev(v_waste_1_sort),
                       breaks = df_waste_1$`Sub-sector`,
                       labels = c("", "")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("") 

# Plot energy on industry Sub sector further breakdown
plot_e1 <- ggplot(data = df_e_industry, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(limits=rev(v_e_industry_sort),
                       breaks = df_e_industry$`Sub-sector`,
                       labels = c("", "", "", "", "", "", "")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            plot.title = element_text(size = 18, face = "bold"),
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("") +
      ggtitle("by sub-sector futher breakdown")

# Plot energy on building Sub sector further breakdown
plot_e2 <- ggplot(data = df_e_building, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(limits=rev(v_e_building_sort),
                       breaks = df_e_building$`Sub-sector`,
                       labels = c("", "")) +
      coord_flip() + 
      geom_bar(stat = "identity") +
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
      xlab("") + ylab("")

# Plot energy on transport Sub sector further breakdown
plot_e3 <- ggplot(data = df_e_transport, aes(`Sub-sector`,`Share of global greenhouse gas emissions (%)`, fill=`Sector`)) +
      scale_y_continuous(limits = c(0, 100)) +
      scale_x_discrete(limits=rev(v_e_transport_sort),
                       breaks = df_e_transport$`Sub-sector`,
                       labels = c("", "", "", "", "")) +
      geom_bar(stat = "identity") +
      coord_flip() + 
      scale_fill_manual(values=myColours) +
      geom_text(aes(label=`Display text`, hjust = -0.05, size = 0.7)) + 
      theme(legend.position = "none",
            axis.ticks.x = element_blank(),
            axis.text.x = element_blank(),
            panel.grid.major = element_blank(), 
            panel.grid.minor = element_blank(),
            panel.background = element_blank()) +
        xlab("") + ylab("")


text_blank <- textGrob(" ")

# Build Energy Sector and Sub Sectors
lay1 <- rbind(c(1,1,2,2,2),
              c(1,1,2,2,2),
              c(1,1,3,3,3),
              c(1,1,4,4,4),
              c(1,1,4,4,4),
              c(1,1,5,5,5))
 
grid1 <- grid.arrange(plot_m1, plot_b1_industry, plot_b1_building,
                      plot_b1_transport, plot_b1_other,
                      layout_matrix = lay1)

# Build Energy Sub Sector further breakdowns
lay1b <- rbind(c(1,1,1),
               c(1,1,1),
               c(2,2,2),
               c(3,3,3),
               c(3,3,3),
               c(4,4,4))

grid1b <- grid.arrange(plot_e1, plot_e2, plot_e3, text_blank,
                      layout_matrix = lay1b)

# Build other Sectors
lay2 <- rbind(c(1,1,4,4,4),
              c(1,1,4,4,4),
              c(2,2,5,5,5),
              c(3,3,6,6,6))
grid2 <- grid.arrange(plot_m2, plot_m3, plot_m4,
                      plot_b2, plot_b3, plot_b4,
                      layout_matrix = lay2)

# Building final hierarchical bar charts with header and footer
plot_reconstructed <- ggarrange(grid1, grid1b,
      grid2, ncol = 2, nrow = 2)    
plot_reconstructed <- annotate_figure(plot_reconstructed,
      top = text_grob("Global Greenhouse Gass Emission (2016)", 
                     color = "black", face = "bold", size = 18, hjust = 1.3, vjust = 0.3),
      bottom = text_grob("Year 2016 global greenhouse gas emissions were 49.4 billion tonnes CO2 equivalent", 
                     color = "black", face = "italic", size = 12, hjust = 1.0))

Data Reference

Hannah Ritchie, Max Roser and Pablo Rosado (2020) ‘CO₂ and Greenhouse Gas Emissions’, Our World in Data, accessed 23 July 2022, https://ourworldindata.org/uploads/2020/09/Global-GHG-Emissions-by-sector-based-on-WRI-2020.xlsx.

R Package Reference

Alboukadel Kassambara (2020), ggpubr: ‘ggplot2’ Based Publication Ready Plots. R package version 0.4.0., https://CRAN.R-project.org/package=ggpubr.

Baptiste Auguie (2017), gridExtra: Miscellaneous Functions for “Grid” Graphics. R package version 2.3, https://CRAN.R-project.org/package=gridExtra.

Color Brewer Organisation, ColorBrewer: Color Advice for Maps., accessed 23 July 2022, https://colorbrewer2.org/#type=qualitative&scheme=Paired&n=4.

Hadley Wickham (2016), ggplot2: Elegant Graphics for Data Analysis, Springer-Verlag, New York, https://ggplot2.tidyverse.org.

Hadley Wickham and Jennifer Bryan (2019), readxl: Read Excel Files. R package version 1.3.1. https://CRAN.R-project.org/package=readxl.

Hadley Wickham (2019), stringr: Simple, Consistent Wrappers for Common String Operations, R package version 1.4.0, https://CRAN.R-project.org/package=stringr.

Hadley Wickham, Romain Francois, Lionel Henry and Kirill Muller (2022), dplyr: A Grammar of Data Manipulation, R package version 1.0.8, https://CRAN.R-project.org/package=dplyr.

Matthew Wickline and the Human-Computer Interaction Resource Network (2000) ‘Colbindor’, accessed 30 July 2022, https://www.color-blindness.com/coblis-color-blindness-simulator/.

R Core Team (2021), R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.

Stefan Milton Bache and Hadley Wickham (2022), magrittr: A Forward-Pipe Operator for R. R package version 2.0.2. https://CRAN.R-project.org/package=magrittr.



Appendix - Colour Test

# Plot colour grid for colour test
lay_colour <- rbind(c(1,1),
                    c(2,2),
                    c(3,3),
                    c(4,4))
plot_colour <- grid.arrange(plot_m1, plot_m2, plot_m3, plot_m4,
                      layout_matrix = lay_colour)


>


Figure 4: Colour blind simulation results on the new chart (generated through Matthew Wickline and the Human-Computer Interaction Resource Network (2000)-‘Colbindor’, at website ‘https://www.color-blindness.com/coblis-color-blindness-simulator/’)


Reconstruction

The following hierarchical humble bar plot fixes the 3 issues in the original.