Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building out the stat element of a layer #42

Closed
ijlyttle opened this issue Aug 5, 2019 · 1 comment
Closed

Building out the stat element of a layer #42

ijlyttle opened this issue Aug 5, 2019 · 1 comment

Comments

@ijlyttle
Copy link
Contributor

ijlyttle commented Aug 5, 2019

In talking with @haleyjeppson, I think we see a way forward to deal with stats. Haley has already contributed some thoughts, in the Rmd file on the ggplot2 and Vega-Lite parts. I think it remains to sort out the ggspec part. I am proposing this issue as a gathering-place for that discussion.

I propose that Haley establish a branch to mirror this issue, so that we will merge a PR when we are "done". We can pr_pull_upstream(), as new things are merged into master from testing, ggschema, etc.

What follows is just a transcription from my notebook on a first idea for how a stat would appear in a ggspec layer; it is meant as a starting point for continuing the Rmd file.

This is meant to illustrate "new" parts of the spec, using stat-bin as an example:

{
  "layer": {
    "stat": {
      "class": "bin",
      "default_aes": {
        "y": {"stat_operation": "count"},
        "weight": {"value": 1}
      },
      "required_aes": ["x"]
    },
    "stat_params": {
      "binwidth": 10
    }
  }
}

The content of stat_params would depend on the class of the stat.

Also, I have modified some of this since talking with Haley, so I think we will have some discussions before "finalizing" anything.

@ijlyttle
Copy link
Contributor Author

closed in #40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant