Visualizing correlation with double y-axes using the ggplot2 R package (CC235)
Channel: Riffomonas Project
Date: 2022-08-01

Should you visualize your data using double y-axes? In this Code Club, Pat will show how to assess correlations using ggplot2 using faceted line plots, line plots on double y-axes, and using a scatter plot. Finally, he'll use cor.test there's a lot of other great gems to be found in the episode.


You can find my blog post for this episode at https://www.riffomonas.org/code_club/2022-08-01-temp_prcp_correlation.

#ggplot2 #dplyr #R #Rstudio #Rstats

Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at https://shop.riffomonas.org/youtube to get practice problems, tips, and insights.

If you're interested in taking an upcoming 3 day R workshop be sure to check out our schedule at https://riffomonas.org/workshops/

You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/

0:00 Introduction
1:02 Calculating average annual temperature and total precipitation data
5:21 Creating a faceted line plot
8:39 Creating a line plot with a double y-axis
13:16 Rescaling both y-axes
17:58 Should we use double y-axes?
19:44 Plotting variables against each other
21:03 Measuring correlation between variables