Click the Original, Code and Reconstruction tabs to read about the issues and how they were fixed.
Objective This visualization was created and published to celebrate International Women’s Day and to emphasize the issue by visualizing the differences between the average duration men and women spend on unpaid work across the world. The main objective of this visualization is to convey the message to audience that women around the world do more unpaid work than men do.
Since this visualization was published on visme.co, the platform for data presentation and visualization tool, the audiences of this visualization are general public, especially visual learners, those who are interested in data driven content, and those who are interested in social issues.
The visualisation chosen had the following three main issues:
Reference
The following code was used to fix the issues identified in the original.
library(readr)
library(dplyr)
library(ggplot2)
library(tidyr)
library(forcats)
library(extrafont)
loadfonts(device="win")
setwd("~/Master of Analytics/Semester 2 Year 1/Data Visualization/Assignment 2")
unpaidwork <- read_csv("Unpaidwork.csv")
#use gather function to convert dataset into long form
unpaidwork_long <- gather(unpaidwork, key="Gender", value = "Time", 2:3)
#convert gender into factor
unpaidwork_long$Gender <- unpaidwork_long$Gender %>% factor(levels = c("Women", "Men"))
#convert country into factor
unpaidwork_long$Country <- as.factor(unpaidwork_long$Country)
#convert time spend to hours
unpaidwork_long$Time <- unpaidwork_long$Time/60
#order country as appeared in the dataset
unpaidwork_long <- unpaidwork_long %>% mutate(Country = fct_inorder(Country, ordered= NA))
p <- ggplot(data=unpaidwork_long, aes(x = Country, y = Time, fill = Gender))
#Labels
my_labels <- labs(title = "WOMEN DO MOST OF THE UNPAID WORK\nACROSS THE WORLD",
y = "Time spent on unpaid work per day (in hour)",
x = "Country",
caption = "Source: OECD.Stat\nNote: Unpaid work includes routine housework,shopping, care for household members,\nvolunteering, travel related to household activities")
#Theme
my_theme <- theme(text = element_text(family = "Comic Sans MS"),
axis.text.x=element_text(angle=45, hjust=1, size = 9,
margin = margin(t=5, r=0, b=8, l = 0)),
axis.title.y = element_text(size = 9,
margin = margin (t=5, r=10, b = 0, l = 5)),
axis.title.x = element_blank(),
legend.title = element_blank(),
legend.margin = margin(t = 0, r = 5, b = 5, l = 5),
legend.position = c(0.945,0.875),
legend.key = element_blank(),
legend.key.height = unit(0.5, "cm"),
legend.key.width = unit(0.8, "cm"),
legend.text = element_text(colour = '#0C1629'),
panel.border = element_rect(linetype = "dashed", fill = NA),
plot.background = element_rect(fill = '#f2f3f4'),
plot.title = element_text(family = "Arial Black", size = 14, face = "bold",
color = '#1c1c1c',
margin = margin (t=10, r = 0, b = 10, l = 0),
hjust = 0),
plot.caption = element_text(face = "plain", color = "black", size = 8, family = "Calibri",
margin = margin(t = 15, r= 0 , b=15, l = 15), hjust = 0))
plot <- p + geom_bar(stat = "identity", position = "dodge", width = 0.8, colour = "white") +
my_theme +
geom_text(aes(label = round(Time,1)), vjust = -0.5, size = 2.4,
nudge_x = ifelse(unpaidwork_long$Gender == "Men", 0.25, -0.1)) +
ylim(0,6.5)+
my_labels
Data Reference
The following plot fixes the main issues in the original.