Original

image Objective

The visualisation chosen had the following three main issues:

Reference

Code

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

library(ggplot2)
library(readxl)
library(tidyr)
library(dplyr)

top10<-read_excel("C:/Users/Pooja/Downloads/assignment2template1950/datafile.xlsx")

 
 top10<-top10[order(top10$`2017-18`, decreasing = TRUE),] 
 top10<-top_n(top10, 10)
 top10<-top10[order(top10$`State`),] 

 top10<-subset(top10, select = -c(1) )
 top <- gather(top10, Year, value, -State)
 colors<-c("#CCDE57","#B3C732","#94A813","#718200")
 
p1<-ggplot(top, aes(x = State,y = value))+geom_bar(aes(fill= Year),stat = "identity",position = "dodge")+scale_fill_manual(values=colors)+
  labs(
    title = "Top 10 Indian states WRT Children rescued from work under NLCP during 2017-18",
    y = "In number")

Data Reference

Reconstruction

The following plot fixes the main issues in the original.