Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective
The visualisation is a pie-chart that illustrates the per captia GDP for countries of the world. This pie chart is plottted with respect to the population ranking of each country in the decreasing order and this is obtained from Seattle Pacific University’s website under Dr. Douglas Downing’s page.
The main objective of this visualisation is to anlayse the per captia GDP distribution over various countries during the year 2017 and thereby, understanding the economic performance of each country with respect their population. This helps to explain average economic and living standards among the population by considering each individual countaries.
The target audience for this visualisation is meant to be for all individuals who are interested in economic performance of various countries especially for economist who could make some decisions or observations from the visualisation. Since this visualises the economy of a country, the general public will be also interested and so the visualisation must be simple and sufficient for conveying the plotted data to its viewer/user.
The pie chart had several issues and following are the three main issues:
All these issues makes it diffcult to understand the data showcased in the given visualisation and therefore the intention of the visualisation for reaching it to its target audience is not met. so, this visualisation is reconstructed to make sense of the data taken into consideration.
Reference
The following code was used to fix the issues identified in the original.
library(ggplot2)
library(readr)
#Reteriving the datasets
df<-read_csv("data.csv", col_names = TRUE)
pop<-read_csv("population.csv", col_names = TRUE)
#Ordering the dataset according to population ranking
len <- dim(pop)[1]
pop. <- cbind(pop[,1], rank = 1:len)
df. <- merge(df, pop.,by = "Country")
df. <- df.[order(df.[,'rank']),]
df.$GDP <- round((df.$GDP/1000), digits = 0)
#Mean value for all other countries from 51 are taken
GDPothers <- sum(df.$GDP[51:dim(df.)[1]])/(dim(df.)[1]-50)
#creating dataframe for first 50 countries and the rest of all other countries
df_plot <- data.frame(df.$Country[0:50], df.$GDP[0:50])
names(df_plot)[1] <- "Country"
names(df_plot)[2] <- "GDP"
df_plot[nrow(df_plot) + 1, ] <- list("Others" ,round(GDPothers,digits = 0))
#Barplot is plotted for the dataset for better visualisation
p <- ggplot(data=df_plot, aes(x=df_plot$GDP, y=df_plot$Country), width = 0.5) +
geom_bar(stat="identity", fill="steelblue")+
geom_text(aes(label=df_plot$GDP), hjust=1.6, color="white", size=3.5)+
ggtitle("Per capita GDP by Country for 2017 ordered by Population")+
labs( y = "Countries", x = "GDP per capita (rounded to nearest 1000)")+
scale_y_discrete(limits = rev(df_plot$Country))+
theme_minimal()
Data Reference
The following plot fixes the main issues in the original.
The reconstructed visualisation is a simple bar chart which addresses the major issues identified in original visualisation. The bar chart is plotted with respect the population ordering of countries (highest population being ploted in the top). Rather than plotting the entire dataset, the top 50 countries in the population ordering are chosen and all the remaining countries’ GDPs are averaged. The rounded GDP per capita values are labelled for each bar with respect to each country for better understanding and comprehension of the plotted data.