0

I am currently experimenting with heatmap based interactive visualisation using RAPIDS library and I was able to successfully generate(figure-2) an interactive dashboard using Cuxfilter plugin(which uses Bokeh server and library) however I am only able to select one column in x and y axis and this is very limiting as I need to generate plot (see figure -3)for tens of columns in both x and y axis. Can anyone help with this?

I am trying to plot tens of different parameters in x-axis, but I am only able to chose one parameter to generate the heat map. For example, let's say I have a dataset of customers using Taxi service, containing customer ID, trip distance, total amount, tip amount, age of customer, number of passengers per trip etc. I am only able to select one of the above listed parameters to generate the heatmap. But I would like to select all the parameters to be plotted on x-axis in the heat-map chart. When I looked at the heatmap chart function in the RAPIDS-CUXFILTER library, It doesn't seem to have that feature - See below; enter image description here

Figure 1 - single column heatmap

Figure 2: I need to generate this type of multiple column heatmap

Note:- cuxfilter acts as a connector library, which provides the connections between different visualization libraries and a GPU dataframe without much hassle. This also allows the user to use charts from different libraries in a single dashboard, while also providing the interaction.

Many Thanks

Sri
  • 51
  • 1
  • 3
  • Please elaborate, I don't see what the relevant difference between figure 1 and figure 2 is at all (except that figure 2 has fewer rows and columns than figure 1). What does "only able to select one column in x and y axis" actually mean? Are you talking about interactive selection (e.g. clicking with a mouse), or talking about choosing what to display with the API? Or something else? Please share some *actual code* to focus the discussion, specifically a [Minimal Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – bigreddot Jan 19 '22 at 17:23
  • Hi All, Thank you for your response and apologies that my question wasn't clear enough. – Sri Jan 24 '22 at 16:17

1 Answers1

2

As of now this may not be possible on cuxfilter, as the heatmap only supports 2 dimensions (the current heatmap implementation is basically a modified scatterplot api, as it mentions in the docs). We would love to add a separate heatmap implementation though, and would appreciate a feature request on the repo.

Although, the best way to visualize the heatmap would be directly using holoviews, most of the cuxfilter charts are built using the holoviews api, and something like the following snippet should help you visualize what you need:

import holoviews as hv
hv.extension('bokeh')

# Assuming df is your current cuDF dataframe, compute the correlation
corr = df.corr().to_pandas()

hv.HeatMap((corr.columns, corr.index, corr))

If you want interactive version, there is a useful discussion here, which tackles with having correlation heatmap for a DataFrame and a regression plot for each pair of the variables.

Hope that answers your question!

AJ_
  • 121
  • 2