|
Hey folks! As I’m writing this newsletter the US government is in shutdown mode with no clear signs that things will get going anytime soon. I’ll withhold my own political take except to say that my family has been running without an official budget for about 25 years. I don’t recommend it, but we know basically how much money goes to our mortgage, insurance, groceries, charities, etc. and how much money we generally have left over. Somehow we still are able to spend money on living a pretty comfortable life and, of course, we still pay the bills… including our taxes. There’s one party that controls the Legislative and Executive branches. Even if we don’t like the funding scheme they come up with, you’d think they could figure out to how to show some leadership and pass something. Anyway, this isn’t a politics newsletter. It’s a data visualization newsletter. The Washington Post gave a try at trying to show who Americans blame… What does it say to me? With one exception, in 2023, we typically blame Republicans for government shutdowns. It also seems like we have had more shutdowns over the past 12 years than we have before then. Perhaps this is because we haven’t had a proper budget since about 2008. Instead, we’ve had continuing spending resolutions. These seem to be an exercise in brinkmanship. What don’t you like about this plot? I think there’s more I don’t like about this plot than that I do like. If you add up the totals for each shutdown you’ll see that they don’t come close to adding up to 100%. This is because many people think that both parties are to blame. A second element of this plot that I don’t like is that it is hard to compare within a year the fraction that blamed Democrats vs. Republicans. I would have preferred to use a dot plot where I’d still leave the date on the y-axis, the percent blame would be on the x-axis, and the party being blamed would get a different colored plotting symbol - maybe red, blue, and purple. What do you like? I’m not sure… :) I picked this because I’m mostly curious how I’d make it in R… How would I make this in R? Good question! Several things stand out to me. It’s a diverging bar plot, with a catch. The catch is that there’s a gap between the base of the two bars. Because of that gap, I’d likely make this as a faceted plot. There’s another catch. The segment of each larger rectangle that doesn’t go towards the party getting blamed is shaded in. I’d treat that as a stacked bar plot. Got it? We’ve got a faceted, stacked bar plot. Let’s think about the data. We’ll have a column for the facet that would have two values - “democrats” and “republicans”. There will also be a column for who’s to blame - “democrats”, “republicans”, and “unaccounted”. The value for “democrats” in the “republicans” facet will be zero. The value for “republicans” in the “republicans” facet will be what’s in the white text. The value for “unaccounted” in the “republicans” facet will be the difference between 53 and the value in the white text. So for the “Oct. 2025” shutdown “unaccounted” would be 6. I’m pretty certain that the “democrats” facet is the same width as the “republicans” facet. So, its total will be 53 as well. We’ll need to play some with treating these variables as factors and getting the ordering correct of the facets, the rows, and stacked rectangles. In addition to using Now let’s return to the facets. They have titles. We can likely format the titles using the Again, there’s a lot more I don’t like about this plot than what I do like about it. I was mostly interested in how to make it. What do you think? I’d love to get your insights. Stay tuned for next Wednesday (10/22/2025) when I’ll try to recreate this visualization on a YouTube livestream!
|
Hey folks, It has been great to see the high level of engagement with my weekly critique videos on YouTube. I have really enjoyed making them and have learned a lot about current practices in data visualization. The one problem with these videos is that they’re a bit like an autopsy. We can figure out what went well or what didn’t work in a published figure. But we can’t do much to improve the published figure. What if we could do critiques before submitting our papers, preparing a...
Hey folks, This week I want to share with you a figure that resembles many a type of figure that I see in a lot of genomics papers. I’d consider it a data visualization meme - kind of like how you’re “required” to have a stacked bar plot if you’re doing microbiome research or a dynamite plot if you’re publishing in Nature :) This figure was included in the paper, “Impact of intensive control on malaria population genomics under elimination settings in Southeast Asia” that was published...
Hey folks! I hope you enjoyed last week’s series on the radial volcano plot (newsletter, critique video, livestream). I think it did a good job of illustrating the various reasons I think it’s valuable to recreate figures, even if we don’t like how they display the data. Something I didn’t really emphasize in last week’s newsletter was that by recreating a figure, we can make sure that the data are legit. I’m surprised by the number of signals I’ve been finding where authors using tools like...