# Data visualization: distribution data

I'd like some input as to the best way to visualize a data set.

Look at the below table (it's made up data indicative of the set I'm working with but cannot show according to my employer).

The goal is for the user to be able to understand the constituent parts of the whole: how much of the majority total grocery spend is accounted for by produce, meat, etc? What about for the minority (25 or 75 %ile)?

``````|                     | Min.    | 25%     | 50%     | 75%     | Max       | # Reporting |
-----------------------------------------------------------------------------------------
| Total Grocery Spend | \$449.00 | \$596.50 | \$710.30 | \$861.40 | \$1,057.80 | 432         |
| Produce             | \$140.20 | \$196.50 | \$233.90 | \$277.90 | \$301.20   | 334         |
| Meat                | \$103.80 | \$133.80 | \$160.90 | \$196.10 | \$221.40   | 270         |
| Dairy               | \$110.10 | \$138.30 | \$171.20 | \$209.70 | \$234.70   | 198         |
| Packaged Goods      | \$94.90  | \$127.90 | \$144.30 | \$177.70 | \$300.50   | 400         |
``````

Some ideas are:

Multiple distribution curves

As far as I can see, the problem with this approach is that it's not readily apparent how all the constituent parts fit into the whole, although it might be the be most fitting to plot my above data as the conventional distribution chart

Stacked Bar Chart

The problem with this approach is that it's good at communicating a general trend, but it's very hard to tell how the different segments compare to each other. Perhaps labels upon hover might fix this?

Scatterplot Matrix

As far as I can see, this might be the most complete way to communicate the data included in the set, but I worry how unintuitive it is.

I'd welcome any input as to the most effective and intuitive way to visualize this data.

• It seems like there are multiple relationships and stories that can be represented, and it really depends on what you want to emphasize. But a starting point might be to explore the technique of small multiples (en.wikipedia.org/wiki/Small_multiple)? Commented Jun 10 at 23:27

## 1 Answer

Tl;dr answer: for your demo case with up to five constituent parts I would use a group distribution diagram (not a stacked chart).

If you add a clickable legend that allows user to click some parts on/off to the datavis, your users will be able to see single part distribution and compare all parts distribution in one component.

I wouldn't use a Stacked Chart (or, God forbid, a Stacked Area Diagram) for the exact reason you mentioned, it has a high lie-factor for comparison.

I wouldn't use Curves: it is a very intuitive DataVis indeed, but Curves are designed for exposing a whole distribution as a mass for a quick glance, and if you need users to drill down, compare and quickly differentiate between percentiles, they come second to bar chart.

Now, Scatterplot matrix is great for showing big datasets with big variables, but if we are talking about more generic audience that is less experienced in statistics, I would opt out of it completely, for it's really hard to read and compare if you are not trained for that.

P.s. Showing total right next to it's parts would be confusing, I would move it to a separate chart or add a separate legend toggle for it.

P.s.2 There is a nice post on the Distribution DataVis by FlowingData, and I recommend it just to have a scope on the problem :-) Flowing Data is one great resource on DataVis, by the way.