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

October 11, 2016
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

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:

Mapmate1

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

Mapmate2

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.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

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)