emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Embed Interactive Charts from R/Google Visualization API into Web Page Generated with Emacs-Org-Babel Mode
@ 2012-07-18 20:51 Feiming Chen
  2012-07-18 22:23 ` Thomas S. Dye
  0 siblings, 1 reply; 2+ messages in thread
From: Feiming Chen @ 2012-07-18 20:51 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 230 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 453 bytes --]

[-- Attachment #2: googleVis2web.html --]
[-- Type: text/html, Size: 7118 bytes --]

[-- Attachment #3: googleVis2web.org --]
[-- Type: application/octet-stream, Size: 1630 bytes --]

#+TITLE: Embed Interactive Charts from R/Google Visualization API into Web Page Generated with Emacs-Org-Babel
#+AUTHOR: Feiming Chen
#+EMAIL: Feiming_Chen@bd.com

* 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_example
#+begin_src R :exports both :results output html
  library(googleVis)
  data(Fruits)
  m <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
  print(m, 'chart')
#+end_src
#+end_example

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

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

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 [[http://stackoverflow.com/questions/8009825/cannot-view-gvismotionchart-from-printed-html-file][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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Embed Interactive Charts from R/Google Visualization API into Web Page Generated with Emacs-Org-Babel Mode
  2012-07-18 20:51 Embed Interactive Charts from R/Google Visualization API into Web Page Generated with Emacs-Org-Babel Mode Feiming Chen
@ 2012-07-18 22:23 ` Thomas S. Dye
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas S. Dye @ 2012-07-18 22:23 UTC (permalink / raw)
  To: Feiming Chen; +Cc: emacs-orgmode

Aloha Feiming Chen,

Thanks for the pointer to googleVis.  

All the best,
Tom

Feiming Chen <feimingchen@yahoo.com> writes:

> 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
> <style type="text/css"><!-- DIV {margin:0px;} --></style>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
>
>
>
>
>

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-18 22:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-18 20:51 Embed Interactive Charts from R/Google Visualization API into Web Page Generated with Emacs-Org-Babel Mode Feiming Chen
2012-07-18 22:23 ` Thomas S. Dye

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).