Plotly.py: Parallel categories not recognizing dimension columns

Created on 6 Jun 2019  Â·  7Comments  Â·  Source: plotly/plotly.py

Data frame with two categorical columns and one numerical column being passed to px.parallel_categories. Only one column gets visualized, no matter what is passed to dimensions: a single column, two columns, or no columns.

Data types changed to str and category, but no change.

Data:

px

Code:

px.parallel_categories(occupations_by_year, dimensions=['Main_jobs', 'Election year'], color = 'count')

Result:

px2

Python 3.6
plotly==3.10.0
plotly-express==0.3.0

Most helpful comment

I'll get this fixed in the next version :) I'll move this issue to the plotly.py repo to get it scheduled.

All 7 comments

How many unique values of main_jobs are there?

About 30 unique values. I was hoping to make each year a node in the chart
and the jobs the bands between them, a bit like a Sankey. Is this possible?

On Thu, Jun 6, 2019, 4:48 PM Nicolas Kruchten notifications@github.com
wrote:

How many unique values of main_jobs are there?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/plotly/plotly_express/issues/98?email_source=notifications&email_token=AAJJTOMGAKJHJALXRSHQCGTPZFZYBA5CNFSM4HVHS2J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXEDXCQ#issuecomment-499661706,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJJTONC4GQ72KJHUBPNAZLPZFZYBANCNFSM4HVHS2JQ
.

Yes, but I'll have to generalize the cutoff heuristic, which right now caps the number of values at 20 IIRC. This a little blunt for cases like this where you only have 2 dimensions. It's reasonably if you had e.g. 10 dimensions because in that case you might have up to 20^10 combinations :)

I have encountered this issue as well. I have four columns, one of which has ~30 categories. There are about 1100 unique combinations in the data, so not ridiculous, but the column with the 30 categories is left out of the plot.

I 2nd the desire to set the cutoff of number of categories. Like these charts but I've hit this roadblock and I think I was just barely over the cutoff limit. I'm ok to group my categories down to reduce complexity, but wish to have a little more flexibility in doing so.

I'll get this fixed in the next version :) I'll move this issue to the plotly.py repo to get it scheduled.

Same issue over here. It is an easy way to look for colinearity among categorical features. Please get it fixed.

unique transmission_model : 19
unique model_family: 24

image

image

Python 3.5.6
Plotly 4.4.1

Was this page helpful?
0 / 5 - 0 ratings