library(tidyverse) main_csv <- "~/dsl/102725_DSL_df_adac.csv" main_df <- read.csv(main_csv , header = TRUE) main_df <- main_df |> mutate( pc_adac_delta = median_PC4_no_adac - median_PC4_adac, olmo_BI_adac_delta = olmo_BI_prop_no_adac - olmo_BI_prop_adac ) ggplot(main_df, aes( x = as.factor(phase), # x-axis grouping y = olmo_BI_adac_delta, fill = resolution_outcome )) + ylim(-3, 3) + geom_boxplot(alpha = 0.7, position = position_dodge(width = 0.9)) + facet_grid(. ~ source, scales = "fixed") + # Facet by source; adjust as needed scale_fill_viridis_d() + theme_minimal() + labs( title = "Boxplot of PC4", x = "Comment_type", y = "PC4", fill = "isAuthorWMF?" ) ggplot(main_df, aes(x = week_index, y = median_PC3_adac, fill = resolution_outcome)) + facet_grid(~source, scales="fixed") + geom_point(shape = 21, alpha=0.3, size=2) + scale_fill_viridis_d() + theme_minimal() + labs( title = "PCs for Task Comments (Faceted by source and phase)", x = "PC4", y = "PC3", ) lm(main_df$human_BE_prop ~ main_df$median_PC1)