Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions 04-issues-analyze.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ issues_vs_first_member_comment |>
identity()

# Slow issues
bizdays::load_rmetrics_calendars(year = 2013:2024)

try <- issues_vs_first_member_comment |>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this to plot the difference, maybe I should remove this.

mutate(time = bizdays::bizdays(from = issue_created_at, to = created_at, cal = "Rmetrics/ZURICH"))

issues_vs_first_member_comment |>
mutate(time = as.numeric(created_at - issue_created_at) / 86400) |>
mutate(time = bizdays::bizdays(from = issue_created_at, to = created_at, cal = "Rmetrics/ZURICH")) |>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how lucky are we that "zurich" is a built-in calendar. 😸

of course you might have responded to issues on non business days but I still think it's a nicer measure, not only because it decreases the amount of days.

filter(clock::get_year(issue_created_at) >= 2022) |>
filter(!issue_is_pr) |>
filter(time >= 14) |>
Expand All @@ -80,7 +85,7 @@ ggsave("issues_per_year.png", width = 10, height = 6)
issues_vs_first_member_comment |>
filter(!issue_author_is_member) |>
mutate(new = clock::get_year(issue_created_at) >= 2022) |>
mutate(time = as.numeric(created_at - issue_created_at) / 86400) |>
mutate(time = bizdays::bizdays(from = issue_created_at, to = created_at, cal = "Rmetrics/ZURICH")) |>
filter(!is.na(time)) |>
mutate(time_bin = santoku::chop(
trunc(time),
Expand All @@ -94,7 +99,7 @@ issues_vs_first_member_comment |>
geom_col() +
scale_y_continuous() +
labs(
x = "Time to first response (days)",
x = "Time to first response (business days)",
y = "Number of issues",
title = "Time to first response for issues and pull requests",
) +
Expand All @@ -105,7 +110,7 @@ ggsave("time_to_first_response.png", width = 10, height = 6)
issues_vs_first_member_comment |>
filter(!issue_author_is_member) |>
mutate(new = clock::get_year(issue_created_at) >= 2022) |>
mutate(time = as.numeric(issue_closed_at - issue_created_at) / 86400) |>
mutate(time = bizdays::bizdays(from = issue_created_at, to = issue_closed_at, cal = "Rmetrics/ZURICH")) |>
mutate(human = (issue_user_login != "github-actions[bot]")) |>
filter(!is.na(time)) |>
mutate(time_bin = santoku::chop(
Expand All @@ -121,7 +126,7 @@ issues_vs_first_member_comment |>
geom_col() +
scale_y_continuous() +
labs(
x = "Time to close (days)",
x = "Time to close (business days)",
y = "Number of issues",
fill = "Issue author",
title = "Time to close for issues and pull requests",
Expand Down
Binary file added issues_per_year.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added time_to_close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added time_to_first_response.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.