Hey folks, I somehow got through the month of March without a plot to commemorate the 5th anniversary of the COVID-19 pandemic. It is hard to believe that it has been five years. I know that my life and how I work has radically changed because of the pandemic. I started posting videos to YouTube and writing newsletters during the pandemic to help people who wanted to learn to use R while they were locked out of their labs. At one point I taught a workshop for U of Michigan researchers that had over 100 participants. That nearly broke me! Well if you or a friend are interested in taking a workshop I have something new to announce. On May 9th I will be teaching a live, one-day workshop on the basics of the ggplot2 R package and the grammar of graphics. It will be taught via Zoom (remember Skype or BlueJeans!?!) and is designed for people new to R or ggplot2. I hope to give people a mental model for thinking about ggplot2 that will enable them to continue learning about the tool well beyond the workshop. You can learn more and register by clicking the button below. Feel free to email me if you have any questions.
Let me know if you’d like to see other one or part day workshops offered related to the types of things I discuss in the newsletter or over on YouTube. On the topic of things that have changed because of the pandemic, the New York Times published a cool article. The article, “30 Charts That Show How Covid Changed Everything” includes 30 charts showing different aspects of life that have changed before and after March 2020. There are a few plots that I thought were fascinating, so I might make two of these on YouTube in the coming weeks. For this newsletter, the last visual in the series really struck me. The number of “Total U.S. deaths” from 2015 to 2025 It was obvious that the number of deaths spiked in the years after the pandemic. But I was struck that although the periodicity of deaths has returned to a pre-pandemic cadence, the average number of deaths per week is still higher than it was pre-pandemic. Aside from the story told by this visual, a few things stood out to me that I wondered how I would make in R. This is obviously a line plot. I imagine that I can get the number of deaths per week from the CDC and that data would have a date column and a number of deaths column. To get a two toned line, I’d create a new column based on whether the date was before or after March 2020. Then I’d map that column to the color aesthetic, the date to the x aesthetic, and the number of deaths to y aesthetic. I’d make the line plot using I think the element of this plot that really got my attention was the two toned background. I never see that. The entire left side of the article is a gray color (#EEEEEE) and the right is a red color (#FCF0E9). If you look closely, there is a white center line. How would we do that in a figure so that even the background has two colors? Here’s what I would do. First, I would use
It worked! Run it and see for yourself. Next, I liked the use of the reference line for the 2015-2019 average. I’d likely get that using Finally, the simple title in the upper right corner stood out to me. I never think about the background color of my title because I’m always working with a white background. But… the Give the 30 charts in the article a scan. Let me know if there’s one that sticks out to you that you would like me to try to recreate.
|
Hey folks, I’m gearing up to teach a 1-day (6 hours) data visualization workshop on May 9th. This workshop 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. From this workshop, I hope that you would be able to go off on your own journey learning more advanced topics. You can learn more and register by clicking the button...
Hey folks, Long time friends of Riffomonas know that I’ve been teaching data science classes for close to 20 years. The hallmark of my teaching has been three-day workshops where I either teach R (here and here) or the mothur software package. I’ve gotten feedback that three days is just too much time for people to carve out of their busy schedules. So, I’m excited to be offering a 1-day (6 hours) data visualization workshop on May 9th. This will cover an introduction to the ggplot2 package....
Hey folks, I’m really excited to be offering a 1-day (6 hours) data visualization workshop on May 9th. It will cover the basics of ggplot2. If you’ve been following along this newsletter for anytime, you know I’ve thought a lot about how we learn. A critical element of learning is to create a mental model that we can hang ideas on to flesh out our understanding of a concept. The “grammar of graphics” is one such mental model for building plots. It is instantiated in ggplot2 - that’s the “gg”...