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

Original


Source: World Resources Institute (2018).


••Introduction**

The visualisation aims to analyse the Carbon-di-oxide(Co2) as the primary greenhouse gas caused by human activities compel climate change. Almost 60 percent of Green House Gas emissions become apparent from only 10 countries. On the other hand, the 100 minimal-emitters put up below 3 percent. Moreover, the contribution of the Energy sector is more or less three-fourths of global emissions, followed by the agriculture sector. Furthermore, electricity and heat generation are wide-reaching emitters. Subsequently, transportation and manufacturing sectors. After that, Land use, land-use change, and forestry (LULUCF) are both submerged emissions and salient sectors to have net-zero emissions. The targeted audience of this visualisation is International and National bodies, state and local government, society, and people.

Objective

The visualisation chosen had the following three main issues:

  • 1:Data scarcity and truncating scale: The chart has not displayed any data values (percentage) on it, although the slices are presented in ranked order from the highest value (Greenhouse emissions) continuing clockwise to the smallest value, this ranking is inconspicuous since it’s hard to compare the slices. For example, which sector of which country has the highest and lowest emissions are hard to predict. Thus, the reader does not have any idea about the contribution of sectors in emissions as per the country(in numeric values).

  • 2: Misleading Color contrast and Misleading text: Too much color scaling as well as the misrepresentation of data making it difficult to read and compare, the size and color of the text written as sectors and countries are not appropriate. For example color combination with text written on slices making it hard to read. The reader will be failed to answer the name of the sector due to color contrast between text and slices.

  • 3: Visual method and confusing correlations: There are several tiny slices for sectors, it’s challenging for the reader to distinguish correctly from one another. The image does not show all the sectors for all countries except China and thus information can be off-tracked or ignored in reading. All the sectors are not visible. This kind of representation requires Bar graph (as I believe, it’s easy to read because there would be much space to depicts all the sectors country-wise clearly and plainly, moreover it will be more appropriate).

Reference

•Image source: New Compelling Data Visualizations on Climate Change — DataViz Weekly January 15th, 2021 by AnyChart Team. https://www.anychart.com/blog/2021/01/15/climate-change-data-visualizations/

•Data Source: Historical GHG Emissions (2018) Climate watch (filtered data: world and top ten countries emissions in percentage). •https://www.climatewatchdata.org/ghg-emissions?chartType=percentage&regions=WORLD%2CTOP&sectors=614

Code

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

#Required Packages
library(readr) #To read the data files
library(dplyr)    #To manipulate the data
library(magrittr) #To the structuring and sequencing of Data
library(ggplot2)  #For the mapping of variables
library(EnvStats) #To perform statistical Analysis
library(formattable) #Generic function to create format table object
library(tidyr)  #Tidy Messy Data
library(plotly)  #Drawing plots
library(ggfittext) # geom to fit text inside a box.
library(extrafont) #embedding fonts 
library(plyr)  # sort data structure
library(scales) # determine  breaks and labels for axes and legends.


#Importing data set using readr package 
data_new<-read.csv("historical_emissions.csv", skip = 1)
#For making it tidy and easy to understand pivot longer function of tidyr package is being used to convert columns into rows or  "lengthens" data, increasing the number of rows and decreasing the number of columns. 
data_p<-data_new%>%pivot_longer(cols = 2:15, names_to = "Sector", values_to = "Co2_emissions")
#Rename the variable as Country
names(data_p)[1]<-"Country"
#Factor variable
data_p$Sector<-data_p$Sector%>%factor(levels = c("Agriculture","Building","Bunker.Fuels", "Electricity.Heat","Energy","Fugitive.Emissions","Industrial.Processes","Land.Use.Change.and.Forestry", "Manufacturing.Construction","Other.Fuel.Combustion","Total.excluding.LUCF","Total.including.LUCF", "Transportation","Waste"),labels = c("Agriculture","Building","Bunker Fuels","Electricity and Heat","Energy","Fugitive Emissions","Industrial Processes","Land Use Change and Forestry","Manufacturing Construction","Other Fuel Combustion","Total excluding LUCF","Total including LUCF", "Transportation","Waste"))

#creating object for storing data and select useful variable
emission_data<-data_p%>%select("Country","Sector", "Co2_emissions")
#Filtering sectors which are contributing in co2 emissions 
emission_data<-emission_data%>%dplyr::filter(Sector=="Agriculture"| Sector=="Fugitive Emissions" | Sector== "Energy"               
                                   | Sector=="Electricity and Heat"| Sector=="Industrial Processes" | Sector=="Manufacturing Construction"      
                                   | Sector=="Transportation" ) 
#Sub-setting data frame for reconstructing 
emission_data<-emission_data[1:70,]
# storing number value variable as numeric variable and extracting white spaces and other symbols 
emission_data$Co2_emissions<-as.numeric(gsub("[\\%,]","", emission_data$Co2_emissions))
# Using ggplot2 package for plotting bar graph effectively
# original images as some issue with it, for making it easy to understated for audience, i plotted bar graph where x axis shows the name of top 10 countries which have high co2 emissions and y axis repressing the percentage of co2 emissions in metric tonnes, moreover scaling is used for different sectors generating co2 emissions. 
plot_new<-ggplot(emission_data, aes(x = reorder(Country, -Co2_emissions), y = Co2_emissions, fill = Sector,order = -as.numeric(Sector))) + geom_bar(stat = "identity")+ theme_bw() +
  geom_col(position = "stack")+scale_y_continuous(breaks=c(0,2,4,6,8,10,12,14, 16, 18, 20,22,24,26,28,30),labels = dollar_format(suffix = "%", prefix = ""))+labs(title="The Top 10 GHG Emitters Contribute Over 65% of Global Emissions", 
                                    subtitle="Camparing rest of world with top 10 GHG emitting countries", 
                                    caption="Source: World Resources Institute 2018")+ xlab("Countires") + ylab("Co2 emiiting in percentage") +theme_gray()+ theme(axis.text.x =
                   element_text(size  = 10,
                                angle = 45,
                                hjust = 1,
                                vjust = 1))+ theme(axis.text.y =  
                   element_text(size  = 10,
                                hjust = 1,
                                vjust = 1))+theme(axis.title = element_text(size = 13)) +theme(axis.line = element_line(size=1, colour = "black"), panel.border = element_blank())
      
  
# Modify components of a theme
reconstruction<-plot_new+ theme(
  plot.title = element_text(color = "Black", size = 14, face = "bold"),
  plot.subtitle = element_text(color = "blue"),
  plot.caption = element_text(color = "Black", face = "italic")
)

Data Reference

•Image source: New Compelling Data Visualizations on Climate Change — DataViz Weekly January 15th, 2021 by AnyChart Team. https://www.anychart.com/blog/2021/01/15/climate-change-data-visualizations/

•Data Source:Historical GHG Emissions (2018) Climate watch (filtered data: world and top ten countries emissions in percentage). •https://www.climatewatchdata.org/ghg-emissions?chartType=percentage&regions=WORLD%2CTOP&sectors=614

Reconstruction

The following plot fixes the main issues in the original.