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

Original



Objective

  • The objective of the above data visualisation was to show the changes in forest geographical area coverage of India from year 1987 to 2015, created by the Ministry of environment,forest and climate change.
  • The visualization contained two variables; bar graph was representing the percentage of forest cover to the total geographical area and the second variable was created using the line graph on the top of bar graph showing the trend of total forest cover in India measured in square kilometer.
  • As the visualization was made available to everyone, therefore, it is addressing to the people of the country(India) as its audience.

The visualisation chosen had the following three main issues:

  • Color blindess : The visualization was poorly presented with the color combination of dark geen and blue which makes it difficult to distinguish blue from green color. Also, the text written on the top of the bar was of same color as of the bar which was creating readability issue.
  • Dual Axes : The visualization included dual axes which made it prone to misinterpretation.The second y-axis(percentage) could go unnoticed and would consume more time to process and understand.
  • Wrong choice of graph : The visualization had a variable for showing the change in percentage of forest cover to the total geographical area in a time-series and therefore, bar graph shouldn’t be the best option to display the trend in between the years. Usually, line graphs are preferred to showcase the trend and to gain insights visually.

Reference

Visualization Engine v3.0. (2019). Retrieved 19 September 2019, from https://visualize.data.gov.in/?inst=863a23cd-d1c7-45bc-af49-9372b0055077&vid=18901#

Code

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

#importing the library
library(ggplot2)
library(tidyr)
library(tidyverse)
theme_set(theme_bw())

#reading the dataset.
forest_data <- read.csv("~/Downloads/Forest.csv")

#changing the column names

names(forest_data)[names(forest_data)=="State.of.Forest.Report.India.State.of.Forest.Report"] <- "Years"

names(forest_data)[names(forest_data)=="Forest.Cover"] <- "Forest_Cover"

#converting the "State.of.Forest.Report.India.State.of.Forest.Report" column to factor.

forest_data$Years <- factor(forest_data$Years, levels = forest_data$Years)

#function to convert exponential value to numeric value

fancy_scientific <- function(l) {
     # turn in to character string in scientific notation
     l <- format(l, scientific = TRUE)
     # quote the part before the exponent to keep all the digits
     l <- gsub("^(.*)e", "'\\1'e", l)
     # turn the 'e+' into plotmath format
     l <- gsub("e", "%*%10^", l)
     # return this as an expression
     parse(text=l)
}

#function to set the size of axis labels
My_Theme = theme(
  axis.title.x = element_text(size = 8),
  axis.text.x = element_text(size = 8),
  axis.title.y = element_text(size = 8),
  title = element_text(size = 8))

#1st Graph - Years vs Forest Cover in geographical Area

plot1 <- ggplot(data = forest_data, aes(group = 1, x = Years,y = Forest_Cover)) + geom_line(stat = "identity", colour = "tomato3") + geom_point(colour = "tomato3")  + labs(
    title = "Forest Cover of India from 1987 to 2015",
    y = "Area in square kilometer") + theme_minimal() + scale_y_continuous(limits = c(0,500000) + scale_y_continuous(labels=fancy_scientific)) 

graph1 <- plot1 + My_Theme

#2nd Graph - Years vs percentage of forest cover

#using the ggplot() to plot the line graph for 

plot2 <- ggplot(data = forest_data, aes(group = 1, x = Years,y = Percentage.of.forest.cover.to.the.total.geographical.area)) + geom_line(stat = "identity", colour = "turquoise3") + geom_point(colour = "turquoise3")  + labs(
    title = "Percentage Of Total Forest Cover Per Year",
    y = "Percentage(%) of Forest Cover") + theme_minimal() + scale_y_continuous(limits = c(17,22))

graph2 <- plot2 + My_Theme

Data Reference

Visualization Engine v3.0. (2019). Retrieved 19 September 2019, from https://visualize.data.gov.in/?inst=863a23cd-d1c7-45bc-af49-9372b0055077&vid=18901#

Reconstruction

The following plot fixes the main issues in the original.