Hey folks, I hope you all are doing well! Before digging into today’s figure, I wanted to remind you that I’m offering a new interactive training opportunity. The goal is to provide greater opportunities to hone your skills in a social setting. My experience with leading this approach has been excellent. I can’t wait to have you give it a try with me. Please let me know if you have any questions. This week, I’m grateful to Georg Andersson for sharing an interesting figure with me from Sweden. Thank you, Georg! If you have a plot you’d like to share, please let me know. He included the following commentary: Here is a figure on what different values people get from agricultural landscape from a survey. The values are plotted in how frequent it was reported from the persons in the survey and distinguished between two groups, farmers and non-farmers. The colour of the dots are according to how big the difference were between the group.
Sorry for the values being in Swedish. :-)
Biologisk mångfald = Biodiversity
Öppna landskap = Open landscapes Rekreation/Naturupplevelse = Recreation / nature experience
Kultur/Historiska värden = Cultural and historical values
Estetiska värden = Aesthetical values
Lugn och ro = Peace and quiet
Looking at a broad overview of the figure, I first tried to interpret the visual myself. It appears that both farmers and non-farmers value biodiversity highly and ecosystem services (Ekosystemtjanster) quite low. Farmers tend to prefer open landscapes higher than non-farmers while non-farmers tend to prefer recreation and nature experience more than farmers. Living in a rural area on a farm, my experience resonates with these data! Georg mentioned that there was a survey that was given to farmers and non-farmers. I can imagine there’s a data frame somewhere with a As I mentioned, for all the extra ornamentation, this is a scatter plot. Whenever I see a scatter plot, my mind immediately thinks, Beyond moving on to the elements of the figure that could be driven by the To overcome these challenges, the {ggrepel} package is a great tool. I has some great tools to move the labels so they don’t overlap and it can add arrows to indicate which point each label corresponds to. Long time followers may recall two videos I made using {ggrepel} regarding opinions by country on a vaccine for COVID-19. One video was for a scatter plot similar to this one and another was for a slope plot version of the same data. This package also has features to allow you to only show labels for specific points. Beyond paired survey data like we have in this example, I’ve seen {ggrepel} also used in scatter plots commonly called “volcano plots” where an investigator wants to highlight specific genes. This is a great package to be familiar with! Let’s move to thinking about some of the theming options that could get a default {ggplot2} figure to more closely resemble this figure’s appearance. First, I notice that the x-axis and legend labels are tilted. The bottom axis could be modified using the For a relatively “simple” figure, this actually has a lot going on. If you’d like to play around with generating your own version, here’s some data to play around with
Finally, I’d love to see what types of figures that interest you. Please be like Georg and send me some examples of things that catch your eye. Also, as I come to the end of the current YouTube channel series building an R package, let me know whether you’d like me to take this verbal analysis of figures and translate it to real R code that I develop in video form.
|
In case you missed it, I have nine kids ranging in age from 23 to 7 that my wife homeschools. They’re a riot. Each of them has to find a way to be different from all of the others. This makes for some real characters. Let me introduce you to Peter. This week, Peter, who is 11, has been working on a times table. You may remember these from when you were a kid. Say you want to know what 7 times 8 is (this was always my hardest “times” to remember). You take your finger down the rows to the...
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...
Hey folks, We’re still slogging our way through Thanksgiving leftovers. As time passes from last Thursday, there’s a fine line between setting a good example about not wasting food and setting a bad example by getting every food poisoning! Speaking of eating, our teeth are pretty important, don’t you think? In the US, Trump’s expected head for the Department of Health and Human Services has a number of interesting views about health. One example is that its a bad idea to spike our drinking...