Creating a raster map of global climate change in R with ggplot2's geom_raster (CC227)

July 5, 2022 • PD Schloss • 1 min read

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.

Code

You can browse the state of the repository at the