What visualization approach would you use instead of these pie charts?


Hey folks,

As I mentioned last week, I’m exploring the possibility of holding live, in person, workshops again like I did before the pandemic. If this is something that interests you, please let me know. My thought would be to hold them at an affordable hotel near the Detroit airport (DTW). But, if you would like to host me to teach a workshop, I would be open to that as well.


This week, I want to call your attention to a plot that I would not encourage you to make. This comes form “Targeted innate immune inhibition therapy compared with antibiotics for recurrent acute cystitis: a randomized, open-label phase 2 trial”, which was published recently in Nature Microbiology by Ambite and colleagues.

To be perfectly honest, whenever I see a pie chart I tell myself, “Surely there was a better way… What would have been better?” I’ll be talking more about this in the critique video next week, but how about taking some time to think about it now?

As always, we need to think about the context. The study had 20 people receive anakinra (an immunologic) and 10 receive nitrofurantoin (an antibiotic) to compare the safety and efficacy of the drugs in treating recurrent cyctitis, a type of bladder infection. Although I’m sure the developers of anakinra would have loved to see it perform better than nitrofurantoin, they also would have been happy to see the drugs perform equally. That’s because of concerns over antibiotic resistance. Does this context help you think about the design of this panel?

What is being compared? It isn’t change in symptoms back to day 1. It’s the comparison between the two drugs at each of the four time points. Those P-values are an output of testing the comparison and that all four are non-significant is one indication that anakinra is not inferior to nitrofurantoin. That test is comparing the distribution of the change in symptoms for the patients on the two drugs. It’s basically asking whether each pair of pie charts are different from each other.

I can more or less see what they want me to see with the pie charts. But I think there’s a design that would be easier for me to see the similarity. Let’s think about a couple of other designs.

First, my go to approach when pie charts are proposed is to facet the x-axis by the response variables (e.g. all symptoms gone, some symptoms gone, same symptoms or worse) and put the values next to each other that we’d like to see. In this case, I’d put time across the x-axis and the percentages on the y-axis. At each time point, I’d dodge the data by the three levels of response. Then I’d give a different color to the two drugs and plot the data as a point. Something that I gives me pause in thinking about this is that the comparison is across all the response variables, not each response individually.

Second, and I know this will shock many, what if we converted those pie charts into … stacked bar plots? Again, on the x-axis we’d put time and the y-axis the response, but we’d give each segment of the column a different color. We’d also put the stacked bar for each drug and time point next to each other. Aside from wanting to compare all three responses across the drugs together rather than individually, there’s another reason I’m open to this strategy. Namely, because there are only three responses. We could put the “all symptoms gone” on the bottom of the stack, “some symptoms gone” in the middle, and “same symptoms or worse” on top. If you wanted to compare individual responses as a secondary question, two of the three categories would have a fixed edge along the y-axis for making comparisons.

What do you think? Have I lost touch with reality?! Something that gives me a bit of pause about this approach is that we’re “hiding” the fact that there were 20 people in the anakinra group and 10 in the nitrofurantoin group. That’s why the comparison at 6 months looks different, but has a non-significant P-value. Effectively, the error bars for the nitrofurantoin are larger than they are for anakinra. This is made clear in the figure caption, but I feel like it is lost in the visual itself. Perhaps instead of putting the percentages in the tiles of the stacked bars we could put the actual number. Again, because we only have 3 categories, I think we could get away with adding those numbers without overwhelming the appearance of the figure.

Let me know what you think. Stay tuned until next week to see how they look when I give both approaches a try.

Workshops

I'm pleased to be able to offer you one of three recent workshops! With each you'll get access to 18 hours of video content, my code, and other materials. Click the buttons below to learn more

In case you missed it…

Here is a livestream that I published this week that relate to previous content from these newsletters. Enjoy!

video previewvideo preview

Finally, if you would like to support the Riffomonas project financially, please consider becoming a patron through Patreon! There are multiple tiers and fun gifts for each. By no means do I expect people to become patrons, but if you need to be asked, there you go :)

I’ll talk to you more next week!

Pat

Riffomonas Professional Development

Read more from Riffomonas Professional Development

Hey folks, Earlier this week, those of us in the US celebrated Memorial Day. For many, this marks the unofficial start of summer. I suppose the clock is now ticking until Labor Day, which is the unofficial end of summer. Let me be the jerk to tell you that you have 100 days left to accomplish all of your summer goals. I suspect that for many of you writing papers and putting together conference posters and talks are on your list of goals. Generating attractive visualizations of your data is...

Hey folks, I’ve been getting asked to give more talks about data visualization and my experiences critiquing visualization. It’s been a lot of fun to engage with live audiences. I enjoy learning about their experiences, motivations, and limitations. As much as I love this newsletter and the content I post to YouTube, it’s clear that it isn’t a substitute to talking to people without the filter of email or a chat box. So, if you’re interested in working with me on an individual or group level...

Hey folks, The more I peruse the literature, the more I see that researchers need help designing figures to help tell their stories. I don’t just mean the mechanics of creating a figure in R, Python, Prism, or Excel. Rather, if someone had a box of dry erase markers of various colors and they had to give a talk without any slides, what would they draw to tell their story? I don’t mean to trivialize the difficulties. It’s hard! There are many figures I’ve published that I wish I could have a...