Shortcuts for commonly used compound charts such as pairplot from Seaborn #2789
Replies: 2 comments 6 replies
-
I personally think it would be great with another level of charts in altair that are simpler to make and have specific functions, but less customizability. For me this is mostly for Exploratory Data Analysis when we are not looking to carefully craft each chart but quickly get an accurate overview of the data (this is currently somewhat laborsome with the repeat operators). I am mostly thinking about compound plots (such as "pairplot") and purpose-specific plots (such as a NaN plot or correlation plot), where the syntax to create these in altair directly is rather verbose (often because it requires repeating or transformations). I think the altair syntax is already terse enough for e.g. scatter plot, line plots etc and don't think we need a higher level layer for those. This would diverge from the spirit of Altair only doing what VegaLite does, but I think it would also be tremendously helpful and it is present in other similar package such as seaborn, plotly express, holoviz, etc. For me, these functions are many of the ones I have included in altair ally and maybe when they become more mature we could move the most relevant into the core of altair under a |
Beta Was this translation helpful? Give feedback.
-
Coming back to this, reflecting on some recent occurrences where people have reached for other tools than Altair, I do find that maybe the most common scenario is when they are doing EDA and need to create charts of repeated columns quickly. This was a reminder about our discussion here and it makes me inclined to want to include the type of charts that I have in https://joelostblom.github.io/altair_ally/examples.html (plus more heatmap seriation/ordering) directly into a submodule to Altair. I will try to do some work in that package over the summer, but I wanted to check already if you @mattijn @binste and @ChristopherDavisUCI think this could be a viable option for inclusion in Altair or if it deviates too much from the package's purpose (which I think has already expanded beyond a simple vega-lite wrapper, but this inclusion of specialized charts would still be a notable step). The immediate upside is discoverability and ease of use for end-users (which I do think is quite important), but one immediate downside I can think of is that it would give less flexibility in terms of dependencies since I think e.g. scipy would become a dependency of altair_ally when I add heatmap ordering (but this could be made an optional dependency). I also think this fits nicely as part of Altair's mission to "empower you to spend less time writing code and more time exploring your data." |
Beta Was this translation helpful? Give feedback.
-
One of the first functions I learned in Seaborn was pairplot and I still use it frequently. Would there be interest in sneaking a version of this function into Altair? We could borrow from @joelostblom's
pair
function in Altair Ally (although I personally am more used to the redundancy in the Seaborn version, where each quantitative variable gets assigned to the x-axis and also assigned to the y-axis).Any thoughts on this? Sometimes I make something similar using
alt.repeat
, but the diagonal charts (where the same variable gets encoded simultaneously in both the x channel and the y channel) make the whole thing look less nice to me.Beta Was this translation helpful? Give feedback.
All reactions