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

Uninformative error when creating Chord diagram #2581

Closed
gmontamat opened this issue Apr 19, 2018 · 14 comments
Closed

Uninformative error when creating Chord diagram #2581

gmontamat opened this issue Apr 19, 2018 · 14 comments
Labels
type: enhancement Minor feature or improvement to an existing feature
Milestone

Comments

@gmontamat
Copy link

gmontamat commented Apr 19, 2018

I was trying to create a Chord diagram based on https://github.com/ioam/holoviews/blob/master/examples/gallery/demos/bokeh/route_chord.ipynb
I assumed it should work on my dataframes since they were very similar to the ones in the examples. I got the error:

ValueError: None of the available storage backends were able to support the supplied data format.

The actual issue was that I had loop edges (connecting nodes to themselves) which doesn't happen on the sample airport routes dataset. Removing those loops fixed the issue but a more clear error message would have saved me a couple hours.

@philippjfr philippjfr added the type: enhancement Minor feature or improvement to an existing feature label Apr 19, 2018
@philippjfr
Copy link
Member

Thanks for filing this issue, that would indeed be helpful. It's not quite clear to me why loop edges shouldn't be supported so this might in fact be a bug but for now I've labeled the issue as an enhancement request.

@philippjfr
Copy link
Member

Would you happen to have a small example to reproduce this?

@philippjfr
Copy link
Member

Nevermind, this is sufficient:

hv.Chord([('A', 'B', 2), ('B', 'A', 3), ('A', 'A', 2)])

@gmontamat
Copy link
Author

Is it possible to support loop edges in these charts? It would be nice to have them like on this plotly example.

@philippjfr
Copy link
Member

@gmontamat It will be once the PR above is merged.

@gmontamat
Copy link
Author

@philippjfr great news! Thanks.

@philippjfr philippjfr added this to the v1.10.2 milestone Apr 24, 2018
@garfield2020
Copy link

garfield2020 commented Mar 8, 2019

What data structure is needed for holoview chord diagrams?
I am trying to feed the center_path dataframe
screen shot 2019-03-08 at 10 07 35 am

with
hv.Chord(center_path)
and it gives me the error:
Number of samples, -1, must be non-negative.

@philippjfr
Copy link
Member

@garfield2020 Could you provide a full traceback, and preferably a reproducible example?

@garfield2020
Copy link

Heres the full traceback, thanks philipp!
screen shot 2019-03-08 at 10 58 12 am

@philippjfr
Copy link
Member

Are there any negative values in your value column?

@garfield2020
Copy link

That worked! I filtered out the negative values, and no more error.
But now I run the code and still don't get a chord chart output:
screen shot 2019-03-08 at 11 43 56 am

@jbednar
Copy link
Member

jbednar commented Mar 8, 2019

You should call hv.extension('bokeh') if you want graphical representations.

@garfield2020
Copy link

Perfect! thank you both

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants