HISEI Density Distribution in Different German School Types

Autor*innen: Tobias Deribo

Innerhalb der Abbildung ist eine Dichteverteilung des Highest International Socio-Economic Index of Occupational Status (HISEI), als Maß für soziale Herkunft, in unterschiedlichen Schulformen abgetragen.

Die Abbildung soll darauf aufmerksam machen, dass auch heute noch (lange nach den ersten Befunden) der Bildungserfolg in Deutschland stärker als in vielen anderen Ländern von der sozialen Herkunft abhängig ist.

Für die Erstellung der Grafik wurde die Statistiksoftware R und die Pakete ggplot2, ggthemes und ggridge verwendet.

# Load packages
library(ggplot2)
library(ggthemes)
library(ggridges)

# Read Data
load(„data/PISA-Plus-2012-2013_Dataset_CF.rda“)
df <- pisa_2012_2013_data

# Recode names of levels for grapic
levels(df$schtype) <- c(„Gymnasium (academic track)“, „Realschule“, „Schools with several courses of education“)

# Plot Graphic
g <- ggplot(df, aes(x = hisei, y = schtype, fill = factor(stat(quantile)))) +
     stat_density_ridges(scale = 3, geom = „density_ridges_gradient“, calc_ecdf = TRUE, quantiles = 4,            quantile_lines = TRUE,color = „white“) +
     scale_x_continuous(expand = c(0, 0)) +
     scale_y_discrete(expand = expansion(mult = c(0.01, 0.25))) +
     scale_fill_tableau(name = „Quartiles“) +
     labs(x = ‚HISEI‘,
         y = element_blank(),
         subtitle = ‚“For to every one who has will more be given, and he will have abundance;\n but from him                           who has not, even what he has will be taken away.“ – Matthew 25:29, RSV.‘,
          title = ‚HISEI density distribution in different German school types‘) +
     theme_ridges(font_size = 30, grid = TRUE, font_family = „serif“) +
     theme(axis.title.y = element_blank())

print(g)
ggsave(„hisei_ridge_plot.png“, g, width=20, height=12.5, dpi = 300, units = „in“, device=’png‘)