Bar chart of step_change_tbl() output: one column per source, one bar
per popularity stratum, step_change on a log y-axis (so a halving and a
doubling are visually symmetric) with a reference line at 1 (no change).
If tbl carries a metric column (e.g. issues vs. comments, row-bound
from two step_change_tbl() calls), it is filtered down to the single
metric requested before plotting - one call produces one single-metric
plot, so issues and comments are two separate figures rather than two
facet rows of the same one.
Arguments
- tbl
As returned by
step_change_tbl(), optionally with an addedmetriccolumn.- source_display
Named character vector mapping internal source names to display labels, e.g.
SOURCE_DISPLAY_NAME.- metric
Which metric to plot:
"issues"(default) or"comments". Only used to filtertbldown to one metric when it carries ametriccolumn (matched case-insensitively against that column's values, e.g."Issues"/"Comments"); otherwisetblis assumed to already be single-metric, and this only sets the plot title.- ref_date
The same
ref_datepassed tostep_change_tbl(), used only to label the plot.
Examples
if (FALSE) { # \dontrun{
fc <- step_change_tbl (issue_authors_tbl, repo_tbl, c ("cran", "npm"))
plot_step_change (fc, SOURCE_DISPLAY_NAME, metric = "issues")
} # }