Creating a raster map of global climate change in R with ggplot2's geom_raster (CC227)
Channel: Riffomonas Project
Date: 2022-07-05

Pat uses R to create a faceted raster map displaying the annual global temperature anomalies between 1950 and 2021 using functions from ggplot2. Beyond introducing the geom_raster function, Pat will also compare facet_wrap and facet_grid and demonstrate how to format the appearance of the facet labels. The result is a very cool visualization of the change in temperature across the world for the past 70+ years. He also makes use of tools from the dplyr, ggplot2, and other packages from the tidyverse. The data depicted are the average annual temperature anomalies by latitude and longitude using NASA's GISS data. All of this is done in R with the help of RStudio.

You can find my blog post for this episode at https://www.riffomonas.org/code_club/2022-07-05-anomaly-map.

#geom_raster #facet_grid #facet_wrap #ggplot2 #Rstudio #climatechange #R #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
2:45 Creating global map of temperature anomalies for one year
6:08 Stylizing appearance of single panel
9:48 Create faceted version of figure for all years
14:38 Stylizing appearance of facets
16:30 Improve appearance of colors
19:02 Change legend location and format appearance
22:19 Finishing touches