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

A couple thoughts #3

Open
wants to merge 1 commit into
base: joe/feature/filter
Choose a base branch
from
Open

A couple thoughts #3

wants to merge 1 commit into from

Conversation

cpsievert
Copy link
Contributor

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:

eechidna

@@ -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) {
Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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.

@jcheng5
Copy link
Member

jcheng5 commented May 19, 2016

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.

@jcheng5
Copy link
Member

jcheng5 commented May 19, 2016

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.

@cpsievert
Copy link
Contributor Author

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.

@cpsievert
Copy link
Contributor Author

cpsievert commented May 19, 2016

Ooooh, I think I get it now, the group argument in filter_select() functions almost like the nested key idea I was just referring to above? ^^^

@jcheng5
Copy link
Member

jcheng5 commented May 25, 2016

@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.

@CLAassistant
Copy link

CLAassistant commented Apr 23, 2020

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

3 participants