diff --git a/commit_analysis/case1/021525_core-ve_event_mlm.rda b/commit_analysis/case1/021525_core-ve_event_mlm.rda new file mode 100644 index 0000000..d0be7c6 Binary files /dev/null and b/commit_analysis/case1/021525_core-ve_event_mlm.rda differ diff --git a/commit_analysis/case1/0215_commit_shares_GAM.png b/commit_analysis/case1/0215_commit_shares_GAM.png deleted file mode 100644 index 490e373..0000000 Binary files a/commit_analysis/case1/0215_commit_shares_GAM.png and /dev/null differ diff --git a/commit_analysis/case1/0215_jenkins_commits_GAM.png b/commit_analysis/case1/0215_jenkins_commits_GAM.png deleted file mode 100644 index c0817f7..0000000 Binary files a/commit_analysis/case1/0215_jenkins_commits_GAM.png and /dev/null differ diff --git a/commit_analysis/case1/0215_nonbot_commits_GAM.png b/commit_analysis/case1/0215_nonbot_commits_GAM.png deleted file mode 100644 index 2ba31ce..0000000 Binary files a/commit_analysis/case1/0215_nonbot_commits_GAM.png and /dev/null differ diff --git a/commit_analysis/case1/0215_wmf_commits_GAM.png b/commit_analysis/case1/0215_wmf_commits_GAM.png deleted file mode 100644 index c6ebc1e..0000000 Binary files a/commit_analysis/case1/0215_wmf_commits_GAM.png and /dev/null differ diff --git a/commit_analysis/commit_count_collation.R b/commit_analysis/commit_count_collation.R index f1695a5..b3f049c 100644 --- a/commit_analysis/commit_count_collation.R +++ b/commit_analysis/commit_count_collation.R @@ -3,7 +3,7 @@ library(dplyr) library(lubridate) library(tidyr) -ve_commit_fp <- "/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/visualeditor_commits.csv" +ve_commit_fp <- "/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/mediawiki_core_commits.csv" transform_commit_data <- function(filepath){ #basic, loading in the file @@ -131,8 +131,7 @@ transform_commit_data <- function(filepath){ test <- read.csv(ve_commit_fp, header = TRUE) transformed <- transform_commit_data(ve_commit_fp) -output_filepath <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/announcement_0215_ve_weekly_commit_count_data.csv" -project_id <- "test" +output_filepath <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/announcement_0215_core_weekly_commit_count_data.csv" write.csv(transformed, output_filepath, row.names = FALSE) diff --git a/commit_analysis/commit_plotting.R b/commit_analysis/commit_plotting.R index 6561218..2fac642 100644 --- a/commit_analysis/commit_plotting.R +++ b/commit_analysis/commit_plotting.R @@ -4,18 +4,24 @@ input_df <- read.csv(count_data_fp, header = TRUE) input_df$nonbot_commit_count <- input_df$commit_count - input_df$bot_commit_count +window_num <- 19 +input_df <- input_df |> + filter(relative_week >= (- window_num) & relative_week <= (window_num)) + library(scales) library(ggplot2) time_plot <- input_df |> - ggplot(aes(x=relative_week, y=jenkins_commit_count)) + - labs(x="Weekly Offset", y="Gerrit/Jenkins Commit Count") + + ggplot(aes(x=relative_week, y=wikimedia_commit_count)) + + labs(x="Weekly Offset", y="Wikimedia Commit Count") + geom_smooth() + geom_vline(xintercept = 0)+ theme_bw() + theme(legend.position = "top") time_plot +library(dplyr) + share_df <- input_df |> mutate(wikimedia_share = wikimedia_commit_count / nonbot_commit_count) |> mutate(wikia_share = wikia_commit_count / nonbot_commit_count) |> @@ -25,7 +31,7 @@ share_df <- input_df |> drop_na() share_long <- share_df |> - select(relative_week, wikimedia_share, wikia_share, gerrit_share, mw_dev_share, other_share) |> + dplyr::select(relative_week, wikimedia_share, wikia_share, gerrit_share, mw_dev_share, other_share) |> pivot_longer(cols = c(wikimedia_share, wikia_share, gerrit_share, mw_dev_share, other_share), names_to = "category", values_to = "share") share_plot <- share_long |> @@ -33,7 +39,7 @@ share_plot <- share_long |> geom_smooth() + geom_vline(xintercept = 0)+ labs(x = "Relative Week", y = "Share of Nonbot Commit Count", color = "Affiliation") + - ggtitle("Weekly Share of Nonbot Commit Count by Category") + + ggtitle("Weekly Share of Nonbot Commit Count by Affiliation") + theme_bw() + theme(legend.position = "top") share_plot diff --git a/commit_analysis/models.R b/commit_analysis/models.R index e7afab3..932abcb 100644 --- a/commit_analysis/models.R +++ b/commit_analysis/models.R @@ -1,5 +1,5 @@ library(tidyverse) -count_data_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0215_ve_weekly_commit_count_data.csv" +count_data_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0215_core_weekly_commit_count_data.csv" input_df <- read.csv(count_data_fp, header = TRUE) library(rdd) @@ -18,23 +18,29 @@ get_optimal_bandwidth <- function(df){ optimal_bandwidth <- get_optimal_bandwidth(input_df) -window_num <- 19 +window_num <- 13 input_df <- input_df |> filter(relative_week >= (- window_num) & relative_week <= (window_num)) |> mutate(other_commit_count = commit_count - bot_commit_count - mediawiki_dev_commit_count - wikia_commit_count - wikimedia_commit_count - jenkins_commit_count) +library(MASS) simple_model <- glm.nb(commit_count~before_after*relative_week, data=input_df) summary(simple_model) library(lme4) library(dplyr) + #get into mlm format long_df <- input_df |> pivot_longer(cols = c(other_commit_count, wikimedia_commit_count, jenkins_commit_count, wikia_commit_count, mediawiki_dev_commit_count), names_to = "commit_type", values_to = "lengthened_commit_count") +long_df <- long_df |> + mutate(commit_share = lengthened_commit_count / (commit_count - bot_commit_count)) |> + mutate(log_commits = log1p(lengthened_commit_count)) + mlm <- glmer.nb(lengthened_commit_count ~ before_after*relative_week + (before_after*relative_week|commit_type), control=glmerControl(optimizer="bobyqa", optCtrl=list(maxfun=2e5)), nAGQ=0, @@ -42,4 +48,4 @@ mlm <- glmer.nb(lengthened_commit_count ~ before_after*relative_week + (before_a summary(mlm) ranefs <- ranef(mlm) print(ranefs) -saveRDS(mlm, "021525_ve_event_mlm.rda") +saveRDS(mlm, "021525_core-ve_event_mlm.rda") diff --git a/mgaughan-rstudio-server_24263466.out b/mgaughan-rstudio-server_24263466.out new file mode 100644 index 0000000..d0cf93f --- /dev/null +++ b/mgaughan-rstudio-server_24263466.out @@ -0,0 +1,18 @@ +1. SSH tunnel from your workstation using the following command: + + ssh -N -L 8787:n3439:56403 mjilg@klone.hyak.uw.edu + + and point your web browser to http://localhost:8787 + +2. log in to RStudio Server using the following credentials: + + user: mjilg + password: 8aREIl1dg0jceqBTNl9a + +When done using RStudio Server, terminate the job by: + +1. Exit the RStudio Session ("power" button in the top right corner of the RStudio window) +2. Issue the following command on the login node: + + scancel -f 24263466 +slurmstepd: error: *** JOB 24263466 ON n3439 CANCELLED AT 2025-02-15T16:52:54 ***