I have news! Where do you get your news?


Hey folks!

I continue to get positive feedback about my critique videos. This has me quite excited that I’ve perhaps scratched an itch that people have been struggling with. Would you like to meet with a group of other people who are committed to making their data visualizations better? I’m forming groups now that would meet once a week or every other week to give each other constructive feedback on the visualizations they are making for their work. Alternatively, if you have ever thought, “I wish Pat could talk to me about my visualization”, and you would like to meet one-on-one with me, reply to this email and let me know. These groups would not involve coding, but more of the style of critique and feedback that I cover in the past few Monday videos. The downside of the videos is that there isn’t much opportunity to talk with the developers about their ideas or to iterate over different versions of a visual. Here’s the chance. Let me know!


A few weeks ago, a viewer sent this figure to me from the Pew Research Center as part of their recent reports on Americans’ perceptions and use of the media (I’m sorry, but I forget who you are!)

The headline of the article was, “1 in 5 Americans now regularly get news on TikTok, up sharply from 2020”. In Monday’s video, I’ll have more to say about this claim, the title of the figure, and its overall appearance. My immediate thought was, "Gee whiz, no wonder the country is so screwed up!" For now, let’s think about how we’d make this figure.

First off, we don’t have access to the data :(. Pew has a time lag in when they release their data. I think it should be easy enough to generate our own data frame to approximate the values in the figure. Let’s think about how we’d structure the data. To do this, we might think about reverse engineering the figure. What aesthetics do we need? The year on the x-axis, the percentage on the y-axis, we need to group and facet the data by the social media platform. So, I’d make a data frame with three columns that I’d probably title, year, percentage, and platform.

Second, to create the plot we’d need (at least) three geom’s. Most obvious to me would be geom_line() to draw the line plot, geom_point() to put the points on the lines, and geom_text() to add the percentage for the first and last year of the series for each platform.

Third, we’ll need to facet the data using facet_wrap(). If we use nrow = 1 we can get each of the platforms to be on a single row. I would likely adjust the panel spacing down to nothing to get them to be right next to each other. I’m not sure that the platform name we see in each panel could be set with the panel.strip argument in theme(). I don’t think that would work because we need the vertical dividing lines to go between the titles. Maybe it would work? I don’t know - that’s why this is so interesting to try! I think we might need a geom_text() to place the facet titles if we can’t use the panel strip text. We could make “TikTok” bold either with an aesthetic mapping to fontface or using geom_richtext().

Fourth, to style those facets we need to think about the vertical lines. Normally, I’d think about using geom_vline(), but these lines extend down below and above the x-axis. I think we’d need to use geom_segment() to pull this off. A second bit of facet styling is the background color for the TikTok facet. I think I’d use annotate() to place a geom_rect() object in the background of the TikTok panel that has the matching fill color.

Finally, another interesting component in these facets is the x-axis that starts with “‘20” and ends with “‘25”. There are ticks in between but no labels and the axis doesn’t extend beyond those years. We saw this recently in a NY Times visual that made a slope plot. I’d probably try a similar approach.

Hopefully, you’re starting to notice that we can borrow ideas from one plot to try with another - things like the x-axis line and these facets. This “reuse” is why I call this project of mine, Riffomonas. We are “riffing” on data visualization ideas that we can reuse/remix to get a desired effect in different contexts.

Let me know what you think. Do you see anything else in this figure that you are unsure how you’d implement? Let me know! Also, if you see any other interesting visualizations out in the wild, please send them my way.

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, 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...