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.
|
Hey folks, I’m at the end of a day after I pulled an all-nighter trying to hit a grant proposal deadline. I don’t recall ever doing this in college. I seem to pull an all-nighter every five years or so. I’m too old for this! Anyway, the proposal is in and now I’m ready to move on to fun things… like talking to you about visualizing data! A few years back Whitney Battle-Baptiste and Britt Rusert put together an amazing collection of visualizations by WEB DuBois that he presented at the 1900...
Hey folks, Wow, I really didn’t expect my overview of Positron to resonate with so many people last week on YouTube! I’ll work on coming up with another video showing Virtual Studio Code (VS Code) in action. As others have mentioned in the episode’s comments, I’m not really sure why Posit is building Positron instead of making things easier within VS Code for R users. To me the need for an IDE that allows people to use multiple programming languages is a red herring - VS Code does that...
Hey folks, I hope you’ve noticed that this newsletter and the YouTube channel have nearly caught up. At this point there’s a 10-day lag between when I post a newsletter describing a data visualization and when I post the recreation video. I could possibly push that to a 3-day lag, but I’d like people to have a chance to work through the code on their own before I give my solution. After having existential dread last week that I’d never find another good plot to share, it appears my cup...