Skip to content

Instantly share code, notes, and snippets.

@mschnetzer
Created January 17, 2024 16:55
Show Gist options
  • Save mschnetzer/daece241dd1c4cdf27b497f3688bb8f0 to your computer and use it in GitHub Desktop.
Save mschnetzer/daece241dd1c4cdf27b497f3688bb8f0 to your computer and use it in GitHub Desktop.
Geschlechtsspezifische Aufteilung von Sorgearbeit (https://x.com/matschnetzer/status/1747624651902099745?s=20)
library(tidyverse)
library(readODS)
# Daten unter https://www.statistik.at/fileadmin/pages/298/Durchschnittliche_Zeitverwendung_2021-22.ods
longdata <-
read_ods("Durchschnittliche_Zeitverwendung_2021-22.ods",
sheet = "Tabelle_17", range = "A5:J129", col_names = F,
col_types = "ctcttcttct") |>
janitor::clean_names() |>
mutate(across(c(x3, x6, x9), ~as.numeric(str_replace_all(., ",", ".")))) |>
select(activity = x1, female_part = x3, female_time = x4, male_part = x6, male_time = x7)
caredata <- longdata |>
filter(activity %in% c("Nahrungsmittelzubereitung", "Wäsche waschen", "Versorgung und Beaufsichtungung des Kindes", "Wege für Kinderbetreuung", "Einkaufen (inkl. Online-Shopping)", "Aufräumen und Reinigung von Wohnung oder Haus")) |>
mutate(activity = case_when(
activity == "Einkaufen (inkl. Online-Shopping)" ~ "Einkaufen",
activity == "Aufräumen und Reinigung von Wohnung oder Haus" ~ "Aufräumen und Putzen",
TRUE ~ activity
)) |>
pivot_longer(-activity, names_to = c("gender", ".value"),
names_pattern = "(.+)_(.+)") |>
mutate(time = as.period(time))
caredata |>
ggplot(aes(x = part, y = time, color = gender, group = activity)) +
geom_line(color = "gray95", linewidth = 5) +
geom_point(size = 5) +
geomtextpath::geom_textline(aes(label = activity,
vjust = ifelse(str_detect(activity, "Einkauf|Weg"), 1.8, 0.5)), linewidth = 0,
color = "black", size = 3, family = "Roboto Condensed") +
scale_y_time(labels = scales::label_timespan(unit = "hours"),
breaks = scales::date_breaks("0.5 hours"),
limits = c(as.period("0.5 hours"), as.period("2 hours")),
expand = c(0, 0.1)) +
scale_x_continuous(labels = scales::percent_format(scale = 1),
limits = c(-5, NA)) +
scale_color_manual(values = c(female = "#802417", male = "#508ea2"),
labels = c(female = "Frauen", male = "Männer")) +
scale_size_continuous(range = c(3, 13)) +
guides(size = guide_none(),
color = guide_legend(
label.theme = element_text(size = 12, family = "Roboto Condensed"),
override.aes = list(size = 5))) +
labs(x = "Mehr Ausübende ⟶ ", y = "Mehr Zeitaufwand ⟶ ", color = NULL,
title = "Unbezahlte Arbeit ist meist weiblich",
subtitle = "Anteil der Ausübenden und täglicher Zeitaufwand für ausgewählte Tätigkeiten von Sorgearbeit",
caption = "Quelle: Zeitverwendungserhebung 2021/22, Statistik Austria. Grafik: @matschnetzer") +
coord_flip(clip = "off") +
theme_minimal(base_family = "Roboto Condensed", base_size = 14) +
theme(plot.title.position = "plot",
plot.title = element_text(size = 20, hjust = 0.5),
plot.subtitle = element_text(size = 12, hjust = 0.5,
margin = margin(b = 2, unit = "lines")),
plot.caption = element_text(size = 8, margin = margin(t = 2, unit = "lines")),
axis.title = element_text(hjust = 0, size = 11, color = "gray20"),
legend.position = c(0.8, 0.7),
panel.grid.minor = element_blank(),
panel.grid.major = element_line(linewidth = 0.2, color = "gray90"))
ggsave("timeuse_care.png", width = 8, height = 4.5, dpi = 320, bg = "white")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment