So I have written a bit of JSL which is able to take a data table and make suggestions of graphs. It checks the number of unique values, column data type and column name to assess which graph would be most appropriate.
One issue I am having is when it uses Page, Group X, Group Y and/or Wrap and there aren't many data points in the resulting panels. Below is a silly example using Big Class. Clearly name is a poor grouping variable because each panel of the graph only contains one point.

Once my code has choosen a potential visualisation what would be the best way to check that the layout will not contain mostly panels which are data sparse/empty?
- Since I know how my variables are related I can build a table using tabulate, create a hidden data table, create a matrix and then check the sparsity of the matrix. This seems long winded.
- I need count which I don't think is possible using the JSL summarise() function (in JMP 12) which doesn't create a table.
- Is there an elegant way to build the count matrix?
- Typically the code suggests three graphs for each item in the most numerous list (X, Y or Legend), so I want to avoid creating tables if possible.
Thanks,
Stephen