-
Notifications
You must be signed in to change notification settings - Fork 55
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
A couple thoughts #3
base: joe/feature/filter
Are you sure you want to change the base?
Conversation
@@ -30,7 +30,7 @@ jqueryLib <- function() { | |||
} | |||
|
|||
#' @export | |||
filter_select <- function(id, label, sharedData, group, allLevels = FALSE, | |||
filter_select <- function(id, label, sharedData, group = "default", allLevels = FALSE, | |||
multiple = TRUE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcheng5 do we even need a group argument here? It could just derive from the sharedData
's group property, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a different kind of group--it's a group in the dplyr sense. The select box lets you choose subsets of the rows to display; the group argument indicates how those subsets should be determined. I know this is confusing, we can pick different/better names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the group argument indicates how those subsets should be determined
I don't follow. Would love an example.
I don't think the interactions in your GIF will be possible if the aggregation operations are performed in R, unless you use Shiny of course. If the aggregation was moved to plotly then it might be possible. But I'm imagining that for the near future these filter operations will only apply to, uh, un-aggregated displays of data. It's a serious limitation unfortunately. |
I should add that for aggregated displays I'd like to at least give an easy path to filtering those with Shiny, with a minimum of boilerplate. |
Yea, targeting the bar chart might be difficult. This example also brings up the question of how to handle multiple (nested) keys. For example, when I click on a bar, that selects a party, which has a one-to-many relationship in the electorate shown in the rest of the plots. |
Ooooh, I think I get it now, the group argument in |
@cpsievert (Sorry for the delay in replying, was consumed by talk prep for the last week) Yes, that's right, that's what the group argument does--it tells the filter how to divide the rows into those one-to-many (party-to-rows) relationships. |
I love the direction you're heading in @jcheng5! I have a lot of questions about
R/controls.R
, and I'm sure you have a lot of ideas/opinions left to flesh out, so I'd love to pick your brain via this PR, and share some of my thoughts on how this should work. This gif is a good example of the type of interaction I'd like to enable: