Pat creates a 'tornado plot' depicting climate change using the ggplot2 R package by plotting the temperature anomaly for April and October by year. The data depicted are monthly temperature anomalies by month using NASA's GISS data using tools from the ggplot2 R package. This figure shows the deviation in annual global mean temperatures from the normalized temperatures of 1951 to 1980 as a series of line segments created using ggplot2's geom_segment function. The lines are colored according to the size of the temperature anomaly. All of this is done in R with the help of RStudio.
You can find my blog post for this episode at www.riffomonas.org/code_club/....
#ggplot2 #geom_segment #Rstudio #climatechange #R #Rstats
Want more practice on the concepts covered in Code Club? You can sign up for my weekly newsletter at 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 riffomonas.org/workshops/
You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: www.riffomonas.org/minimalR/
General data: www.riffomonas.org/generalR/
0:00 Introduction
1:33 Creating initial version of tornado plot
5:40 Creating color gradient
6:53 Creating vertical gridlines
7:48 Modify appearance of figure
11:14 Stylize line segments
12:46 Creating labels for gridlines
15:56 Adding year labels
1 авг 2024