-
Notifications
You must be signed in to change notification settings - Fork 20
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
Allow defining the point reference #62
Comments
I like the idea. However, I wonder if we could benefit from more deeply integrating with pandas indices rather than introducing a new index-like API. For example, I believe in the example above, you could reindex each dataframe by |
💯% agreed. That makes a lot more sense! To rephrase your idea: make |
Yeah exactly, or maybe we have have a flag in the selection getter/setter? |
A flag is a good idea. Maybe we can add it to the proposed |
Implemented via #64 |
Currently, selected point are referenced by their index. E.g.,
scatter.selection([0, 1, 2])
selects the first three points of a dataframe. While this approach works fine, it'd be nice to reference points by some other column of the dataframe as well.Use Case
Imagine you want to synchronously explore two embeddings with shared point references but non-matching indices. E.g.:
To synchronously explore the two datasets we'd have to tell jscatter to reference points by the
id
columnProposal
Add a new property (called
point_id
) and method (calledid()
) that can either be a string referencing a column in thedata
or an array_like list of point IDs.Example
Assuming we have the two data frames from above, with the new property/method we could synchronously explore the two dataset as follows:
Assuming we select the first point in first scatter plot instance, calling
jsc_b.selection()
would return'c'
(the ID of the first point in data frame B).@manzt What do you think of this idea?
The text was updated successfully, but these errors were encountered: