-
-
Notifications
You must be signed in to change notification settings - Fork 114
Use explorer as method #1154
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
Use explorer as method #1154
Conversation
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.
hvPlot's main entry points are so far:
df.hvplot.<ptype>()df.interactive()hvplot.explorer(df)
The first two approaches are patching the data structures that support their operations, dynamically adding the hvplot and interactive accessors. For some reason, this wasn't done with explorer in the first place. Maybe because the explorer is quite different in nature compared to the other two accessors, being basically a not-so-small app. There's also the possibility (not sure it works!) that you can create an explorer from some dataset and update it with another dataset, maybe from a different datatype entirely. That's actually a valid use case for the explorer, imagine a Lumen app filtering/transforming some data that ends up in a pre-defined explorer for more exploration. The more common use case though for the explorer is to operate on a single dataset. In that case, the API offered is inconsistent with the two other entry points and and this is what this PR aims to improve.
One could suggest that hvPlot could add an explorer accessor as it does with hvplot and interactive. I thought about that a little but prefer the approach of this PR, adding a new explorer method under df.hvplot, as the explorer is very close to the plotting API (a lot more than .interactive) and GeoPandas has recently added an .explore method (to get an interactive plot), which could be a little confusing for their users.
@ahuang11 there needs to be a few more docs update:
- landing page
- explorer getting started
And I have left a few comments.
hvplot/plotting/core.py
Outdated
| """ | ||
| return self(x, y, text=text, kind="labels", **kwds) | ||
|
|
||
| def explorer(self, x=None, y=None, **kwds): |
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.
Also now the explorer has Xarray support I believe this can be moved to hvPlotBase
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.
Amending myself, it's not yet supported as #1141 hasn't been merged, but will be soon I guess so this PR could be adapted accordingly if not merged before.
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.
Okay I suppose we can wait until that's done first.
|
I have made these changes:
|
Closes #1153