library(tidyverse)
library(ggtext)
library(ggthemes)
library(ggpubr)
Source: UN Stats-https://unstats.un.org/unsd/gender/timeuse/index.html
df <- read.csv("https://query.data.world/s/tsrp74qzuipbt3fmihwm5332n5zqjl",
header=TRUE,
stringsAsFactors=FALSE)
dot_plot <-
df %>%
filter(Time.use == "Unpaid domestic, care and volunteer work") %>%
group_by(Country,Time.use,Gender) %>%
summarise(Hours = mean(Average.Time..hours.,na.rm = TRUE)) %>%
pivot_wider(names_from = Gender,values_from = Hours) %>%
mutate(Diff = Women-Men) %>%
ggplot() +
geom_point(aes(x=reorder(Country,Diff),y=Men),color="black",fill="#2c7bb6",size=7,shape=21) +
geom_point(aes(x=reorder(Country,Diff),y=Women),color="black",fill="orange",size=7,shape=21) +
geom_line(aes(x=Country,y=1.905,group=1),color="lightblue",linetype = "dashed",size=5) +
geom_line(aes(x=Country,y=4.475,group=1),color="#fdbb84",linetype = "dashed",size=5) +
coord_flip()+
theme_calc(base_size = 22) +
labs(title = "<strong><span style='color:#2c7bb6'>Men</strong></b> and <strong><span style='color:orange'>Women</span></strong></b>: Average amount of Hours spent unpaid domestic, care and volunteer work",
subtitle = "Ordered from the country with the highest difference between genders to the lowest; Dashed lines are averages") +
theme(legend.position = "none",
plot.title = element_markdown()) +
xlab("")
dot_plot