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

Original


Source: CIA Factbook (2016)


Objective

The objective here is to visualize the literacy rate across the world. The author had depicted the visualization using a world map by plotting it in a heat map. This visualization was originally posted on our world in as one of a research topic.

The visualisation chosen had the following three main issues:

  • the main issue here is that the colours used to differentiate the literacy rates makes the visualization a bit uncertain.
  • Another issue is that it is quite to difficult to find out the countries which are smaller in terms of geography.There is a possiblity that the user might choose or click a wrong selection.
  • It is also challenging to discover nations with literacy rates less than 50% especially in the African regions. Also the color scheme makes it more difficult to differentiate between the two nations.

Reference

Literacy rate by country retreived on 23 Sep 2019 https://ourworldindata.org/grapher/literacy-rate-by-country

Code

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

library(readr)
literacy_rate_by_country <- read_csv("/Users/vicky/Downloads/literacy-rate-by-country.csv")
View(literacy_rate_by_country)
library(ggplot2)
library(scales)
library(dplyr)
l1 <- literacy_rate_by_country

l1<-filter(literacy_rate_by_country,`Literacy rate (%)`<=50)


p1 <- ggplot(data=l1, aes(x=reorder(Entity, -`Literacy rate (%)`), 
                          y=`Literacy rate (%)`))+ylim(0,65)+
  geom_bar(position="dodge",stat="identity", fill = "#FF6666", width=0.45)+ theme_minimal()+
  geom_text(aes(label=`Literacy rate (%)`),vjust=-0.5,size=3)+
  labs(
    title ="Literacy Rate by Country", x = "Countries",
    y = "Percentage of Literacy")  + theme(axis.text = element_text(angle=45,hjust = 1)) 
p1

Data Reference

https://ourworldindata.org/grapher/literacy-rate-by-country

Reconstruction

The following plot fixes the main issues in the original.

here we use the ggplot2 to visualize the literacy rates of countries which are below 50%. Since most of the countries are having literacy rates above 90%, these are the countries where the rates are lesser when compared to the other countries and we can infer that the below countries are developing.