Hey folks, It’s been a couple of months since I sent out a newsletter. The truth is that I was out of ideas for code smells and didn’t really have anything to say. I’m going to try out a new series that I hope you’ll like. My 19 year old son is very talented mechanically. If a piece of equipment stops working, he can come up with a series of possible diagnoses and methods to test them. He also knows the most likely and cheapest path to hone in on the solution. He has been known to fabricate parts to get things working again. My 14 year old daughter loves to knit and crochet. Recently, she’s been making potted plants and animals without looking at a plan. She tells me how she can see other things she’s made in each of the parts of the project. Then she has to figure out how to adjust them for her purpose and put them all together. I could tell you similar stories with my other kids’ eclectic interests and skills. It occurred to me recently that this is a lot like looking at a plot and mentally taking the plot apart in my mind to ask how the author might have made it. I think this is a skill that is critical not just to learning how to make plots, but to breaking free from the ruts that scientists get into when they make the same type of plot over and over. My pet peeve is people asking me how to make a specific plot from a specific set of data. That is a very transactional question. It’s like needing to use a cook book to cook everything you eat. Cook books are great, but if you find yourself missing a critical ingredient or if something goes wrong, will you be able to adapt rather than starve? My goal for you is to show you that you can take data in any format to make any of a number of figures. You can do this by taking elements from all of your past experiences to make something that is yours. In the coming weeks I’m going to use this newsletter to help you see how I think through deciphering how figures were made. Let me know what you think. I would love it if you could send me figures to use in future newsletters! My question isn’t what do you like and what don’t you like about a figure. Rather, the question is, “How would you make a figure in R?” This is an exercise that you should be able to do with a pen and paper. Take a minute to look at the figure I share and try to answer the question at a high level. Don’t worry about the exact function names, packages, or arguments. Let’s try it out. Here’s a random figure that I found in the most recent issue of the journal mSphere. It’s Figure 1A from the paper, “Exploring novel microbial metabolites and drugs for inhibiting Clostridioides difficile” by Ahmed Abouelkhair and Mohamed Seleem. The figure shows the level of inhibition of bacterial growth by 527 compounds; 63 of the compounds were deemed “strong hits” because they inhibited growth by at least 90%. Imagine what the data frame looks like, what are the columns? What types of data are in each column? What are the parts of the figure? What functions would you use to generate each part? What happens if there are multiple options? Even if you don’t remember what the function is named, write what it needs to do. What did they have to turn “on” or “off” to generate the figure? Write the answer out in sentences with some prediction of what you think will happen and the tradeoffs you might encounter. Don’t worry about writing code that will run. That’s the next step when you have real data. Next week, I’ll share my response with you. I would love it if you were to send me one of your favorite figures! Then in a future newsletter I’ll share with others how I would break it down.
|
Hey folks, I’ve now produced three livestream videos. What do you think? Do you watch them live or watch them later? Or are they too long? I’m looking for honest feedback! I have to admit that if I hadn’t livestreamed these videos, they would not have been produced. It’s nice that I can more or less record and post without any editing. This is still a bit of an experiment. I think fewer people are watching the episodes which makes me worry that this might be an overall step backwards for you...
Hey folks! Do you ever get that feeling where you’re scared to try something? But then you do it anyway… and it turns out way better than you expected? Well that was me on Wednesday morning. I ran my first livestream on YouTube recreating a ridgeline plot from Our World in Data showing the US baby boom. I wrote about it here in the newsletter back in May. The full session was about 2.5 hours. YouTube tells me that 272 people popped in at some point during the session. To be honest, I really...
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,...