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

Original


Source: HowMuch. 2022. See How Your Take Home Pay Compares to Workers Around the World. [online] Available at: https://howmuch.net/articles/money-people-take-home-after-taxes


Objective

The objective of this vizualisation is to compare the money that people can take back after they have paid towards taxes and social security.It seeks to compare the Organization for Economic Co-operation and Development (OECD) the net wages that the citizens are charged among the 35 member nations to incite a retrospection among the payee as to how much their respective government charges them in form of taxes and social security contributions.

The visualisation chosen had the following three main issues:

  • Gross Wage Earnings cannot be clearly identified as the Income Tax paid and the Employee’s contribution towards Social Security is given in percentage terms, this leads to a deceptive outcome as the absolute values that help us reach the percentages cannot be determined.

  • Fails to provide at a glance comparison among different member nations.It becomes difficult to determine which nation is paying more towards tax and which nations are paying more towards social security, and this may lead to an inaccurate conclusions being drawn by the users of the visualisation.

  • The graph is a circular bar plot which fails to provide an accurate reading between the nations, and has to rely on texts rather the visualisation itself to explain its purpose.

Reference

Code

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

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

D <-read_excel("Book1.xlsx", sheet = 2)
D
## # A tibble: 36 × 5
##    Country     `Income tax` `Employee social…` `Wages earning…` `Gross wage ea…`
##    <chr>              <dbl>              <dbl>            <dbl>            <dbl>
##  1 Switzerland        7579.              4392.            58864            70835
##  2 Luxembourg        10975.              8083.            46593            65716
##  3 Iceland           18016.               191.            45390            63661
##  4 Germany           12138.             13219.            38194            63551
##  5 Netherlands       10896.              8251.            43835            62981
##  6 Belgium           15514.              8196.            34834            58545
##  7 Austria            8292.             10365.            38925            57581
##  8 Norway            10942.              4625.            40834            56401
##  9 Denmark           20292.                 0             36087            56211
## 10 Australia         13444.                 0             41655            55099
## # … with 26 more rows
D1 <- D %>% pivot_longer(names_to = "Gross_Income_Break_Up", values_to = "Value", 2:5)
D1
## # A tibble: 144 × 3
##    Country     Gross_Income_Break_Up                   Value
##    <chr>       <chr>                                   <dbl>
##  1 Switzerland Income tax                              7579.
##  2 Switzerland Employee social security contributions  4392.
##  3 Switzerland Wages earning After Taxes              58864 
##  4 Switzerland Gross wage earnings                    70835 
##  5 Luxembourg  Income tax                             10975.
##  6 Luxembourg  Employee social security contributions  8083.
##  7 Luxembourg  Wages earning After Taxes              46593 
##  8 Luxembourg  Gross wage earnings                    65716 
##  9 Iceland     Income tax                             18016.
## 10 Iceland     Employee social security contributions   191.
## # … with 134 more rows
zz <- ggplot(data = D1, aes(x= Country, y = Value,fill =  Gross_Income_Break_Up))
zz <-             zz + geom_col() + coord_flip() +
               labs(x = "Country", y = "US ($) With Equal Purchasing Power")+
               theme(axis.title.x = element_text(margin = margin(t = 10), size = 15),
                     axis.title.y = element_text(margin = margin(r = 10), size = 15))+
               theme(axis.title = element_text( face = "bold.italic"),
                     axis.title.y = element_text(face = "bold.italic"))+
               ggtitle("How Much Money People Take Home After Paying Taxes")+
               theme(plot.title = element_text(face = "bold",
                                               margin = margin(10, 0, 10, 0),
                                               size = 14))+
  theme(legend.position = "bottom")+
   guides(fill=guide_legend(nrow=2, byrow=TRUE))+
  
              
               geom_bar_text(position = "stack", 
                             outside = T,
                             min.size=7,
                             reflow = TRUE)+
               scale_y_continuous(limits = c(0, 75000))

Data Reference

Reconstruction

The following plot fixes the main issues in the original.