Watch the world warm with this animated globe, created with R

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Due to anthropogenic climate change, the average global temperature has increased steadily over the past decade or so. While we're all familiar with the hockey-stick line chart of rising temperature, the change is even more dramatic on this animated globe showing the local effects of climate change.

The first half of the animation shows the monthly local change compared to historic averages (blue is cooler; red is warmer). The second half of the animation repeats the cycle, but introduces a moving 10-year smoother to reduce the variability in the temperature changes, making the global temperature increase much more apparent in the forecast part of the animation. The overlaid time series shows the global average temperatue deviations from the historical average, in degrees Celcius.

This animation was created by Matt Leonawicz, Lead Statistical Analyst at the Scenarios Network for Alaska and Arctic Planning, using the R language. He created a custom R package called “mapmate” (available on Github) to convert tile-based flat maps like this:


and converts them into a globe projection at a selected angle of view, like this:


The package also automates the process of creating and saving the frames of an animation for later assembly in a video-production tool. For this animation, Matt made extensive use of the walk function from the purrr package to cycle through the different viewing angles needed in each frame to make the globe rotate in the video. The computations can be quite time consuming, but Matt used a 32-CPU Linux server and the mclapply function to process frames in parallel and speed up the process. 

For more on the animation and how it was created, read Matt's detailed post linked below.

SNAP Tech: Animate maps with mapmate: R package for map- and globe-based still image sequences

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)