Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
The main objective of this visualization is to show which Renewable technologies are receiving the largest investments over years from 2004 to 2016. The chart shows global investment trends by energy source. To be noted,large hydropower is not included in these figures.
Targeted audience are the investors who wants to invest in the dominant renewable technologies of the future and researchers, data enthusists, mobile market key players and few knowledge seekers.
The visualisation chosen had the following three main issues:
The visualization uses stacked bar chart to represent the amount of Global Investment in Renewable Energy.This type of charts causes perceptual issue as it is difficult to compare the relative proportions of Investment on Renewable Energies in different year. For example, is the proportion of investment on wind Energy in year 2014 different from 2013? Hard to say. which is why line chart which is used when variable changes over time is the most suitable chart for this visualisation.
It uses red-green color combination which may cause challenges for people with color blindness to interpret the data correctly.The two types on the edges are not immune to confusion either. As shown, both the blue (Marine Energy) type and the dark red (liquid biofules) type are associated with downward sloping lines but its very difficult to explain the trends because of color issue.
The data labels were not defined by the stacked bar chart for Global Investment in Renewable Energies for each year which makes it difficult to compare the rise in trend for each Energy Type.
Reference
The following code was used to fix the issues identified in the original.
#Importing the Data
library(readr)
Data_Energy <- read_csv("C:/Users/Sawan/Downloads/investment-in-renewable-energy-by-technology.csv")
View(Data_Energy)
#Data Pre-processing
library(dplyr)
library(tidyr)
Data_Energy<-Data_Energy %>% gather('Solar Energy', 'Wind Energy','Biomass & Waste-to-Energy','Liquid Biofuels','Small Hydropower','Geothermal Energy','Marine Energy', key = "Renewable_Energy",value = "Investment")
str(Data_Energy)
## tibble [91 x 3] (S3: tbl_df/tbl/data.frame)
## $ Year : num [1:91] 2004 2005 2006 2007 2008 ...
## $ Renewable_Energy: chr [1:91] "Solar Energy" "Solar Energy" "Solar Energy" "Solar Energy" ...
## $ Investment : num [1:91] 11.2 15.9 21.9 38.9 61.3 ...
Data_Energy$Renewable_Energy<- as.factor(Data_Energy$Renewable_Energy)
Data_Energy$Year<- as.factor(Data_Energy$Year)
#Plotting the Visualisation
library(ggplot2)
P1<-ggplot(Data_Energy,aes(fill=Renewable_Energy))+
geom_line(aes(x=Year,y=Investment,colour=Renewable_Energy,group=Renewable_Energy))+
geom_point(aes(x=Year,y=Investment,colour=Renewable_Energy))+
geom_text(aes(x=Year,y=Investment,label=paste(Investment),colour=Renewable_Energy),size=3.5,hjust=1,vjust=1.5)+
scale_fill_manual(values =rev(c('#543005','#8c510a','#bf812d','#dfc27d','#f6e8c3','#c7eae5','#80cdc1')))+
theme_minimal()+
labs( title= "Investment in renewable energy by technology",subtitle="Period:Year 2004 to 2016")+
ylab("Investment(in billions)")+
xlab("Year")+
facet_grid(Renewable_Energy~., scales = "free_y",labeller =labeller(Renewable_Energy = label_wrap_gen(10)))+
theme(strip.background = element_rect(colour = "black", fill = "white"))+
theme(strip.text.y = element_text(angle = 0))
Data Reference
The following plot fixes the main issues in the original.