diff --git a/0314-ve-core-testing-new-commits.png b/0314-ve-core-testing-new-commits.png new file mode 100644 index 0000000..e38043d Binary files /dev/null and b/0314-ve-core-testing-new-commits.png differ diff --git a/0314-ve-ve-testing-new-commits.png b/0314-ve-ve-testing-new-commits.png new file mode 100644 index 0000000..35332f3 Binary files /dev/null and b/0314-ve-ve-testing-new-commits.png differ diff --git a/commit_analysis/0312-core-ve-testing-new-commits.png b/commit_analysis/0312-core-ve-testing-new-commits.png deleted file mode 100644 index 227462f..0000000 Binary files a/commit_analysis/0312-core-ve-testing-new-commits.png and /dev/null differ diff --git a/commit_analysis/0312-ve-core-testing-share.png b/commit_analysis/0312-ve-core-testing-share.png deleted file mode 100644 index 27ce3c0..0000000 Binary files a/commit_analysis/0312-ve-core-testing-share.png and /dev/null differ diff --git a/commit_analysis/0312-ve-ve-testing-share.png b/commit_analysis/0312-ve-ve-testing-share.png deleted file mode 100644 index 865d3d8..0000000 Binary files a/commit_analysis/0312-ve-ve-testing-share.png and /dev/null differ diff --git a/commit_analysis/case1/0312_ve_core_event_ba_ranefs.csv b/commit_analysis/case1/0312_ve_core_event_ba_ranefs.csv deleted file mode 100644 index 1738192..0000000 --- a/commit_analysis/case1/0312_ve_core_event_ba_ranefs.csv +++ /dev/null @@ -1,9 +0,0 @@ -"","effect","group","level","term","estimate","std.error","conf.low","conf.high" -"1","ran_vals","commit_type","other_commit_count","(Intercept)",0.364855157809777,0.0448820171494965,0.276888020643255,0.4528222949763 -"2","ran_vals","commit_type","wikimedia_commit_count","(Intercept)",-0.364855157809562,0.0597894025576017,-0.482040233479628,-0.247670082139495 -"3","ran_vals","commit_type","other_commit_count","before_after",0.352924544901635,0.0434143938187066,0.267833896606332,0.438015193196938 -"4","ran_vals","commit_type","wikimedia_commit_count","before_after",-0.352924544901426,0.0578343138752091,-0.466277717167421,-0.239571372635431 -"5","ran_vals","commit_type","other_commit_count","relative_week",0.020534807942067,0.00252605338611267,0.0155838342822607,0.0254857816018733 -"6","ran_vals","commit_type","wikimedia_commit_count","relative_week",-0.0205348079420548,0.00336507207192973,-0.0271302280084187,-0.013939387875691 -"7","ran_vals","commit_type","other_commit_count","before_after:relative_week",-0.0610245395646896,0.00750682666355926,-0.0757376494634507,-0.0463114296659284 -"8","ran_vals","commit_type","wikimedia_commit_count","before_after:relative_week",0.0610245395646535,0.0100001896117208,0.0414245280871091,0.0806245510421979 diff --git a/commit_analysis/case1/0312_ve_core_testing_ba_ranefs.csv b/commit_analysis/case1/0312_ve_core_testing_ba_ranefs.csv deleted file mode 100644 index c2c7077..0000000 --- a/commit_analysis/case1/0312_ve_core_testing_ba_ranefs.csv +++ /dev/null @@ -1,9 +0,0 @@ -"","effect","group","level","term","estimate","std.error","conf.low","conf.high" -"1","ran_vals","commit_type","other_commit_count","(Intercept)",0,0,0,0 -"2","ran_vals","commit_type","wikimedia_commit_count","(Intercept)",0,0,0,0 -"3","ran_vals","commit_type","other_commit_count","before_after",0.210100230315908,0.0587264628069004,0.0949984782749522,0.325201982356864 -"4","ran_vals","commit_type","wikimedia_commit_count","before_after",-0.210100230315902,0.0620161983828405,-0.331649745604361,-0.0885507150274436 -"5","ran_vals","commit_type","other_commit_count","relative_week",0.000197187070261459,5.51170240557305e-05,8.91596881771995e-05,0.000305214452345719 -"6","ran_vals","commit_type","wikimedia_commit_count","relative_week",-0.000197187070261453,5.82045661455467e-05,-0.000311265923642504,-8.31082168804025e-05 -"7","ran_vals","commit_type","other_commit_count","before_after:relative_week",0.00296979606367595,0.000830106744433257,0.00134281674126297,0.00459677538608893 -"8","ran_vals","commit_type","wikimedia_commit_count","before_after:relative_week",-0.00296979606367587,0.00087660761567573,-0.00468791541897383,-0.00125167670837791 diff --git a/commit_analysis/case1/0312_ve_ve_event_ba_ranefs.csv b/commit_analysis/case1/0312_ve_ve_event_ba_ranefs.csv deleted file mode 100644 index f5ca0ae..0000000 --- a/commit_analysis/case1/0312_ve_ve_event_ba_ranefs.csv +++ /dev/null @@ -1,9 +0,0 @@ -"","effect","group","level","term","estimate","std.error","conf.low","conf.high" -"1","ran_vals","commit_type","other_commit_count","(Intercept)",0.19142744594005,0.141824355514081,-0.0865431829981536,0.469398074878253 -"2","ran_vals","commit_type","wikimedia_commit_count","(Intercept)",-0.191427445940039,0.144215326442934,-0.474084291786877,0.091229399906799 -"3","ran_vals","commit_type","other_commit_count","before_after",-0.0755920578722042,0.0560044816831836,-0.185358824944077,0.0341747091996687 -"4","ran_vals","commit_type","wikimedia_commit_count","before_after",0.0755920578721999,0.0569486431221849,-0.0360252316157072,0.187209347360107 -"5","ran_vals","commit_type","other_commit_count","relative_week",0.0275202739990639,0.0203891615662596,-0.0124417483457733,0.0674822963439011 -"6","ran_vals","commit_type","wikimedia_commit_count","relative_week",-0.0275202739990623,0.0207328958451281,-0.0681560031507335,0.0131154551526089 -"7","ran_vals","commit_type","other_commit_count","before_after:relative_week",-0.030560534526985,0.0226416232645461,-0.0749373006770195,0.0138162316230495 -"8","ran_vals","commit_type","wikimedia_commit_count","before_after:relative_week",0.0305605345269833,0.0230233310665026,-0.014564365167504,0.0756854342214706 diff --git a/commit_analysis/case1/0312_ve_ve_testing_ba_ranefs.csv b/commit_analysis/case1/0312_ve_ve_testing_ba_ranefs.csv deleted file mode 100644 index ee27e4f..0000000 --- a/commit_analysis/case1/0312_ve_ve_testing_ba_ranefs.csv +++ /dev/null @@ -1,9 +0,0 @@ -"","effect","group","level","term","estimate","std.error","conf.low","conf.high" -"1","ran_vals","commit_type","other_commit_count","(Intercept)",0.00187325921107161,0.00396272055679488,-0.00589353036104286,0.00964004878318609 -"2","ran_vals","commit_type","wikimedia_commit_count","(Intercept)",-0.00187325921107161,0.00396516815152807,-0.00964484598071188,0.00589832755856866 -"3","ran_vals","commit_type","other_commit_count","before_after",-0.00139801727712659,0.00295738666067831,-0.00719438862041525,0.00439835406616207 -"4","ran_vals","commit_type","wikimedia_commit_count","before_after",0.00139801727712659,0.00295921330575988,-0.00440193422473448,0.00719796877898766 -"5","ran_vals","commit_type","other_commit_count","relative_week",-8.07243856905614e-05,0.000170765986989873,-0.000415419569975148,0.000253970798594025 -"6","ran_vals","commit_type","wikimedia_commit_count","relative_week",8.07243856905613e-05,0.000170871460969434,-0.00025417752379527,0.000415626295176393 -"7","ran_vals","commit_type","other_commit_count","before_after:relative_week",0.00635509368794709,0.0134436571769782,-0.0199939901994337,0.0327041775753279 -"8","ran_vals","commit_type","wikimedia_commit_count","before_after:relative_week",-0.00635509368794708,0.0134519607247868,-0.0327204522299765,0.0200102648540824 diff --git a/commit_analysis/case1/0314_ve_core_event_ba_ranefs.csv b/commit_analysis/case1/0314_ve_core_event_ba_ranefs.csv new file mode 100644 index 0000000..fdbde5f --- /dev/null +++ b/commit_analysis/case1/0314_ve_core_event_ba_ranefs.csv @@ -0,0 +1,9 @@ +"","effect","group","level","term","estimate","std.error","conf.low","conf.high" +"1","ran_vals","commit_type","other_commit_count","(Intercept)",0.314596203409928,0.0371497302009551,0.241784070180676,0.38740833663918 +"2","ran_vals","commit_type","wikimedia_commit_count","(Intercept)",-0.314596203409886,0.0616199530813656,-0.435369092178411,-0.193823314641362 +"3","ran_vals","commit_type","other_commit_count","before_after",0.288063179135179,0.034016524269414,0.221392016687895,0.354734341582463 +"4","ran_vals","commit_type","wikimedia_commit_count","before_after",-0.28806317913514,0.0564229300672885,-0.398650089969248,-0.177476268301033 +"5","ran_vals","commit_type","other_commit_count","relative_week",0.0251304693578528,0.00296758241235654,0.0193141147084795,0.0309468240072261 +"6","ran_vals","commit_type","wikimedia_commit_count","relative_week",-0.0251304693578494,0.00492230461850199,-0.0347780091310485,-0.0154829295846504 +"7","ran_vals","commit_type","other_commit_count","before_after:relative_week",-0.00311874402222872,0.000368283244866931,-0.00384056591827745,-0.00239692212617999 +"8","ran_vals","commit_type","wikimedia_commit_count","before_after:relative_week",0.0031187440222283,0.000610868361544776,0.00192146403430555,0.00431602401015106 diff --git a/commit_analysis/case1/0312_ve_ve_event_commits_mlm.rds b/commit_analysis/case1/0314_ve_core_event_commits_mlm.rds similarity index 78% rename from commit_analysis/case1/0312_ve_ve_event_commits_mlm.rds rename to commit_analysis/case1/0314_ve_core_event_commits_mlm.rds index 9b4dbea..0d19a04 100644 Binary files a/commit_analysis/case1/0312_ve_ve_event_commits_mlm.rds and b/commit_analysis/case1/0314_ve_core_event_commits_mlm.rds differ diff --git a/commit_analysis/case1/0314_ve_core_testing_ba_ranefs.csv b/commit_analysis/case1/0314_ve_core_testing_ba_ranefs.csv new file mode 100644 index 0000000..3588bc3 --- /dev/null +++ b/commit_analysis/case1/0314_ve_core_testing_ba_ranefs.csv @@ -0,0 +1,9 @@ +"","effect","group","level","term","estimate","std.error","conf.low","conf.high" +"1","ran_vals","commit_type","other_commit_count","(Intercept)",0.0720020610818892,0.0243405041188196,0.0242955496434539,0.119708572520325 +"2","ran_vals","commit_type","wikimedia_commit_count","(Intercept)",-0.0720020610818955,0.0266280623428783,-0.124192104252024,-0.0198120179117667 +"3","ran_vals","commit_type","other_commit_count","before_after",0.0527000932779371,0.0178154183719228,0.0177825148994553,0.0876176716564189 +"4","ran_vals","commit_type","wikimedia_commit_count","before_after",-0.0527000932779416,0.019489738934506,-0.0908992796576615,-0.0145009068982218 +"5","ran_vals","commit_type","other_commit_count","relative_week",0.016636367754247,0.00562397204296351,0.00561358509997836,0.0276591504085156 +"6","ran_vals","commit_type","wikimedia_commit_count","relative_week",-0.0166363677542484,0.00615252163225638,-0.0286950885675745,-0.00457764694092234 +"7","ran_vals","commit_type","other_commit_count","before_after:relative_week",0.0340353312009155,0.0115057417222755,0.0114844918098356,0.0565861705919954 +"8","ran_vals","commit_type","wikimedia_commit_count","before_after:relative_week",-0.0340353312009184,0.0125870691275504,-0.0587055333618332,-0.00936512904000372 diff --git a/commit_analysis/case1/0312_ve_core_event_commits_mlm.rds b/commit_analysis/case1/0314_ve_core_testing_commits_mlm.rds similarity index 77% rename from commit_analysis/case1/0312_ve_core_event_commits_mlm.rds rename to commit_analysis/case1/0314_ve_core_testing_commits_mlm.rds index ff175af..26977bd 100644 Binary files a/commit_analysis/case1/0312_ve_core_event_commits_mlm.rds and b/commit_analysis/case1/0314_ve_core_testing_commits_mlm.rds differ diff --git a/commit_analysis/case1/0314_ve_ve_event_ba_ranefs.csv b/commit_analysis/case1/0314_ve_ve_event_ba_ranefs.csv new file mode 100644 index 0000000..56eb449 --- /dev/null +++ b/commit_analysis/case1/0314_ve_ve_event_ba_ranefs.csv @@ -0,0 +1,9 @@ +"","effect","group","level","term","estimate","std.error","conf.low","conf.high" +"1","ran_vals","commit_type","other_commit_count","(Intercept)",0.406936293894797,0.056676800683778,0.295851805795637,0.518020781993957 +"2","ran_vals","commit_type","wikimedia_commit_count","(Intercept)",-0.406936293894832,0.085077030178694,-0.573684208956699,-0.240188378832964 +"3","ran_vals","commit_type","other_commit_count","before_after",0.00348311531536142,0.000501125210636354,0.00250092795076911,0.00446530267995372 +"4","ran_vals","commit_type","wikimedia_commit_count","before_after",-0.00348311531536171,0.000738964571298917,-0.00493145926095867,-0.00203477136976476 +"5","ran_vals","commit_type","other_commit_count","relative_week",-0.0163312584538643,0.00227482472962926,-0.0207898329950787,-0.0118726839126499 +"6","ran_vals","commit_type","wikimedia_commit_count","relative_week",0.0163312584538657,0.00341450238007504,0.00963895676379232,0.0230235601439391 +"7","ran_vals","commit_type","other_commit_count","before_after:relative_week",-0.0815383698564193,0.0113564215132035,-0.103796547015554,-0.0592801926972846 +"8","ran_vals","commit_type","wikimedia_commit_count","before_after:relative_week",0.0815383698564263,0.017047008558442,0.0481268470377339,0.114949892675119 diff --git a/commit_analysis/case1/0312_ve_core_testing_commits_mlm.rds b/commit_analysis/case1/0314_ve_ve_event_commits_mlm.rds similarity index 76% rename from commit_analysis/case1/0312_ve_core_testing_commits_mlm.rds rename to commit_analysis/case1/0314_ve_ve_event_commits_mlm.rds index d2fe933..54a8221 100644 Binary files a/commit_analysis/case1/0312_ve_core_testing_commits_mlm.rds and b/commit_analysis/case1/0314_ve_ve_event_commits_mlm.rds differ diff --git a/commit_analysis/case1/0314_ve_ve_testing_ba_ranefs.csv b/commit_analysis/case1/0314_ve_ve_testing_ba_ranefs.csv new file mode 100644 index 0000000..ebc7e0e --- /dev/null +++ b/commit_analysis/case1/0314_ve_ve_testing_ba_ranefs.csv @@ -0,0 +1,9 @@ +"","effect","group","level","term","estimate","std.error","conf.low","conf.high" +"1","ran_vals","commit_type","other_commit_count","(Intercept)",0.0448635301708636,0.0600660780690559,-0.072863819537057,0.162590879878784 +"2","ran_vals","commit_type","wikimedia_commit_count","(Intercept)",-0.0448635301708634,0.0603190867086949,-0.163086767700254,0.0733597073585272 +"3","ran_vals","commit_type","other_commit_count","before_after",0.00105436348083387,0.00141164850560976,-0.00171241674899104,0.00382114371065878 +"4","ran_vals","commit_type","wikimedia_commit_count","before_after",-0.00105436348083386,0.00141759460109302,-0.00383279784365461,0.00172407088198689 +"5","ran_vals","commit_type","other_commit_count","relative_week",-0.00804793108391088,0.0107750695316085,-0.0291666792967783,0.0130708171289566 +"6","ran_vals","commit_type","wikimedia_commit_count","relative_week",0.00804793108391084,0.0108204559754881,-0.013159772924347,0.0292556350921687 +"7","ran_vals","commit_type","other_commit_count","before_after:relative_week",0.0379986937948052,0.0508750091414543,-0.0617144918355913,0.137711879425202 +"8","ran_vals","commit_type","wikimedia_commit_count","before_after:relative_week",-0.0379986937948049,0.0510893034199067,-0.138131888493061,0.0621345009034511 diff --git a/commit_analysis/case1/0312_ve_ve_testing_commits_mlm.rds b/commit_analysis/case1/0314_ve_ve_testing_commits_mlm.rds similarity index 77% rename from commit_analysis/case1/0312_ve_ve_testing_commits_mlm.rds rename to commit_analysis/case1/0314_ve_ve_testing_commits_mlm.rds index 01e4df8..3d0a513 100644 Binary files a/commit_analysis/case1/0312_ve_ve_testing_commits_mlm.rds and b/commit_analysis/case1/0314_ve_ve_testing_commits_mlm.rds differ diff --git a/commit_analysis/commit_plotting.R b/commit_analysis/commit_plotting.R index d6451eb..442a846 100644 --- a/commit_analysis/commit_plotting.R +++ b/commit_analysis/commit_plotting.R @@ -7,8 +7,8 @@ input_df$nonbot_commit_count <- input_df$commit_count - input_df$bot_commit_coun window_num <- 12 intermediate_df <- input_df |> mutate(nonbot_commit_count = commit_count - bot_commit_count)|> - mutate(other_commit_count = nonbot_commit_count - mediawiki_dev_commit_count - wikia_commit_count - wikimedia_commit_count) |> - mutate(wikimedia_commit_count = wikimedia_commit_count + mediawiki_dev_commit_count + wikia_commit_count) |> + mutate(other_commit_count = nonbot_commit_count - mediawiki_dev_commit_count - wikimedia_commit_count) |> + mutate(wikimedia_commit_count = wikimedia_commit_count + mediawiki_dev_commit_count) |> dplyr::select(-mediawiki_dev_commit_count) |> dplyr::select(-wikia_commit_count) |> filter(relative_week >= (- window_num) & relative_week <= (window_num)) diff --git a/commit_analysis/matched_rdd_models.R b/commit_analysis/matched_rdd_models.R index 03a4d22..26fe0fd 100644 --- a/commit_analysis/matched_rdd_models.R +++ b/commit_analysis/matched_rdd_models.R @@ -1,12 +1,12 @@ library(tidyverse) library(dplyr) -entest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/en-testing_0312_mediawiki_core_weekly_commit_count_data.csv" +entest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/en-testing_0312_extensions_ve_weekly_commit_count_data.csv" entest_df <- read.csv(entest_fp, header = TRUE) |> mutate(rd_event = "en-testing") -widetest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/wide-testing_0312_mediawiki_core_weekly_commit_count_data.csv" +widetest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/wide-testing_0312_extensions_ve_weekly_commit_count_data.csv" widetest_df <- read.csv(widetest_fp, header = TRUE) |> mutate(rd_event = "wide-testing") -event_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0312_mediawiki_core_weekly_commit_count_data.csv" +event_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0312_extensions_ve_weekly_commit_count_data.csv" event_df <- read.csv(event_fp, header = TRUE) |> mutate(rd_event = "default") #input_df <- bind_rows(entest_df, widetest_df, event_df) @@ -16,8 +16,8 @@ input_df <- bind_rows(entest_df, widetest_df) input_df <- input_df |> mutate(nonbot_commit_count = commit_count - bot_commit_count)|> - mutate(other_commit_count = nonbot_commit_count - mediawiki_dev_commit_count - wikia_commit_count - wikimedia_commit_count) |> - mutate(wikimedia_commit_count = wikimedia_commit_count + mediawiki_dev_commit_count + wikia_commit_count) |> + mutate(other_commit_count = nonbot_commit_count - mediawiki_dev_commit_count - wikimedia_commit_count) |> + mutate(wikimedia_commit_count = wikimedia_commit_count + mediawiki_dev_commit_count) |> dplyr::select(-mediawiki_dev_commit_count) |> dplyr::select(-wikia_commit_count) @@ -37,27 +37,36 @@ intermediate_long_df <- long_df |> mutate(log_commits = log1p(lengthened_commit_count))|> mutate(scaled_long_commits = lengthened_commit_count / 10) -library(rdd) +#library(rdd) +library(rdrobust) var(intermediate_long_df$lengthened_commit_count) mean(intermediate_long_df$lengthened_commit_count) median(intermediate_long_df$lengthened_commit_count) -get_optimal_bandwidth <- function(df){ - bw <- tryCatch({ - IKbandwidth(df$relative_week, df$lengthened_commit_count, cutpoint = 0, verbose = FALSE, kernel = "triangular") - }, error = function(e) { - NA - }) -} +#bw <- rdbwselect(intermediate_long_df$lengthened_commit_count, +# intermediate_long_df$relative_week, +# bwselect = "mserd") +#bw['bws'] + +#get_optimal_bandwidth <- function(df){ +# bw <- tryCatch({ +# IKbandwidth(df$relative_week, df$lengthened_commit_count, cutpoint = 0, verbose = TRUE, kernel = "triangular") +# }, error = function(e) { +# NA +# }) +#} intermediate_long_df <- intermediate_long_df |> filter(commit_type != "unaff_ft_commit_count") -optimal_bandwidth <- get_optimal_bandwidth(intermediate_long_df) +#optimal_bandwidth <- get_optimal_bandwidth(intermediate_long_df) +#IKbandwidth(intermediate_long_df$relative_week, +# intermediate_long_df$lengthened_commit_count, +# cutpoint = 0, verbose = TRUE, kernel = "triangular") library(dplyr) -window_num <- 12 +window_num <- 4 final_long_df <- intermediate_long_df |> filter(relative_week >= (-window_num) & relative_week <= window_num) |> filter(commit_type != "unaff_ft_commit_count") @@ -76,7 +85,7 @@ mlm <- glmer.nb(lengthened_commit_count ~ before_after*relative_week + data=final_long_df) #(before_after*relative_week|rd_event) -saveRDS(mlm, file = "0312_ve_core_event_commits_mlm.rds") +saveRDS(mlm, file = "0314_ve_ve_testing_commits_mlm.rds") #mlm <- readRDS("commit_analysis/case1/0312_core_ve_testing_commits_mlm.rds") summary(mlm) qqnorm(residuals(mlm)) @@ -88,7 +97,7 @@ library(broom.mixed) library(ggplot2) condvals <- broom.mixed::tidy(mlm, effects = "ran_vals", conf.int = TRUE) glmer_ranef_ba <- condvals -write.csv(glmer_ranef_ba, "0312_ve_core_event_ba_ranefs.csv") +write.csv(glmer_ranef_ba, "0314_ve_ve_testing_ba_ranefs.csv") diff --git a/commit_analysis/testing-share-plotting.R b/commit_analysis/testing-share-plotting.R index 4fda789..3a6b581 100644 --- a/commit_analysis/testing-share-plotting.R +++ b/commit_analysis/testing-share-plotting.R @@ -1,11 +1,11 @@ library(tidyverse) -entest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/en-testing_0312_extensions_ve_weekly_commit_count_data.csv" +entest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/en-testing_0312_mediawiki_core_weekly_commit_count_data.csv" entest_df <- read.csv(entest_fp, header = TRUE) |> mutate(rd_event = "en-testing") -widetest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/wide-testing_0312_extensions_ve_weekly_commit_count_data.csv" +widetest_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/wide-testing_0312_mediawiki_core_weekly_commit_count_data.csv" widetest_df <- read.csv(widetest_fp, header = TRUE) |> mutate(rd_event = "wide-testing") -event_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0312_extensions_ve_weekly_commit_count_data.csv" +event_fp <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/event_0312_mediawiki_core_weekly_commit_count_data.csv" event_df <- read.csv(event_fp, header = TRUE) |> mutate(rd_event = "default") #input_df <- bind_rows(entest_df, widetest_df, event_df) @@ -15,8 +15,8 @@ input_df <- bind_rows(entest_df, widetest_df) input_df <- input_df |> mutate(nonbot_commit_count = commit_count - bot_commit_count)|> - mutate(other_commit_count = nonbot_commit_count - mediawiki_dev_commit_count - wikia_commit_count - wikimedia_commit_count) |> - mutate(wikimedia_commit_count = wikimedia_commit_count + mediawiki_dev_commit_count + wikia_commit_count) |> + mutate(other_commit_count = nonbot_commit_count - mediawiki_dev_commit_count - wikimedia_commit_count) |> + mutate(wikimedia_commit_count = wikimedia_commit_count + mediawiki_dev_commit_count) |> dplyr::select(-mediawiki_dev_commit_count) |> dplyr::select(-wikia_commit_count) @@ -36,7 +36,7 @@ intermediate_long_df <- long_df |> mutate(scaled_long_commits = lengthened_commit_count / 10) -window_num <- 8 +window_num <- 4 final_long_df <- intermediate_long_df |> filter(relative_week >= (- window_num) & relative_week <= (window_num)) @@ -52,17 +52,17 @@ commit_plot <- final_long_df |> linetype = rd_event)) + geom_line() + geom_point() + - labs(x = "Relative Week", y = "Nonbot Commits", linetype = "Testing Event", color="Commit Author Affiliation") + + labs(x = "Relative Week", y = "Commits", linetype = "Testing Event", color="Commit Author Affiliation") + scale_color_manual(values = affiliationColors, labels = c("other_commit_count" = "Unaffiliated", "wikimedia_commit_count" = "WMF Affiliated")) + - scale_linetype_discrete(labels = c("enwiki testing (2012-12-12)", "wide testing (2013-04-25)")) + - ggtitle("mw-core New Contributors Commits Around Opt-In Testing Events (by Affiliation)") + + scale_linetype_discrete(labels = c("enwiki testing (2012-12-11)", "wide testing (2013-04-25)")) + + ggtitle("mw-core Commits Around Opt-In Testing Events (by Affiliation)") + theme_bw() + theme(legend.position = "top") commit_plot -ggsave(filename = "0312-core-ve-testing-new-commits.png", plot = commit_plot, width = 15, height = 9, dpi = 800) +ggsave(filename = "0314-ve-core-testing-new-commits.png", plot = commit_plot, width = 15, height = 9, dpi = 800) total_commit_plot <- final_long_df |> ggplot(aes(x=relative_week,