Fold-change in distinct non-core author density, from a reference month to now
Source:R/table-activity.R
author_density_step_change_tbl.RdThe author_density_tbl() analogue of step_change_tbl(): for each of
several sources, compare each popularity stratum's author-density value
at a fixed reference month against its most recent value. Both endpoints
are estimated from a linear regression fitted to the trailing rate from
ref_date onwards.
Usage
author_density_step_change_tbl(
issue_authors_tbl,
repo_tbl,
sources,
n_strata = 4L,
contrib_threshold = 0.01,
contrib_min = -Inf,
window = 12L,
ref_date = as.Date("2021-01-01")
)Arguments
As returned by
fetch_issue_authors().- repo_tbl
As returned by
build_repo_tbl().- sources
Character vector of
source_namevalues to include (seeissue_rate_tbl()).- n_strata
Number of popularity strata, passed to
issue_rate_tbl().n_strata = 1pools every repo into a single, unstratified rate and dropspopularity_stratumfrom the returned tibble.- contrib_threshold, window
Passed to
author_density_tbl().- contrib_min
As in
author_density_tbl().- ref_date
Reference
Date(first-of-month) to compare against the latest available month.
Examples
if (FALSE) { # \dontrun{
fc <- author_density_step_change_tbl (issue_authors_tbl, repo_tbl, c ("cran", "npm"))
plot_step_change (fc, SOURCE_DISPLAY_NAME, metric = "issues") +
ggplot2::labs (title = "Distinct authors")
} # }