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

Original


Source: What Makes Life Meaningful Plotset (2023).


Objective

The data visualisation aims to explore and explain the factors what people from different countries and cultures believes to be most important for making their lives meaningful. The factors that are icluded in this visualisation are family and children, friends, spouses and romantic partner, carreer, and also faith.

This academic visualization presents a unique opportunity for learners from various demographics like students, researchers or policymaker to gain essential insights into cultures’ value systems worldwide. With a focus on discovering what influences people’s happiness levels positively or negatively, it sheds light on different societies providing comparative analysis for better understanding.

The visualisation chosen had the following three main issues:

  • First issue, the sum of percentage does not add up to 100% for every country or even category, so it doesn’t have any context. This can confuse people who wants to read the data visualisation without having the raw data.
  • Second issue is that the scaling is unbalanced. it has different proportions for every variables in the chart. for example in the United States,the bar percentage of Spouses and Romantic Partners shows a 9% but it is bigger/longer than the bar percentage of Family and children which has a percentage of 49%.
  • For the last issue, based on the Colblinder Website (https://www.color-blindness.com/coblis-color-blindness-simulator/), it shows that the data visualisation is unfriendly to people who has Blue-Blind/Tritanopia, because it uses the color orange and pink which to people who has Tritanopia sees the same shade of baby pink.

Reference

Code

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

# import libraries
library(ggplot2)
library(readr)
library(tidyr)
library(scales)
library(stringr)

# Reading the data
data <- read_csv("Where do people find meaning in life.csv")

# Select only the columns that have a name
data <- subset(data, select = c(1:5, 7:8))
head(data)
## # A tibble: 6 × 7
##   Country      flag  `Family and Children` Friends Spouses and Romantic…¹ Career
##   <chr>        <chr>                 <dbl>   <dbl>                  <dbl>  <dbl>
## 1 United Stat… http…                    49      20                      9     17
## 2 Canada       http…                    42      19                      6     26
## 3 Belgium      http…                    37      18                      4     22
## 4 France       http…                    32      12                      3     25
## 5 Germany      http…                    32      13                      5     22
## 6 Greece       http…                    54      16                      3     25
## # ℹ abbreviated name: ¹​`Spouses and Romantic Partners`
## # ℹ 1 more variable: Faith <dbl>
# changing the data to a long format
data_long <- pivot_longer(data, cols = -c(Country, flag), names_to = "variable", values_to = "value")
head(data_long)
## # A tibble: 6 × 4
##   Country       flag                                           variable    value
##   <chr>         <chr>                                          <chr>       <dbl>
## 1 United States https://plotset.com/charts/images/flags/us.svg Family and…    49
## 2 United States https://plotset.com/charts/images/flags/us.svg Friends        20
## 3 United States https://plotset.com/charts/images/flags/us.svg Spouses an…     9
## 4 United States https://plotset.com/charts/images/flags/us.svg Career         17
## 5 United States https://plotset.com/charts/images/flags/us.svg Faith          15
## 6 Canada        https://plotset.com/charts/images/flags/ca.svg Family and…    42
#Making the plot
plot <- ggplot(data_long, aes(x = Country, y = value, fill = variable)) +
        geom_bar(position = "fill", stat = "identity") +
        scale_fill_manual(values = c("Family and Children" = "#332288", "Friends" = "#117733", 
                                     "Spouses and Romantic Partners" = "#88ccee", 
                                     "Career" = "#cc6677", "Faith" = "882255")) +
        ggtitle("What Makes Life Meaningful?") +
        xlab("Country") +
        ylab("Percentage") +
        theme_bw() +
        scale_y_continuous(labels = percent_format(accuracy = 10), breaks = seq(0, 1, 0.1)) + # Making the percentages on y axis
        theme(axis.text.x = element_text(angle = 45, hjust = 1))

Data Reference

Reconstruction

The following plot fixes the main issues in the original.