new task plot
This commit is contained in:
parent
b624109f8d
commit
822103ec3a
BIN
p2/fossy-task-plot.png
Normal file
BIN
p2/fossy-task-plot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
@ -1,31 +1,12 @@
|
||||
library(tidyverse)
|
||||
|
||||
c1_count <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case1/phab_tasks.csv"
|
||||
c1_input_df <- read.csv(c1_count , header = TRUE)
|
||||
df_path <-"/mmfs1/home/mjilg/git/mw-lifecycle-analysis/p2/071425_master_discussion_data.csv"
|
||||
combined_df <- read.csv(df_path, header = TRUE) |>
|
||||
filter(comment_type == "task_description")
|
||||
|
||||
c2_count <- "/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case2/phab_tasks.csv"
|
||||
c2_input_df <- read.csv(c2_count , header = TRUE)
|
||||
|
||||
c3_count <-"/mmfs1/gscratch/comdata/users/mjilg/mw-repo-lifecycles/case3/phab_tasks.csv"
|
||||
c3_input_df <- read.csv(c3_count , header = TRUE)
|
||||
|
||||
c1_unique_counts <- c1_input_df %>%
|
||||
group_by(meta.affil, week_bin) %>%
|
||||
summarise(unique_count = n_distinct(conversation_id), .groups = "drop")
|
||||
|
||||
c2_unique_counts <- c2_input_df %>%
|
||||
group_by(meta.affil, week_bin) %>%
|
||||
summarise(unique_count = n_distinct(conversation_id), .groups = "drop")
|
||||
|
||||
c3_unique_counts <- c3_input_df %>%
|
||||
group_by(meta.affil, week_bin) %>%
|
||||
summarise(unique_count = n_distinct(conversation_id), .groups = "drop")
|
||||
|
||||
c1_unique_counts <- c1_unique_counts%>% mutate(source = "c1")
|
||||
c2_unique_counts <- c2_unique_counts %>% mutate(source = "c2")
|
||||
c3_unique_counts <- c3_unique_counts %>% mutate(source = "c3")
|
||||
|
||||
combined_df <- bind_rows(c1_unique_counts, c2_unique_counts, c3_unique_counts)
|
||||
combined_count_df <- combined_df |>
|
||||
group_by(AuthorWMFAffil, week_index, source) %>%
|
||||
summarise(unique_count = n_distinct(id), .groups = "drop")
|
||||
|
||||
library(scales)
|
||||
library(ggplot2)
|
||||
@ -35,10 +16,10 @@ affiliationColors <-
|
||||
setNames( c('#5da2d8', '#c7756a')
|
||||
,c("False", "True"))
|
||||
|
||||
commit_authors <- combined_df |>
|
||||
ggplot(aes(x=week_bin,
|
||||
new_tasks <- combined_count_df |>
|
||||
ggplot(aes(x=week_index,
|
||||
y=unique_count,
|
||||
fill=factor(meta.affil))) +
|
||||
fill=factor(AuthorWMFAffil))) +
|
||||
geom_col(position='dodge2') +
|
||||
labs(x = "Relative Week", y = "New Tasks Created", fill="Task Author") +
|
||||
geom_vline(data = combined_df |> filter(source == "c1"),
|
||||
@ -93,6 +74,6 @@ commit_authors <- combined_df |>
|
||||
"c2" = "HTTPS-as-default (2013)",
|
||||
"c3" = "HTTP-deprecation (2015)"
|
||||
)))
|
||||
commit_authors
|
||||
new_tasks
|
||||
|
||||
ggsave(filename = "070525-d1-m2-tasks-faceted.png", plot = commit_authors, width = 15, height = 9, dpi = 800)
|
||||
#ggsave(filename = "070525-d1-m2-tasks-faceted.png", plot = commit_authors, width = 15, height = 9, dpi = 800)
|
Loading…
Reference in New Issue
Block a user