Tidy Tuesday 04-09-2018

September 9, 2018

Over the last few months, I’d been taking part in #MakeoverMonday to practice different types of visualisation. I’ve not written these up yet, but plenty of examples can be seen on my Twitter.

This initiative is mainly focussed on the Tableau community, so working in R and focussing on static visuals means that my submissions don’t often fit in with the wide variety of interactive dashboards.

Until last week, I’d not come across #TidyTuesday which is focussed on using the tidyverse to do preliminary data analysis and visualisation. It’s great to have another opportunity to practice these skills, and I intend to mostly focus on the visualisation side as I take part in the coming weeks.

The challenge this week was to look at data on American Fast Food from fastfoodnutrition.org. The dataset can be found on the #TidyTuesday GitHub.

There are a lot of different nutrition metrics in the dataset, but I decided to focus on only three - Saturated Fat, Salt (Sodium) and Total Calories. From my pretty limited understanding of nutrition, those first two are generally considered “bad” while the latter is a good proxy for “amount of stuff” which is always good to know.

With these three metrics, I decided to use a bubble chart to show the data:

The key things I was thinking about when creating this visualisation:

I had one piece of feedback on how much overplotting there is in the bottom left hand corner. It’s a fair comment, and this might be fixable with transparency, but in this case I think I’m personally happy with it as is. I know you can’t see how many specific points are there, but you get a sense of there being “a lot of stuff” and they key story for me are all the outliers which you can see clearly.

One potential alternative I thought of would be small multiples of 2d density plots (by brand) with the outliers shown on top of these as individual points. This may be clearer, but would require a lot more explanation to a lay person.

I was amazed by the amount of interaction / feedback I got when I posted this on twitter. Apparently this visualisation has been seen over 2500 times on various twitter timelines. The R community is definitely an amazingly supportive bunch of people, so I’d encourage people to get involved.

It was really surprised to get a reply from Alyssa Goldberg saying that see was using my code for quadrants on a work project. That’s the first time anything like that has happened, so thanks Alyssa!

I definitely intend to keep engaging with #TidyTuesday, and will try to keep writing up my thoughts after each submission.

The code for this visualisation is on my Github.

If you’d like to discuss this then reach out on Twitter.

comments powered by Disqus