tidyverse / tidyverse/ggplot2

Feature request: stat executing multiple other stats

Open
#6,325 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature layers :chart_with_upwards_trend:
Dominant language
R
Stars
7k
Forks
2.1k
Avg merge
59m
Merged PRs (30d)
2

Description

From Thomas in the discussion of #6231:

Conceptually this feels like it belongs in a stat, but that would preclude it from being used together with other stats like in the examples above. However, I feel we did touch on the idea of having a stat_stack() at some point which would remove this downside

I'm lifting this out from that discussion to a separate issue as it blocks progress for #6231. Briefly, it would be good to have a stat, whose job it is to direct the serial computation of other stats. A 'composer' of stats, if you will. It would make re-implementing the position_connect() to a stat_connect() worthwhile. In addition, I think some other 'chains' of stats can be neat too, such as a typical stat (e.g. stat_bin) combined with more of a 'geometric' stat like ggforce::stat_link(), ggforce::stat_bezier() etc.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the discussion of #6231 and the proposed stat_stack() concept. Review how stat_connect(), stat_bin(), and the referenced ggforce::stat_link() and ggforce::stat_bezier() could be composed serially. Done means the project has a defined stat-composition approach that supports chains of multiple stats and addresses the use case blocking #6231.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.