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 This week, I want to highlight a story in the NY Times’s “TheUpshot” section from December 2024, “How Drug Overdose Deaths Have Plagued One Generation of Black Men for Decades”. The story describes how drug overdoses has had a disproportionate effect on Black men through the 1980s, 1990s, and now - these men are all from the same generation. One quote that stood out to me in the article was from Tracie Gardner, who said, “They were resilient enough to live through a bunch of other epidemics — H.I.V., crack, Covid, multi-drug-resistant tuberculosis — only to be killed by fentanyl.” Oof. In this article, the team of journalists and data scientists present heatmaps for different diseases with the year across the x-axis, the age across the y-axis, and the intensity of each cell colored by the number of deaths per 100,000 people. They make plots for different diseases and U.S. cities. Here’s the heatmap for drug deaths among Black men in Chicago: A few things stand out to me about this figure that I’d enjoy taking on in R with ggplot2. First, it’s obviously a heatmap. I need to aggregate the data from the mortality data from NCHS, but let’s assume that we can get a CSV or TSV with columns for the year, age, and number of deaths in each region. We should be able to map the year to the y, age to the x, and deaths to the fill aesthetics. Then we’d use Second, I’m intrigued that they also included the dashed lines indicating the ages of a cohort of men born between 1951 and 1970 across the last 40 years. I’d likely create this using Third, the legend is a gradient going from a pale color to a dark purple color. This is reminiscent of one of the viridis color scales. Even if it isn’t exactly one of the built-in color scales, we could use Fourth, there’s no x-axis title, but there is a y-axis title - “AGE”. It’s rotated 90 degrees and located outside the top let corner of the heatmap. I’d likely put that there with some Finally, the plot has a title and caption. The title has two font faces - bold and regular sans serif font. Likely a Libre Franklin-related font that we can get from google fonts. The caption at the bottom is small and gray. What else catches your eye about this visual? Let me know! Reading the comments of a NY Times article is rarely a good idea. But nestled in there are other plots that I’d be interested in seeing. For example, what do the data look like for Black women? Hispanics? Whites? What do they look like in Detroit? How do you think we’d need to alter the R code to look at these questions and compare them to Black men? I suspect the WONDER NCHS Data is a treasure trove for answering these and other questions.
|
Hey folks, I need your feedback on an idea! Don’t worry, there’s some visualization stuff at the bottom. I had a video nearly ready to post this week using a ridgeline plot to show the baby boom. I think I did a great job of recreating the plot. But through a series of unfortunate events, I lost the video. I actually recorded the video three times because my computer kept crashing as I was recording it. This was on top of increasing busyness on my part with teaching, proposal writing,...
Hey folks, I really enjoyed teaching a one-day, introduction to ggplot2 workshop last week. It was a lot of fun - I enjoyed teaching the principles behind ggplot2. I’ve been noticing many learners (and teachers) focusing on making templates that they can recycle to make variations on a common plot type. This is how I often teach ggplot2 and the rest of the tidyverse - it’s also how I learned R. In the most recent workshop I was testing a hypothesis that teaching concepts would yield more long...
Hey folks, If you’re interested in participating in a 1-day (6 hours) data visualization workshop, you’re running out of time to register. I’ll be teaching this workshop on May 9th. I will cover an introduction to the ggplot2 package and will assume no prior R knowledge. My goal is to help you to understand the ggplot2 framework and begin to apply it to make some interesting and compelling visualizations. After this workshop, you should be able to learn more advanced topics on your own. You...