Skip to contents

Two-panel figure: each source's percentage share of repos created (top, from repo_creation_tbl()) and commits per repo-month (bottom, from commit_rate_tbl()), both window-month trailing sums/averages, one line per source. Unlike plot_new_author_rate()/plot_author_interval(), sources aren't faceted apart and lines aren't split by popularity stratum - all sources are overlaid on the same axes in each panel.

Usage

plot_commit_rate(
  commit_counts_tbl,
  issue_authors_tbl,
  repo_tbl,
  source_display = NULL,
  window = 12L,
  date_start = as.Date("2015-01-01"),
  date_end = NULL,
  start_year = NULL
)

Arguments

commit_counts_tbl

As returned by fetch_repo_commits().

issue_authors_tbl

As returned by fetch_issue_authors().

repo_tbl

As returned by build_repo_tbl().

source_display

Named character vector as in plot_step_change().

window, date_start, date_end

Passed to each source's commit_rate_tbl()/repo_creation_tbl() call.

start_year

Optional year to crop the plotted window to, as in plot_activity() - display-only, doesn't affect the underlying repo-months/rate calculations.

Value

A patchwork object (two stacked ggplot panels).

Details

The repo-creation panel plots each source's percentage share of that month's total repos for each source .

Examples

if (FALSE) { # \dontrun{
plot_commit_rate (commit_counts_tbl, issue_authors_tbl, repo_tbl, SOURCE_DISPLAY_NAME)
} # }