For this week's project, I chose to rework the viz from Makeover Monday 2020 week 9: Costing Kids Sleep.
![](https://www.thedataschool.co.uk/content/images/2022/04/9-1.png)
The presentation of the viz is clean and clear, with row banding on the table to make it easier to read the rows. The colour gradient is a good indicator of the relative severity of the deficit. However, it would be easier to distinguish the colours if the whole cell were shaded, and not just the text.
To do this, I recreated the table and dragged the measure names to the Colours marks card, separated the colour legends and edited the gradients so only the deficit is coloured, while the other columns appear white. I also edited the grade numbers in the data source pane to be more consistent, as some were written with actual digits, while others with words.
![](https://www.thedataschool.co.uk/content/images/2022/04/14.png)
This viz is just a table, which makes it difficult to quickly compare between the grades. A chart would visualise the differences between the grades a lot better.
One option I tested out was a paired bar chart showing average and needed hours of sleep for each grade, coloured according to the deficit (a calculated field subtracting average hours from needed).
![](https://www.thedataschool.co.uk/content/images/2022/04/11.png)
However, since the differences between the values are not very big and there are quite a few grades, this viz seemed too crowded. It was also difficult to compare the grades according to deficit, as the colours in the middle of the gradient are hard to distinguish.
My solution was to create a bar-in-bar chart, with both average and needed sleep on the same axis. To view the deficit, I created a copy of the deficit calculated field that returns a negative value, then added it on a synchronized dual axis. This way, it’s easier to view which grades have the worst sleep deficits – namely, the older students of grades 10 to 12. Note that in order to equalise the sizes of the bars, you have to remove the measure names (containing average and needed hours) from the Deficit marks card (shoutout to fellow blogger Abiramm Thavajothy for that one).
![](https://www.thedataschool.co.uk/content/images/2022/04/12-3.png)
As some viewers would want to look at a specific grade (and this would be easier if the grades were presented in their usual order rather than in order of sleep deficit), I added the option to choose between sorting by grade and deficit, using a parameter.
![](https://www.thedataschool.co.uk/content/images/2022/04/13-1.png)
View viz (Tableau Public)