Tuesday, 28 May 2013

Interactive presentation with slidify and googleVis

Last week I was invited to give an introduction to googleVis at Lancaster University. This time I decided to use the R package slidify for my talk. Slidify, like knitr, is built on Markdown and makes it very easy to create beautiful HTML5 presentations.

Introduction to googleVis

Separating content from layout is always a good idea. Markup languages such as TeX/LaTeX or HTML are built on this principle. Ramnath Vaidyanathan has done a fantastic job with slidify, as it is very straightforward to create presentations with R. There are a couple of advantages compared to traditional presentation software packages:
  • RMarkdown helps me to focus on the content
  • Integration of R code is build in
  • HTML5 allows me to embed interactive content, such as
    • Videos
    • googleVis and other interactive charts
    • shiny apps (more on this next week)
In the past I have used knitr in combination with pandoc to generate a slidy presentation. However, with slidfiy I can do all this in R directly. And better, Ramnath provides me with a choice of different layout frameworks and syntax highlighting options. Finally to top it all, publishing the slides on Github was only one more R statement: publish('mages', 'Introduction_to_googleVis').

I will give a half-day tutorial on googleVis with Diego de Castillo at useR2013! in Albacete on 9 July 2013. I hope to see some of you there.

1 comment:

  1. Hi Jake,

    Make sure you set the argument results='as.is' in your code knitr chunks, e.g.

    ```{r motionchartcode, results='asis'}
    library(googleVis)
    plot(gvisMotionChart(Fruits, "Fruit", "Year",
    options=list(width=600, height=400)), tag="chart")
    ```

    See also section 4 of the googleVis vignette. If this doesn't help send me an email with a minimal reproducible example.

    Cheers

    Markus

    ReplyDelete