viz_waterfall: Visualize waterfall of opened, closed, and pending items over...

View source: R/viz-waterfall.R

viz_waterfallR Documentation

Visualize waterfall of opened, closed, and pending items over timeframe

Description

Creates a four-bar waterfall diagram. Within the specified timeframe, shows initial, newly opened, newly closed, and final open counts. Works with either issues or milestones, as obtained by the get and parse functions.

Usage

viz_waterfall(
  data,
  start_date,
  end_date,
  start = "created_at",
  end = "closed_at"
)

Arguments

data

Dataset, such as those representing issues or milestones (i.e. parse_issues() or parse_milestones()). Must have state variable and variables to specify for start and end

start_date

Character string in 'YYYY-MM-DD' form for first date to be considered (inclusive)

end_date

Character string in 'YYYY-MM-DD' form for last date to be considered (inclusive)

start

Unquoted variable name denoting issue start date

end

Unquoted variable name denoting issue end date

Details

The following logic is used to classify issues:

  • Initial: ⁠start < start_date and (end > start_date or state == 'open')⁠

  • Open: ⁠start >= start_date and start <= end_date⁠

  • Closed: ⁠end >= start_date and end <= end_date⁠

  • Final: ⁠start < end_date and (end > end_date or state == 'open')⁠

The exact accuracy of the logic depends on filtering that has already been done to the dataset. Think carefully about the population you wish to represent when getting your data.

Value

ggplot object

See Also

Other issues: get_issue_comments(), get_issue_events(), get_issues(), parse_issue_comments(), parse_issue_events(), parse_issues(), post_issue_update(), post_issue(), report_discussion(), report_progress()

Examples

## Not run: 
viz_waterfall(milestones, '2017-01-01', '2017-03-31')

## End(Not run)

emilyriederer/projmgr documentation built on Jan. 26, 2024, 3:09 a.m.