|
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, Did you know that you can do statistics in R? HA! Of course it is. As the first sentence of its Wikipedia entry says, “R is a programming language for statistical computing and data visualization”. I rarely discuss using R for statistical analysis and focus far more attention on the data visualization power of R. This week, I’d like to share a set of panels from a figure in a paper recently published in Nature, “Lymph node environment drives FSP1 targetability in metastasizing...
Hey folks, I’ve really enjoyed the flow of combining these newsletters with a Monday critique video, a Wednesday recreation video, and occasionally a Friday remake video. A few weeks in, I feel pretty good about our ability to engage in constructive critiques. Of course, we have to train ourselves (myself included) to use those tools and not just resort to immediate and emotional responses - “I hate that plot”. We need to engage, get in the head of the original creator, and try to understand...
Hey folks! I’m appreciating the positive feedback on Monday critique videos. They’re a lot of fun to think through and make. I think I might start looking at figures that are drawn from the scientific literature since many of you found out about me from my science work. Let me know if there are plots or practices that you’d like to see me talk about. I’ll see if I can work them into the queue. Also, if you’re working on developing figures for a presentation, poster, or paper and would like to...