emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Embed Interactive Charts from R/Google Visualization API into Web Pa


From: Feiming Chen
Subject: [O] Embed Interactive Charts from R/Google Visualization API into Web Page Generated with Emacs-Org-Babel Mode
Date: Wed, 18 Jul 2012 13:51:08 -0700 (PDT)

Hi, I would like to submit a simple example of embedding interactive charts in emacs-org-babel mode.   I am very excited after discovering these tools.  See the attached .org and .html file.  Thanks!

Sincerely,
Feiming Chen

Embed Interactive Charts from R/Google Visualization API into Web Page Generated with Emacs-Org-Babel

Table of Contents

1 Introduction

The R package googleVis provides a R interface into the Google Visualisation API, the latter of which offers interactive charts that can be embedded into web pages. Using Emacs-Org-Babel mode, we can easily generate a web page with embedded interactive chart based on a R data frame object. Following is an example R source code block:

#+begin_src R :exports both :results output html
  library(googleVis)
  data(Fruits)
  m <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
  print(m, 'chart')
#+end_src

You would then see the embedded interactive chart in the html file exported from Emacs-Org mode via a web server.

If you want to view the chart (a Flash object) in a local file, as you usually do when editing an .org file, you would need to change your Flash security settings according to this solution quoted below by Tony Breyal:

  1. Go to http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
  2. Click on the dropbox which says 'Edit location' and choose 'add location'
  3. Click 'browse for folder'
  4. Choose the folder in which you saved your html file
  5. Click OK

Date: 2012-07-18 16:38:45 EDT

Author: Feiming Chen

Org version 7.7 with Emacs version 23

Attachment: googleVis2web.org
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]