Last active
April 1, 2018 17:34
-
-
Save noamross/0d1e28608f263ee633b48b0df50f13e8 to your computer and use it in GitHub Desktop.
Checking editor workloads for rOpenSci onboarding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(gh) | |
library(lubridate) | |
issues <- gh("/repos/ropensci/onboarding/issues?state=all&labels=package", .limit=1000) | |
edits = map_df(issues, | |
~data_frame(url = .$html_url, | |
editor = .$assignee$login %||% NA_character_, | |
opened = as.Date(.$created_at))) %>% | |
filter(!is.na(editor)) %>% | |
mutate(quarter = paste(year(opened), quarter(opened), sep="Q"), | |
half = paste(year(opened), if_else(quarter(opened) <= 2, 1, 2), sep="H"), | |
year = year(opened)) | |
edits %>% | |
group_by(editor, half) %>% | |
summarize(n_assigned = n()) %>% | |
{ full_join(., crossing(editor = unique(.$editor), #can't get expand() to work. | |
half = unique(.$half))) } %>% | |
mutate(n_assigned = coalesce(n_assigned, 0L)) %>% | |
ggplot(aes(x=half, y=n_assigned, fill=editor)) + | |
geom_col(position="dodge") + | |
geom_hline(yintercept = c(3, 6)) + | |
xlab("Half / Year") + ylab("No. Issues Handled") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So compact and elegant ,realllly nice @noamross