-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Feature reference gallery #999
Conversation
…in the User Guide
…an by explicitly setting numeric_only to True
Thanks @bikegeek ! @jbednar as you've been suggesting this contribution, I was wondering, doesn't this approach lead to too much duplication? For instance, that work could also be done for GeoPandas, and pretty much all the other supported backends, right? But indeed the reference page is currently incomplete and somewhat misleading. Instead I was thinking, how about using tags like on https://examples.pyviz.org/ to list the backends supported by the elements? Doing so by removing the current three and incomplete categories Pandas, Geopandas and Xarray; and by completing the existing reference pages (e.g. bar, line, hist, ...) with examples showing how to generate these plots from other data structures. |
Depends what you mean by duplication. If you look at the code for the xarray and pandas versions of the same plot type, about the only thing that's shared is |
I think that's because right now the reference pages are really poor in content. They don't provide the method signature, which you might expect from a reference page, with at least a description of the specific parameters for that method. That info would be duplicated across data structures. They also contain very few plots, the Pandas line page contains just one plot for instance. If you compare it to the equivalent plotly page, it's diametrically different. I think these reference pages should help the users getting their work done, they should be able to quickly find some recipes in there, instead of having to go through all the user guides. So in the end I believe these pages should focus more on the variations of the same plot type you can make, rather than on reading the data, hence the potential duplication across data structures.
A few comments on this:
|
Totally agree with @maximlt that the reference notebooks are currently way to sparse. They should find inspiration in the plotly documentation. Plotting can be really difficult, finding the right now combination of parameters etc. is not always obvious. As a user you need the inspiration and reference examples. Its on my long todo list to contribute something here. |
Sure, but that info should be auto-generated, and so again, only an issue for the website to avoid a user's experience of duplication, unrelated to a notebook like this that's about showing how to generate the specified type of plot from a particular data library's object. The actual reference material should be no more than one line in the source code for this page, saying "I want to pull in the auto-generated reference material for object X". Duplicating that one line across data libraries will not be an issue. Duplicating the other material referenced below, will be, but we will have to address that a different way unrelated to this PR.
I agree it would be nice to have a full and complete guide to a given type of plot, with a lot more illustrations and examples. I'm not sure that's relevant to the review of this PR, though.
Agreed. The lack of documentation for supported data structures is a serious problem, which this PR is a small step towards addressing.
Agreed. I'd love to hear about solutions. Again, I'm not sure that's relevant to reviewing this PR. We don't even have a plan for that, let alone a commitment to work on it. Meanwhile, this PR shows an xarray user how to invoke a plot of the given type, within the current structure of the website, and should be reviewed in that context. Future work can be reviewed in future scenarios when those become real! |
Do you expect that there will be a complete reference page for each data structure? |
@bikegeek here's the beauty of open-source, things can take a while but they eventually happen! Thanks a lot for adding these new reference guides, I'm going to merge your PR now which is going to be included in the next release of hvPlot that is coming soon. |
Co-authored-by: maximlt <[email protected]>
Added the following notebooks to the Reference Gallery Xarray section:
*(Based on the corresponding notebooks in the Pandas section and the User Guide)
In the bar.ipynb notebook in the Reference Gallery Pandas section:
Addressed the FutureWarning in the DataFrameGroupBy.mean() by explicitly setting numeric_only to True
(i.e. DataFrameGroupBy.mean() is replaced with DataFrameGroupBy.mean(numeric_only=True) )