DataViz Tip #6: Transform and “Massage” Your Data
The data you store and get back is often the most granular – that’s always great to have but not necessarily the best data to expose to users and comprehend.
Suppose you have data for daily site visitors, page views and sales. You can expose all of this data as is in 3 line graphs and let the viewers wrap their heads around it.
See the Pen DataVizTip6-sample1 by amCharts (@amcharts) on CodePen.
By looking at the chart above you can only tell that everything is going “up and to the right”, which is probably good, and not much more.
But what if you transform and aggregate the data to a form that makes the most sense to the consumers of your visualization?
For example, your content team is hard at work producing quality content, and they need to know if it clicks with the visitors to the site. They may look at the growing page views chart above and decide they are doing a great job, when in fact it’s just marketing/user acquisition team stepped on the accelerator and is attracting way more users who bounce off as much (or even more) than before. Unless you are monetizing with ads, the absolute number of page views is not a meaningful metric. The more meaningful one for your content team is page views per visit ratio.
The same applies to sales as well – growing sales numbers are always good but are they growing just because you get more visitors to the site or thanks to your improvements in the purchase flow? Absolute numbers can’t answer this question; ratios can.
See the Pen DataVizTip6-sample2-ratios by amCharts (@amcharts) on CodePen.
If your primary viewer is someone overviewing both the team tasked with increasing page views per visitor and one working on sales per visitor, it may be difficult for that person to compare both ratios as they are on a slightly or majorly different scales. One solution could be to use multiple value axes (one for each graph) in amCharts which should place the numbers on roughly the same scale.
Alternatively, you can convert your ratios into indices (value divided by the maximum value of the series) and analyze all of the values on the same 0-to-1 scale.
See the Pen DataVizTip6-sample3-indices by amCharts (@amcharts) on CodePen.
Additionally, plotting daily numbers may give you a general understanding of the overall trends, but often daily fluctuations could be confusing, especially in low volume businesses. So, you are better off aggregating the numbers over longer periods. Also your sales team may have some sales targets – something like 10% month-over-month sales growth. A chart showing absolute sales numbers growing is nice, but doesn’t inform the team if they are on target. Recalculating values into growth percentages may answer this question easily.
See the Pen DataVizTip6-sample4-salesgrowth by amCharts (@amcharts) on CodePen.
As you can see, the visualization is dramatically different from what we had in the beggining and may provide totally different insights and, in turn, value to the user. And the beauty of interactive charts like amCharts is that you still can place the base data on the chart (you can see the total sales for the month by hovering over the columns).
We are giving away a great data visualization book each month! Subscribe to our newsletter to get monthly tips like the one above and you’ll be automatically entered in the sweepstakes to win an awesome book.