Programmatically create interactive Powerpoint slides with R

October 12, 2015
By

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

Powerpoint is a powerful application for creating presentations, and allows you to include all sorts of text, pictures, animations and interactivity to create a compelling story. Most of the time you'll use the Powerpoint application to create slides, but if you want to include data and/or charts in your slides, in the interests of reproducibility you may want to automate the slide creation process. By using the R language with the Powerpoint API, you can recreate your slides in an instant whenever your data changes.

Asif Salam has created a nice tutorial showing how to use the RDCOMClient package to do exactly that. In the tutorial, Asif goes through the steps of creating the interactive visualization of Clint Eastwood's box office earnings shown below (and which you can also download as a PPT file):

 

The tutorial is in three parts:

  1. The basics: using the Powerpoint API to create slides and add content (with some use of VBA for animations).
  2. Getting data: scraping data from IMDB on Clint Eastwood films and earnings. This part isn't specific to Powerpoint, and of course you can use any data you like in a presentation.
  3. Creating a slide: adding elements to a slide using R objects and functions, and creating the animation.

The complete R code and data behind this animated slide is available on GitHub, and will serve as a useful starting point for your own automated slide generation.

By the way, if your needs are simpler and you just want to create static Powerpoint slides from R (with text, data, and graphics), take a look at Slidify. With Slidify, you can generate Powerpoint slides from R using just a Markdown document.

Asif Salam: Create amazing PowerPoint slides using R – The basics

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)