Set-Matrix : Exploring relations in multiple categories
Preparing Multi-Categorical Data
To be able to create describe multiple categories in a single chart for analysis, you can include all categories in a single cell of your data (if you are using a spreadsheet), and split (separate) each category/option with a special separating character, such as ; .
Note: The separating character should not appear in any category. So, if a category includes the ; character, you should use a different character, such as * or + as separator in your data source. Another option is to store and load this data as JSON strings, such as ["Apples","Bananas"].
Converting data in multiple columns to a single column
In some cases, your original data may include one column for each potential category, and denote whether each category is present or not. You can prepare your data by adding a new column with a formula that checks data in other columns, and merges all categories that appear in a single value.
A screenshot below demonstrates a sample data prepared in this way. The related formula is
ARRAYFORMULA(IF(B2:B = "Yes","Apples;","") & IF(C2:C="Yes","Oranges;","") & IF(D2:D="Yes","Bananas ; ",""))
- ARRAYFORMULA = is useful to expand a single formula to all of the column
- IF( B2:B = "Yes", "Apples ; ","" ) = You can change "B" to the column, "Yes" to the answer you'd like to capture, and "Apples;" to the output on this condition, including the ; separator character
- Then, you merge results from multiple column using & between each column.
You can find this sample sheet here.
Set Matrix: Rich Analysis of Relations Cross Caterogies
To create matrix charts for multi-categorical features, simply click on the “Show pair-wise relations” icon on top of a multi-valued bar chart.
We have published design details, and strategies that can empower your analytics using our matrix plots. You can find our paper and sample datasets at keshif.me/AggreSet. We include the video overview of the technique and various strategies below. Note that current Keshif version may have updated the look and some features demonstrated in this video.