Hey folks, I’m really enjoying sharing with you my 30,000 foot view of how I would go about making figures that I find in the “wild”. Following up on these emails with a couple of related YouTube videos has been a lot of fun for me. Of course if you find any figures you like, send them my way - I love seeing what interests you all. I was reminded recently though that not everyone feels enough confidence with their R and tidyverse skills to keep up. Sorry! Towards the bottom of this email I always include links to information about my workshops where I do deep dives on the tidyverse. These newsletters and videos are geared for people who have taken a workshop from me or someone else and want to take the next steps in learning R. You can also find the materials I teach from for free here and here. As you likely know by now, in these newsletters and videos, I talk about obscure arguments and try to demonstrate the more fundamental functions in different contexts. I hope you’re enjoying these as much as me! ~~~ Earlier this fall there were a number of hurricanes and storms that whipped through the eastern United States causing pretty historic levels of flooding. Towards the end of October, Christopher Flavelle of the New York Times posted a daily newsletter briefing where he talked about “America’s Flooding Problem”. The newsletter had a number of amazing pictures. It also had this figure showing the rise in flooding events over the past 25 years. What does this figure make you think about? What elements helped Flavelle tell his story about the rise in flooding? If you were to try to recreate this in R, how would you get started? What elements stick out to you as being atypical for R plots? What would you struggle to reimplement? Think about these questions before you read further. I really like the simple design of this figure. They’ve done a good job of stripping out a lot of unnecessary distractions. I like how the 2024 bar is a more saturated blue color than the preceding years and that they annotate the bar with colored text that tells the story. I started wondering what happened in 2019 to have more than 50 flooding-related disaster declarations. I wondered what the current number is for 2024 two months later. I think an effective visualization does a good job of answering a single question and causes the viewer to ask more questions. This plot puts you in the story they are trying to tell. OK, how would we make this in R? First off, it’s a bar plot. I’ll put some “guesstimate” data below that should allow us to roughly reproduce their figure. The data frame has columns Second, the use of color is pretty effective. But we don’t have a column to map to the color aesthetic. To pull this off, I’d create a Third, the text annotation is pretty slick. I’d likely use Fourth, we’ve seen those y-axis labels in a previous figure. The plot includes the major grid lines with the value of the grid line sitting on the line. The top grid line also indicates what’s being measured on the y-axis. As I’ve done in the past, I could remove all of the y-axis ornamentation and add the values to the grid lines with Fifth, all of the lines in the figure - the grid lines, x-axis line, x-axis tick marks - are a subtle light gray. They’re also all the same thickness. We would be able to modify their appearance using Finally, because I can’t help myself, I’d want to play with matching the fonts. The title is a serif font and the other text is sans serif. By highlighting the text in the article, I see that the serif font is NYT’s own Cheltenham font whereas the sans serif font is their version of Franklin. Doing some sleuthing in google fonts, it looks like Domine and Libre Franklin would be good stand ins. We can implement these fonts with tools from the Here’s some data to play with. I’ve done my best to match the values from the figure, but it probably isn’t perfect…
|
Hey folks, This has been a busy week! I’ve been on campus teaching a 3 day, all day, R class. It’s been a while since I’ve done one of these live workshops off campus. If you’re interested in me coming to your campus, you coming to Michigan, or being in a Zoom-based workshop, please let me know! I really love being able to interact with you all in workshops. If your experience has been at all like my own the past month or so, your conversations have all had a tinge of anxiety about the...
Hey folks, I really hope you enjoyed the series of newsletters and videos of me recreating the visualizations presented by W.E.B. DuBois at the 1900 Paris Exposition. I can’t express how much I enjoyed making them. Some of them were pretty tricky and required a lot of work. But I think it was worth it! It definitely forced me to use some new-to-me tools like geom_polygon() and geom_sf(). Please let me know what you thought of the series! I wonder if there’d be any interest in a companion to...
Hey folks, I can’t tell you how much I’ve enjoyed recreating the “data portraits” from the collection of visualizations that WEB DuBois and his colleagues presented at the 1900 Paris Exposition. You can find the entire collection of “data portraits” in a book assembled by Whitney Battle-Baptiste and Britt Rusert (here) or as a collection of plates through the Library of Congress (here). Perhaps this isn’t so obvious to my non-US readers and viewers, but February is Black History month. In...