[med-svn] [r-cran-googlevis] 07/09: New upstream version 0.6.2

Andreas Tille tille at debian.org
Fri Sep 29 19:19:36 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-googlevis.

commit f11fb93c4cb50d7cf3b37f1a4595a68460f3187f
Author: Andreas Tille <tille at debian.org>
Date:   Fri Sep 29 21:17:15 2017 +0200

    New upstream version 0.6.2
---
 DESCRIPTION                                        |    36 +
 MD5                                                |   138 +
 NAMESPACE                                          |    43 +
 NEWS                                               |   819 ++
 R/gadget.R                                         |    17 +
 R/gvis.R                                           |   677 +
 R/gvisAnnotatedTimeLine.R                          |   310 +
 R/gvisAnnotationChart.R                            |   224 +
 R/gvisBubbleChart.R                                |   165 +
 R/gvisCalendar.R                                   |   144 +
 R/gvisChartEditor.R                                |    36 +
 R/gvisCoreCharts.R                                 |   901 ++
 R/gvisGeoChart.R                                   |   277 +
 R/gvisGeoMap.R                                     |   208 +
 R/gvisHistogram.R                                  |   107 +
 R/gvisIntensityMap.R                               |   129 +
 R/gvisMap.R                                        |   163 +
 R/gvisMethods.R                                    |   188 +
 R/gvisMotionChart.R                                |   342 +
 R/gvisOrgChart.R                                   |   142 +
 R/gvisPieGaugeChart.R                              |   202 +
 R/gvisSankey.R                                     |   118 +
 R/gvisTable.R                                      |   127 +
 R/gvisTimeLine.R                                   |   158 +
 R/gvisTreeMap.R                                    |   262 +
 R/shiny.R                                          |    92 +
 R/zzz.R                                            |   108 +
 README.md                                          |    55 +
 THANKS                                             |    74 +
 build/googleVis.pdf                                |   Bin 0 -> 333358 bytes
 build/vignette.rds                                 |   Bin 0 -> 406 bytes
 data/Andrew.RData                                  |   Bin 0 -> 1530 bytes
 data/Cairo.RData                                   |   Bin 0 -> 7980 bytes
 data/CityPopularity.RData                          |   Bin 0 -> 260 bytes
 data/Exports.RData                                 |   Bin 0 -> 305 bytes
 data/Fruits.RData                                  |   Bin 0 -> 381 bytes
 data/OpenClose.RData                               |   Bin 0 -> 255 bytes
 data/Population.RData                              |   Bin 0 -> 6821 bytes
 data/Regions.RData                                 |   Bin 0 -> 329 bytes
 data/Stock.RData                                   |   Bin 0 -> 474 bytes
 data/dino.RData                                    |   Bin 0 -> 756 bytes
 debian/README.test                                 |     8 -
 debian/changelog                                   |    18 -
 debian/compat                                      |     1 -
 debian/control                                     |    26 -
 debian/copyright                                   |   285 -
 debian/docs                                        |     2 -
 debian/examples                                    |     1 -
 debian/rules                                       |     8 -
 debian/source/format                               |     1 -
 debian/tests/control                               |     3 -
 debian/tests/run-unit-test                         |    19 -
 debian/watch                                       |     3 -
 demo/00Index                                       |     6 +
 demo/AnimatedGeoChart.R                            |   148 +
 demo/EventListener.R                               |    34 +
 demo/Roles.R                                       |   152 +
 demo/Trendlines.R                                  |    52 +
 demo/WorldBank.R                                   |    44 +
 demo/googleVis.R                                   |   452 +
 inst/CITATION                                      |    17 +
 inst/brew/Stock.html                               |    55 +
 inst/brew/andrew.html                              |    38 +
 inst/doc/Using_Roles_via_googleVis.R               |   146 +
 inst/doc/Using_Roles_via_googleVis.Rmd             |    58 +
 inst/doc/Using_Roles_via_googleVis.html            |  1746 +++
 inst/doc/Using_Trendlines_with_googleVis.R         |    47 +
 inst/doc/Using_Trendlines_with_googleVis.Rmd       |    35 +
 inst/doc/Using_Trendlines_with_googleVis.html      |   814 ++
 inst/doc/Using_googleVis_with_knitr.R              |    30 +
 inst/doc/Using_googleVis_with_knitr.Rmd            |    56 +
 inst/doc/Using_googleVis_with_knitr.html           |   832 ++
 inst/doc/googleVis.R                               |   459 +
 inst/doc/googleVis.Rnw                             |  1440 +++
 inst/doc/googleVis.pdf                             |   Bin 0 -> 587334 bytes
 inst/doc/googleVis_examples.R                      |   331 +
 inst/doc/googleVis_examples.Rmd                    |   184 +
 inst/doc/googleVis_examples.html                   | 12741 +++++++++++++++++++
 inst/gadgets/gadgets.R                             |   165 +
 inst/mansections/GoogleChartToolsURL.txt           |     2 +
 .../GoogleChartToolsURLConfigOptions.txt           |     2 +
 inst/mansections/gvisOptions.txt                   |    52 +
 inst/mansections/gvisOutputStructure.txt           |    43 +
 inst/rsp/index.rsp                                 |   158 +
 inst/rsp/myAnalysis/index.rsp                      |    27 +
 inst/rsp/src/simpleFooter.rsp                      |     6 +
 inst/rsp/src/simpleHead.rsp                        |    10 +
 inst/rsp/src/simpleHeader.rsp                      |    36 +
 inst/shiny/server.R                                |    15 +
 inst/shiny/ui.R                                    |    10 +
 man/Andrew.Rd                                      |    56 +
 man/Cairo.Rd                                       |    27 +
 man/CityPopularity.Rd                              |    31 +
 man/Exports.Rd                                     |    23 +
 man/Fruits.Rd                                      |    31 +
 man/OpenClose.Rd                                   |    35 +
 man/Population.Rd                                  |    36 +
 man/Regions.Rd                                     |    29 +
 man/Stock.Rd                                       |    56 +
 man/createGoogleGadget.Rd                          |    52 +
 man/dino.Rd                                        |    27 +
 man/googleVis-package.Rd                           |    45 +
 man/gvisAnnotatedTimeLine.Rd                       |   227 +
 man/gvisAnnotationChart.Rd                         |   202 +
 man/gvisAreaChart.Rd                               |   101 +
 man/gvisBarChart.Rd                                |   123 +
 man/gvisBubbleChart.Rd                             |   124 +
 man/gvisCalendar.Rd                                |   105 +
 man/gvisCandlestickChart.Rd                        |   108 +
 man/gvisColumnChart.Rd                             |   100 +
 man/gvisComboChart.Rd                              |   100 +
 man/gvisGauge.Rd                                   |    79 +
 man/gvisGeoChart.Rd                                |   207 +
 man/gvisGeoMap.Rd                                  |   156 +
 man/gvisHistogram.Rd                               |    90 +
 man/gvisIntensityMap.Rd                            |    95 +
 man/gvisLineChart.Rd                               |   119 +
 man/gvisMap.Rd                                     |   120 +
 man/gvisMerge.Rd                                   |   150 +
 man/gvisMethods.Rd                                 |   347 +
 man/gvisMotionChart.Rd                             |   189 +
 man/gvisOrgChart.Rd                                |    99 +
 man/gvisPieChart.Rd                                |    87 +
 man/gvisSankey.Rd                                  |    85 +
 man/gvisScatterChart.Rd                            |   125 +
 man/gvisSteppedAreaChart.Rd                        |   103 +
 man/gvisTable.Rd                                   |   100 +
 man/gvisTimeline.Rd                                |   124 +
 man/gvisTreeMap.Rd                                 |   213 +
 man/renderGvis.Rd                                  |    78 +
 vignettes/Using_Roles_via_googleVis.Rmd            |    58 +
 vignettes/Using_Trendlines_with_googleVis.Rmd      |    35 +
 vignettes/Using_googleVis_with_knitr.Rmd           |    56 +
 vignettes/figures/Apostrophe.pdf                   |   Bin 0 -> 18106 bytes
 vignettes/figures/CambR_googleVis_29_May_2012.pdf  |   Bin 0 -> 57570 bytes
 vignettes/figures/CreatePost.pdf                   |   Bin 0 -> 56651 bytes
 vignettes/figures/Editor.pdf                       |   Bin 0 -> 58679 bytes
 vignettes/figures/MarkdownExample.pdf              |   Bin 0 -> 113483 bytes
 vignettes/figures/MotionChart.pdf                  |   Bin 0 -> 46734 bytes
 vignettes/figures/Options.pdf                      |   Bin 0 -> 15964 bytes
 vignettes/figures/Rook.pdf                         |   Bin 0 -> 69007 bytes
 vignettes/figures/googleVisDemoPlots.pdf           |   Bin 0 -> 71645 bytes
 vignettes/figures/googleVisTutorial2013.png        |   Bin 0 -> 56548 bytes
 vignettes/figures/gvisGeoChart.pdf                 |   Bin 0 -> 25275 bytes
 vignettes/figures/gvisMerge.pdf                    |   Bin 0 -> 41539 bytes
 vignettes/figures/gvisObject.pdf                   |   Bin 0 -> 52255 bytes
 vignettes/figures/shiny.pdf                        |   Bin 0 -> 76983 bytes
 vignettes/googleVis.Rnw                            |  1440 +++
 vignettes/googleVis.bib                            |   382 +
 vignettes/googleVis_examples.Rmd                   |   184 +
 vignettes/mystyle.css                              |   270 +
 151 files changed, 33334 insertions(+), 375 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
new file mode 100644
index 0000000..b33f540
--- /dev/null
+++ b/DESCRIPTION
@@ -0,0 +1,36 @@
+Package: googleVis
+Type: Package
+Title: R Interface to Google Charts
+Version: 0.6.2
+Date: 2017-01-01
+Authors at R: c(person("Markus", "Gesmann", role = c("aut", "cre"),
+    email = "markus.gesmann at googlemail.com"),
+    person("Diego", "de Castillo", role = "aut",
+    email = "decastillo at gmail.com"),
+    person("Joe", "Cheng", role = "ctb",
+    email = "joe at rstudio.com"))
+Description: R interface to Google's chart tools, allowing users
+    to create interactive charts based on data frames. Charts
+    are displayed locally via the R HTTP help server. A modern
+    browser with an Internet connection is required and for some
+    charts a Flash player. The data remains local and is not
+    uploaded to Google.
+Depends: R (>= 3.0.2)
+Imports: methods, jsonlite, utils
+Suggests: shiny (>= 0.4.0), httpuv (>= 1.2.0), knitr (>= 1.5), wbstats,
+        data.table
+License: GPL (>= 2)
+URL: https://github.com/mages/googleVis#googlevis
+BugReports: https://github.com/mages/googleVis/issues
+LazyLoad: yes
+LazyData: yes
+VignetteBuilder: knitr
+RoxygenNote: 5.0.1
+NeedsCompilation: no
+Packaged: 2017-01-01 09:36:48 UTC; mages
+Author: Markus Gesmann [aut, cre],
+  Diego de Castillo [aut],
+  Joe Cheng [ctb]
+Maintainer: Markus Gesmann <markus.gesmann at googlemail.com>
+Repository: CRAN
+Date/Publication: 2017-01-01 13:15:12
diff --git a/MD5 b/MD5
new file mode 100644
index 0000000..f7769f2
--- /dev/null
+++ b/MD5
@@ -0,0 +1,138 @@
+0bbcce384569b7043d2415cb94dcf605 *DESCRIPTION
+dabf610cd334a715593c726108738f04 *NAMESPACE
+f160398e9ae5806bbd43aa147789130d *NEWS
+e3be3e4cf3c043e4fe8ba406b5f0b3a7 *R/gadget.R
+4ddebae838bf69fb5c9b5af43933dcb6 *R/gvis.R
+af9bfafdb426c6b67534949056819fb2 *R/gvisAnnotatedTimeLine.R
+7819d7f4459f4bd4b0c1ab2dd9b9e68b *R/gvisAnnotationChart.R
+81e09ca728dca0a0da0a3cb08f52a3a4 *R/gvisBubbleChart.R
+925ffbee67b743f53808a5780f9c719a *R/gvisCalendar.R
+ef907f89877ca91af78ed842226ff2ef *R/gvisChartEditor.R
+fe82ebf94facfc3ec44164a81765d0ad *R/gvisCoreCharts.R
+bee61af6869b77c8a64fdff73b58b211 *R/gvisGeoChart.R
+3439f75b8a3f9ee3a7fd7f997e0b1f33 *R/gvisGeoMap.R
+dc168599816e1f78cdac47d734b419fa *R/gvisHistogram.R
+1ef6669a03fdf36b004b4809791b8246 *R/gvisIntensityMap.R
+14e9f08f3770ed5b1c15604734cbc092 *R/gvisMap.R
+8b04f6218e60bd6838ada520e0a314f3 *R/gvisMethods.R
+498255452553e0f40c68e2c377826831 *R/gvisMotionChart.R
+cfe327f6e80262823c3af785a7255671 *R/gvisOrgChart.R
+cf3d3adcd7f20039573ca900ca24df8e *R/gvisPieGaugeChart.R
+8b1f3eef308a57adf205268cb49e07ab *R/gvisSankey.R
+a7946e4e91e922e1311349df2ac13d06 *R/gvisTable.R
+feb01155621a32f59bc4d02beca4fca0 *R/gvisTimeLine.R
+b306c3f1ddbebb4954427210a6c1ca08 *R/gvisTreeMap.R
+3cb7f0d7784626dd08c62cf654002a7c *R/shiny.R
+11479094dd7d48ec36a06861d44574bf *R/zzz.R
+a3fcba290103702be5c6343f979e64c3 *README.md
+2b2c926ae2970ffa848190f7088693db *THANKS
+97b63aba1f8fba05a3b6739b90751d24 *build/googleVis.pdf
+2f23fd3fc61d0c9ee5a093b57de47886 *build/vignette.rds
+91d0506c4220a2d76d3b266771c52f4f *data/Andrew.RData
+e66d6f02a338720ff56db4bd6fdfb45d *data/Cairo.RData
+9ede3722aaebc936f558114245a773a3 *data/CityPopularity.RData
+3ae1178e0a0eecd025b0f4354a33a577 *data/Exports.RData
+6c8b845f1bdcce3677c209ccb55d9da3 *data/Fruits.RData
+772a6d14414127877e1f0b0c9453673e *data/OpenClose.RData
+9c3cc6c88effbb2c08c03a06abfa8e4c *data/Population.RData
+3c9733a2813e42dd61d4b91179ff208a *data/Regions.RData
+4d88f26391a249cf96b9185421d004d3 *data/Stock.RData
+fc5f40ff03b9367e36e8809a5e04063f *data/dino.RData
+2a7e430a547349e3a9bddce45ebe6c05 *demo/00Index
+59669c21bc899ea56ddf64ef7adf8d7d *demo/AnimatedGeoChart.R
+fb793493a4732d83932e19a1fac5a55f *demo/EventListener.R
+dca3f09bbd1f423bc5e85ce7b85d0080 *demo/Roles.R
+434dc999b2aa1c770ebebc82118aa3de *demo/Trendlines.R
+734e8e453cbb54cae65f58b4fc2bbaae *demo/WorldBank.R
+6e4fa9135a5fae0cbdd661054b7400fa *demo/googleVis.R
+3d422a5fc8b614f85d8d3dbc24167222 *inst/CITATION
+621850237bec2e1ec35c18b5bbad0a71 *inst/brew/Stock.html
+7d32eb1b8e26daacf08eefd3077ce114 *inst/brew/andrew.html
+55690fc11a0aa76f867cbecde6f2ff9b *inst/doc/Using_Roles_via_googleVis.R
+4e4d7dc8e7c02caa0ae936196995b569 *inst/doc/Using_Roles_via_googleVis.Rmd
+8bf0f143d89673d206c9581636e06f00 *inst/doc/Using_Roles_via_googleVis.html
+3c4b3a0b03bb21ffdbf5c699b60c9bbb *inst/doc/Using_Trendlines_with_googleVis.R
+ca37eea7fdee3ad583ae2d3135a58336 *inst/doc/Using_Trendlines_with_googleVis.Rmd
+97dfe7e37c2d383c9e7aee23ed092c60 *inst/doc/Using_Trendlines_with_googleVis.html
+f38eee773b68bf6fe2adcc477e9818a8 *inst/doc/Using_googleVis_with_knitr.R
+eb377f26d0f44e6e3ea16d2b808ef6c5 *inst/doc/Using_googleVis_with_knitr.Rmd
+2c365db85cbb4adae5f438c74b328f98 *inst/doc/Using_googleVis_with_knitr.html
+6090e99f3698206c3751fefa87a84865 *inst/doc/googleVis.R
+ffa12ad06488958398972715478777aa *inst/doc/googleVis.Rnw
+c58b2ccd1ad5b17f02221b30a677103e *inst/doc/googleVis.pdf
+a5c68079990d73cb07e60d3ecf758894 *inst/doc/googleVis_examples.R
+2588285da0540ecd38e39fe5f1b90b6e *inst/doc/googleVis_examples.Rmd
+1adf025b7bed62b618d6881f2f64a06b *inst/doc/googleVis_examples.html
+39089905a8af75c4f11c6f053d18480c *inst/gadgets/gadgets.R
+fa75729496b1fbfa042235c6e1c8fdf4 *inst/mansections/GoogleChartToolsURL.txt
+ddb7656486c4a2924d00c2e6cffb69ab *inst/mansections/GoogleChartToolsURLConfigOptions.txt
+8c59446a39186a10a0fa0fc8242f3681 *inst/mansections/gvisOptions.txt
+054f7bdacf7f2dc9dd67ff02db578fc0 *inst/mansections/gvisOutputStructure.txt
+8c799777c345cb22716f05d6e45aa7fa *inst/rsp/index.rsp
+a575c102a95e1406ef31bcffb78f50d1 *inst/rsp/myAnalysis/index.rsp
+590d5702e05b18d50af0d53c7c7860aa *inst/rsp/src/simpleFooter.rsp
+0ec4d2885bd1c2204847eeb7d0ac2d74 *inst/rsp/src/simpleHead.rsp
+6abee172b1c53548031523940cc57bdb *inst/rsp/src/simpleHeader.rsp
+5c2c2e115ad0a9faae1bc4ac20dc1ae6 *inst/shiny/server.R
+36327b9b981c5803e8a40882a844d39f *inst/shiny/ui.R
+bc2c03dfa42c10ef292829b749ead3d4 *man/Andrew.Rd
+55cab09ac1092e6f963d67fd476b8213 *man/Cairo.Rd
+68491a8d95cad3a6bbde41a546d5b4d0 *man/CityPopularity.Rd
+8229021483aabfef4519b4ad9b8c1bee *man/Exports.Rd
+7eb095ffc2c02f25789d0584c2022cbe *man/Fruits.Rd
+57cf56506046fbad388a9136d57b8760 *man/OpenClose.Rd
+760679ec7c9f9e6b33477d3a9b45d177 *man/Population.Rd
+29f086889764fe20a10eb1162a6c1849 *man/Regions.Rd
+3abceaa3ff2ea1308c903b3a683fdfc7 *man/Stock.Rd
+e64ea200e91c9ea8b622695c7ecd972e *man/createGoogleGadget.Rd
+014b4ee5222f5d83fddd92364d421089 *man/dino.Rd
+02286d7770b6c68baa1022ea8468211d *man/googleVis-package.Rd
+a4f173276052f87e3cb7e45fcb484f41 *man/gvisAnnotatedTimeLine.Rd
+9173b2572802fc0fd7f1d39dcc44de58 *man/gvisAnnotationChart.Rd
+83e178607bfb6087b994883ebd2876c0 *man/gvisAreaChart.Rd
+a6d59a421c0804d1ffaef0d7ea930e32 *man/gvisBarChart.Rd
+90870e1c5b86c11c378c5828af393a07 *man/gvisBubbleChart.Rd
+e37f2f7426c5595c6a3cc7b1cd505846 *man/gvisCalendar.Rd
+6e712bf9e650d11f7d3cde94f442d038 *man/gvisCandlestickChart.Rd
+8e32188ddb1789a2b2d4f533ae8dc332 *man/gvisColumnChart.Rd
+75ac448e5eb1765e92d49e0fd71acb33 *man/gvisComboChart.Rd
+c25a30f2fb340647f7cf83736e6327a0 *man/gvisGauge.Rd
+b714282edd242e7a9ed146b7e042c0c6 *man/gvisGeoChart.Rd
+680c44f7fa941320b9756c06204c1e3c *man/gvisGeoMap.Rd
+d0521290aa23c6b56e5701b78f340337 *man/gvisHistogram.Rd
+dc45eef67e3eeaa37f4f3800a65b952d *man/gvisIntensityMap.Rd
+5b607c14326b2457ebfbf4a8bd7ad500 *man/gvisLineChart.Rd
+9d7be5548095b755c38b4791903a1769 *man/gvisMap.Rd
+6c50f41272fd946af1902ad1824ed5b9 *man/gvisMerge.Rd
+40169bb74e3496baac38e21fb99dc7e3 *man/gvisMethods.Rd
+fca42ab833506a3fbf4856e8188a8875 *man/gvisMotionChart.Rd
+563a4041f48b37b9b6734b8d7977debf *man/gvisOrgChart.Rd
+6da9a072896f64472b4bcac24e70a8e7 *man/gvisPieChart.Rd
+2f4b6626768cab9d56a15c80b56ede2d *man/gvisSankey.Rd
+ab531f5f990284b76e3be3f61f39a0cc *man/gvisScatterChart.Rd
+83e69a4223888823017a71cf67f3a37a *man/gvisSteppedAreaChart.Rd
+e15d9488b7893a4187c184fbe063a058 *man/gvisTable.Rd
+970d933ff5a95c641d4c840e7de43351 *man/gvisTimeline.Rd
+229aa0e7df11b1ac66dda1eb0e9c6cd5 *man/gvisTreeMap.Rd
+ed79ea21d3dfb05af7dd869f02dddbce *man/renderGvis.Rd
+4e4d7dc8e7c02caa0ae936196995b569 *vignettes/Using_Roles_via_googleVis.Rmd
+ca37eea7fdee3ad583ae2d3135a58336 *vignettes/Using_Trendlines_with_googleVis.Rmd
+eb377f26d0f44e6e3ea16d2b808ef6c5 *vignettes/Using_googleVis_with_knitr.Rmd
+9a220ccb7b806e759f0b366055f679ef *vignettes/figures/Apostrophe.pdf
+21186eae6d903150212c6b658fbd6bd6 *vignettes/figures/CambR_googleVis_29_May_2012.pdf
+62d907e42fbdb2a9fe4544360fe16add *vignettes/figures/CreatePost.pdf
+c57344d39656b00f09d46fddc4fc453f *vignettes/figures/Editor.pdf
+93813b9e665338ce0aaf1d71e5916236 *vignettes/figures/MarkdownExample.pdf
+ddf4a19b7031631a2cc50e38bec3e86f *vignettes/figures/MotionChart.pdf
+769513d1a9d6855f76e0f7c7ca4cef38 *vignettes/figures/Options.pdf
+dd583e2f616ab06035abf09b151d1e24 *vignettes/figures/Rook.pdf
+ee18403099ebfa04748ef96218a74004 *vignettes/figures/googleVisDemoPlots.pdf
+702d0188d486ae9039badfc71abc3a65 *vignettes/figures/googleVisTutorial2013.png
+e93ed3610543c927ad6f94ea00a53b07 *vignettes/figures/gvisGeoChart.pdf
+58d76fb5cc723136740574364acf1fc9 *vignettes/figures/gvisMerge.pdf
+ad4ec306dc1769a1027904fba825964b *vignettes/figures/gvisObject.pdf
+1a650e324b037aaff1ca6aedd3d51c84 *vignettes/figures/shiny.pdf
+ffa12ad06488958398972715478777aa *vignettes/googleVis.Rnw
+27fa4abf5c1bf09f56a8586f50894677 *vignettes/googleVis.bib
+2588285da0540ecd38e39fe5f1b90b6e *vignettes/googleVis_examples.Rmd
+6b242c633f8815370a8fd2c86a45b1bf *vignettes/mystyle.css
diff --git a/NAMESPACE b/NAMESPACE
new file mode 100644
index 0000000..f2b549f
--- /dev/null
+++ b/NAMESPACE
@@ -0,0 +1,43 @@
+importFrom(methods, setMethod, is)		 
+importFrom(utils, packageDescription, browseURL, type.convert)		 
+importFrom(stats, na.omit, reshape)
+importFrom(tools, startDynamicHelp)  	 
+importFrom(jsonlite, toJSON)
+importFrom(jsonlite, unbox)
+# Methods     
+S3method(plot, gvis)		 
+S3method(print, gvis)
+
+# gvis Charts
+export(gvisMotionChart)		 
+export(gvisGeoMap)
+export(gvisIntensityMap)
+export(gvisTreeMap)
+export(gvisTable)
+export(gvisPieChart)
+export(gvisGauge)
+export(gvisOrgChart)
+export(gvisBubbleChart)
+export(gvisAnnotatedTimeLine)
+export(gvisMap)
+export(gvisGeoChart)
+export(gvisScatterChart)  	 
+export(gvisLineChart)
+export(gvisAreaChart)
+export(gvisBarChart)
+export(gvisColumnChart)		 
+export(gvisComboChart)		 
+export(gvisCandlestickChart)
+export(gvisSteppedAreaChart)		 
+
+export(gvisCalendar)
+export(gvisHistogram)     
+export(gvisAnnotationChart)
+export(gvisTimeline)     
+export(gvisSankey)     
+
+# Support function
+export(renderGvis)
+export(createGoogleGadget)
+export(gvisMerge)
+			 
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..84e945d
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,819 @@
+googleVis 0.6.2 [2017-01-01]
+----------------------------
+
+Changes
+
+  o Update links to omegahat from omegahat.org
+    to omegahat.net as requested by CRAN
+
+
+googleVis 0.6.1 [2016-09-01]
+----------------------------
+
+Changes
+
+ o Flash based charts gvisGeoMap and gvisAnnotatedTimeLine will 
+   show a warning, reminding users to switch to the HTML5 charts
+   gvisGeoChart and gvisAnnotationChart instead.
+ 
+ 
+Bug fixes 
+
+ o In some cases option settings were not converted 
+   porperly into JSON objects.  
+
+
+googleVis 0.6.0 [2016-07-04]
+----------------------------
+
+Changes
+
+ o Changed package dependency from RJSONIO to jsonlite.
+   
+ o Change demo AnimatedGeoMap to AnimatedGeoChart
+
+
+googleVis 0.5.10 [2015-08-26]
+----------------------------
+
+Bug fixes 
+
+ o Ordered factors were ignored. 
+   Thanks to Carsten Langer for reporting this issue.
+
+
+googleVis 0.5.9 [2015-07-04]
+----------------------------
+
+Changes
+
+  * Added note section on width and height to help file of 
+    gvisIntensityMap. Thanks to Sarang Brahme for his comment.
+   
+  * Updated NAMESPACE file to comply with new R CMD checks in R-3.3.0   
+
+googleVis 0.5.8 [2015-01-21]
+----------------------------
+
+Changes
+
+* Internal changes to how the internal web server is called, to reflect
+  changes in R 3.2.0
+
+googleVis 0.5.7 [2014-12-20]
+----------------------------
+
+Changes
+
+* Updated DESCRPITION file to comply with new CRAN policy
+
+* Clarified setting parameters in help file.
+  Thanks to Nick Salkowski for his suggestions.
+
+googleVis 0.5.6 [2014-10-12]
+----------------------------
+
+Changes
+
+* Rescaled the column "% of World Population" in sample data 
+  set "Population" by a factor of 0.01
+
+Bug Fixes
+
+* gvisMotionChart: arguments xvar, yvar, sizevar and colorvar were not 
+  always picked up correctly. 
+  Thanks to Juuso Parkkinen for reporting this issue.
+
+googleVis 0.5.5 [2014-08-15]
+----------------------------
+
+Changes
+
+* Added example to gvisMerge help file.
+
+Bug Fixes
+
+* README.md when converted to (X)HTML using a current version of 
+  pandoc showed minor problems when validated using W3C Markup 
+  Validator.
+
+* In some case when no xvar and yvar arguments where provided for 
+  core charts the output wasn't sensible. This bug was introduced 
+  with version 0.5.3. Thanks to stanstrup for reporting this issue.
+
+googleVis 0.5.4 [2014-07-19]
+----------------------------
+
+Changes
+
+* Tidying up of googleVis demo, vignette and README file
+
+
+googleVis 0.5.3 [2014-06-28]
+----------------------------
+
+Changes
+
+* Default chart width is set to 'automatic' instead of 500 pixels.
+  
+* Intervals for columns roles have to end with the suffix ".i",
+  with i being an integer. Several interval columns are allowed,
+  see the Roles demo and vignette for more details.
+
+Bug Fix
+
+* The order of y-variables in core charts wasn't maintained.
+  Thanks to John Taveras for reporting this bug.
+
+* Width and height of googleVis charts were only accepted in pixels, 
+  although the Google Charts API uses standard HTML units (for
+  example, '100px', '80em', '60', 'automatic'). If no units are specified 
+  the number is assumed to be pixels. This has been fixed.
+  Thanks to Paul Murrell for reporting this issue.
+
+
+googleVis 0.5.2 [2014-05-05]
+----------------------------
+Changes
+
+* Fixed minor formatting issues in documentation and vignettes.
+
+* Added examples in demo googleVis to show how to
+  customize points and lines and to the help files of
+  gvisLineChart and gvisScatterChart.
+
+
+googleVis 0.5.1 [2014-04-14]
+----------------------------
+NEW FEATURES
+
+* New functions gvisSankey, gvisAnnotationChart, gvisHistogram,
+  gvisCalendar and gvisTimeline to support the new Google charts 
+  of the same names (without 'gvis').
+
+* New demo Trendlines showing how trend-lines can be added to
+  Scatter-, Bar-, Column-, and Line Charts.
+
+* New demo Roles showing how different column roles can be used
+  in core charts to highlight data.
+
+* New vignettes written in R Markdown showcasing googleVis
+  examples and how the package works with knitr.
+
+Changes
+
+* The help files of gvis charts no longer show all their options,
+  instead a link to the online Google API documentation is given. 
+
+* Updated googleVis demo
+
+* All googleVis output will be displayed in your default browser. 
+  In previous versions of googleVis output could also be displayed 
+  in the preview pane of RStudio. This feature is no 
+  longer available with the current version of RStudio, but is likely to   
+  be introduced again with the release of RStudio version 0.99 or higher.
+
+
+googleVis 0.4.7 [2013-11-10]
+----------------------------
+
+Changes
+
+* New option 'googleVis.viewer' which controls the default output of
+  the googleVis plot method. On package load it is set to 
+  getOption("viewer"). It you use RStudio, then its viewer pane will 
+  be used for displaying non-Flash charts. 
+  Set options("googleVis.viewer"=NULL) and the googleVis
+  plot function will open all output in the default browser again.
+
+* The package start-up message makes the user aware of the default 
+  viewer option.
+
+* Added example to gvisMap that illustrates how the icon can be 
+  changed.
+
+
+googleVis 0.4.6 [2013-11-03]
+----------------------------
+
+Changes
+
+* googleVis will use the Viewer pane in RStudio (version >= 0.98.441) 
+  to display non-Flash charts by default. The setting is controlled
+  via the option viewer. Set options("viewer"=NULL) and the googleVis
+  plot function will open all output in the default browser again.
+
+
+googleVis 0.4.5 [2013-08-29]
+----------------------------
+
+Bug Fixes
+
+* The indentation of some of the HTML output changed in version 0.4.4,
+  which as a result stopped googleVis output to be rendered with knitr.
+
+
+googleVis 0.4.4 [2013-08-23]
+----------------------------
+
+NEW FEATURES
+
+* gvisTable() gained new parameter formats, which allow users to 
+  specify the format of numbers displayed in a table. 
+  Thanks to Jacqueline Buros for providing ideas and code.
+
+* Doughnut charts are now possible as pie charts with a hole.
+
+Changes
+
+* New examples for gvisBarChart, gvisColumnChart, gvisComboChart 
+  demonstrating how to change the width of bars
+
+* Extended FAQ section
+
+
+googleVis 0.4.3 [2013-05-25]
+----------------------------
+
+NEW FEATURES
+ 
+ * givsGeoChart has a new argument 'hovervar' to specify a column in
+   input data that can be used to show additional information in a geo
+   chart. See the new example of plotting countries' credit rating in
+   the help file for a use case. Thanks to John Muschelli for suggesting
+   this feature.
+
+
+googleVis 0.4.2 [2013-03-16]
+----------------------------
+
+NEW FEATURES
+
+ * The core charts (e.g. line, area, bar, column and combo charts)
+   accept now also date variables for the x-axis. Thanks to Sebastian
+   Campbell for pointing this out.
+
+Changes 
+
+ * The WorldBank demo uses now the WDI package.
+   Thanks to John Maindonald for providing the code.
+
+Bug Fixes
+
+ * Fixed typos in Stock and Andrew example data. 
+   Thanks to Sebastian Campbell for reporting this issue. 
+
+
+googleVis 0.4.0 [2013-02-24]
+----------------------------
+
+NEW FEATURES
+ 
+ * New function renderGvis to support shiny.
+   This function allows user to insert googleVis output into shiny
+   apps, similar to renderText and renderPlot. See the help page for
+   more details. Many thanks to Joe Cheng for his support and help.
+
+Changes
+
+ * In order to support shiny the order of the elements of the
+   gvis*()$html$chart vector changed. The positions of jsChart and
+   jsFooter have been swapped.
+
+ * The load mechanism for the Google API changed from http to https
+   again. Thanks to Jacques Philip. 
+
+ * The package dependencies changed to imports statements in DESCRIPTION. 
+   Thanks to Suraj Gupta for pointing this out.
+
+ * The R.rsp example in demo googleVis has been moved into its own
+   demo Rrsp. 
+
+ * A FAQ and shiny section has been added to the vignette.
+
+Bug Fixes
+
+ * jsDisplayChart didn't check if the google visualization function is already
+   loaded. Many thanks to Mark Melling for reporting the issue and
+   providing a solution.
+
+ * The demo WorldBank didn't download all data but only the first
+   12000 records. Many thanks to John Maindonald reported this issue. 
+
+
+googleVis 0.3.3 [2012-11-12]
+----------------------------
+
+Changes
+
+ * Clarified the usage of the argument state in the help file of
+   gvisMotionChart. Thanks to Leonardo Trabuco 
+
+
+googleVis 0.3.3 [2012-10-31]
+----------------------------
+
+Bug Fixes
+
+ * plot.gvis didn't open a browser window when options(gvis.plot.tag)
+   was not set to NULL, but the user explicitly called plot.gvis with
+   tag NULL. Thanks to Sebastian Kranz for reporting this bug. 
+
+
+googleVis 0.3.2 [2012-10-28]
+----------------------------
+
+NEW FEATURES
+
+ * plot.gvis gained the argument 'tag', which works similar to the
+   argument of the same name in print.gvis. By default the tag
+   argument is NULL and plot.gvis has the same behaviour as in the
+   previous versions of googleVis. 
+   However, the argument can be set outside plot.gvis via
+   options(gvis.plot.tag=...). This allows users to switch plot
+   statements into print statements by changing only one setting. This
+   is particular useful when googleVis is used in combination with
+   knitr or R.rsp. Setting options(plot.gvis.tag="chart") will ensure
+   that plot(gvisOutput) statements will be included into the final
+   HTML output. See the help file to plot.gvis and vignette for more
+   details. 
+
+Changes
+
+ * The tag argument of print.gvis can be set globally from outside the
+   function via options(gvis.print.tag)
+
+ * The vignette has a new section describing how to set the
+   behaviour of plot.gvis and print.gvis via options(gvis.plot.tag),
+   options(gvis.print.tag) respectively. The section describing how
+   googleVis can be used with knitr has been extended and an additional
+   example included. 
+
+ * plot.gvis can open any html file now, not just gvis-objects. Like
+   with gvis-object it will copy the file into a temporary directory
+   and display it via the R HTTP server. 
+
+
+googleVis 0.3.1 [2012-10-22]
+----------------------------
+
+Bug Fixes
+
+* The argument 'browser' introduced in version 0.3.0 has been removed
+  again. The argument was set by default to the output of
+  getOptions('browser'), if interactive() returned TRUE, otherwise to
+  'false'. The function getOptions('browser') returns either a string
+  or a function call. The later caused an error message, as
+  experienced with RStudio and RGui.exe. The check is now handled
+  internally by plot.gvis.
+
+  Thanks to Sebastian Kranz for reporting this bug.
+
+
+googleVis 0.3.0 [2012-10-20]
+----------------------------
+
+NEW FEATURES
+
+* plot.gvis has a new argument 'browser'. The argument is passed on
+  to the function browseURL. The 'browser' argument is by default set
+  based on the output of interactive(). This prevents R CMD CHECK
+  trying to open browser windows during the package checking
+  process. See the help file of plot.gvis for more details.
+  Thanks to Henrik Bengtsson for his comments and suggestions.
+
+* gvisMotionChart has new arguments xvar, yvar, colorvar and
+  sizevar. Those arguments are optional and set the various dimensions 
+  of a motion chart, similar to those in gvisBubbleChart.
+  Thanks to Sebastian Kranz for the idea and initial code.
+
+* gvisGeoChart accepts tooltip.triggers following an update of the
+  Visualisation API by Google, 24 September 2012
+
+* R data frames are transformed into JSON objects using a new function 
+  provided by Sebastian Kranz and Wei Luo. The new function speeds up 
+  the googleVis functions.
+
+Changes
+
+* Changed the load mechanism for the Google API from http to https.
+  Thanks to Erik Bülow for pointing this out (Issue 19). 
+
+* Changed example in help file of gvisMap to show how to include html
+  code in tooltip. 
+
+Bug Fixes
+
+* Chart editor was not validated properly under XHMTL 1.0 Strict
+
+
+googleVis 0.2.17 [2012-08-02]
+----------------------------
+
+Changes
+
+ * Added sections with information to 'knitr' and 'Rook' to vignette 
+
+ * Added example to gvisMerge demonstrating the use of 'Reduce'
+
+Bug Fixes
+
+ * Data frames with one row only were not displayed in a chart.
+   Thanks to Oliver Jay and Wai Tung Ho for reporting this issue.
+
+ * Fixed earth quake example, using data from 
+   http://www.iris.edu/seismon/last30.html, 
+   Mag was read as factor rather than numeric
+
+googleVis 0.2.16 [2012-06-01]
+----------------------------
+
+Changes
+
+ * Updated example in help file of gvisGeoChart for individual colour
+   axis 
+
+ * Updated links to Google API pages
+
+NEW FEATURES
+
+ * gvisMotionCharts accepts quarterly and weekly time dimensions.
+   Thanks to Jason Pickering for providing a patch. 
+
+googleVis 0.2.15 [2012-03-04]
+----------------------------
+
+Changes
+
+*  Updated documentation following a new version of the Google API
+   on 22 February 2012. 
+     
+*  Moved vignette from folder /inst/doc to /vignettes
+
+NEW FEATURES
+
+*  Quoted from Google
+   http://code.google.com/apis/chart/interactive/docs/release_notes.html: 
+   - Added gradient color mode to bubble chart.
+   - Geo chart:
+     o  Region interactivity in marker mode is now disabled by
+     	default. How to keep the old behavior? Set the
+   	enableRegionInteractivity option to true.
+
+     o  Markers are now opaque by default. How to keep the old
+        behaviour? Set the markerOpacity option to 0.5.
+
+     o  Marker size is now between 3 and 12 pixels by default. How to
+        keep the old behavior? Set the sizeAxis option to {minSize: 2,
+        maxSize: 30}.
+
+     o  A magnifying glass is now opened when the user hovers over
+        cluttered markers (excluding IE<=8). How to keep the old
+        behaviour? Set the magnifyingGlass option to {enable: false}.
+
+     o  Maps are not stretched by default anymore, but rather kept at
+      	the original aspect ratio. How to keep the old behavior? Set the
+  	keepAspectRatio option to false.
+
+
+googleVis 0.2.14 [2012-02-04]
+----------------------------
+
+Changes
+
+*  Updated help files to be in line with the Google Visualisation
+   API pages
+*  Updated vignette with new section on dealing with apostrophes in
+   column names and updated example in section "Setting options"
+*  Fixed typos in vignette. Thanks to Pat Burns for pointing them
+   out
+*  Updated links to Google's updated API Terms of Use:
+   http://code.google.com/apis/terms/index.html  
+
+NEW FEATURES
+
+ *  New bubble chart function gvisBubbleChart
+
+
+googleVis 0.2.13 [2011-12-19]
+----------------------------
+
+Changes
+
+ *  The list of arguments for gvisGeoChart changed:
+    - the argument 'numvar' has been renamed to 'colorvar' to
+      reflect the updated Google API. Additionally gvisGeoChart
+      gained a new argument 'sizevar'.
+ *  Updated googleVis vignette with a section on using googleVis 
+    output in presentations  
+ *  Renamed demo EventListner to EventListener
+
+NEW FEATURES
+
+ *  Google published a new version of their Visualisation API on 7
+    December 2011. Some of the new features have been implemented
+    into googleVis already:
+    - New stepped area chart function gvisSteppedAreaChart
+    - gvisGeoChart has a new marker mode, similar to the mode in
+      gvisGeoMap. See example(gvisGeoChart) for the new
+      functionalities.
+
+googleVis 0.2.12 [2011-12-07]
+----------------------------
+
+Bug Fixes
+
+ *  gvisMotionChart didn't display data with special characters,
+    e.g. spaces, &, %, in column names correctly. 
+    Thanks to Alexander Holcroft for reporting this issue.
+
+googleVis 0.2.11 [2011-11-16]
+----------------------------
+
+Changes
+
+*  Updated vignette and documentation with instructions on changing
+   the Flash security settings to display Flash charts locally. 
+   Thanks to Tony Breyal.
+*  New example to plot weekly data with gvisMotionChart
+*  Removed local copies of gadget files to reduce package file
+   size. A local copy of the R script to generate the original gadget
+   files is still included in inst/gadgets 
+
+googleVis 0.2.10 [2011-09-24]
+----------------------------
+
+Changes
+
+*  Updated section 'Using googleVis output with Google Sites,
+   Blogger, etc.' vignette
+
+*  Updated example for gvisMotionChart, showing how the initial
+   chart setting can be changed, e.g to display a line chart.
+
+*  New example for gvisAnnotatedTimeLine, showing how to shade
+   areas. Thanks to Mike Silberbauer for providing the initial code.    
+   
+NEW FEATURES
+ 
+ *  New demo WorldBank. It demonstrates how country level data can
+    be accessed from the World Bank via their API and displayed with a
+    Motion Chart. Inspired by Google's Public Data Explorer, see
+    http://www.google.com/publicdata/home
+  
+
+googleVis 0.2.9 [2011-09-01]
+---------------------------
+
+Changes
+
+*  The documentation of googleVis has been update to reflect a new
+   version of the Google Visualisation API which was published on 
+   13 July, see
+   http://code.google.com/apis/chart/interactive/docs/release_notes.html#72011. 
+   Here are some of the most interesting features:   
+   - Support for dual Y axes
+   - Ability to crop and zoom chart area to specific ranges
+   - Ability to set different properties for each series
+   - Ability to enable or disable chart interactivity
+   - Performance improvements in GeoChart
+
+*  Updated vignette with new sections on
+   - Setting options
+   - How to use the on-page chart editor
+   - Using googleVis with other Google products such as
+     Blogger and Google Sites 
+
+*  Updated warning section for gvisTreeMap
+
+NEW FEATURES
+ 
+ *  New gvis.editor argument in options, which adds an edit
+    button to the page, allowing the user to edit, change and
+    customise the chart on the fly.
+
+
+googleVis 0.2.8 [2011-07-31]
+---------------------------
+
+Changes
+
+*  Updated package welcome message. The message asks the user to read Google's
+   Visualisation and Maps API Terms of Use before she uses the functions of the
+   googleVis package. 
+	
+*  The caption gvis-plots contain an additional link to Google's data policy.
+
+*  New example for gvisBarChart using the XML package to chart online data from Wikipedia
+
+
+googleVis 0.2.7 [2011-07-10]
+---------------------------
+
+Changes
+
+*  The vignette includes new sections describing:
+   - how output of the googleVis package can be included into
+     WordPress pages,  
+   - how JavaScript event handlers can be added to charts. 
+
+*  Clarified documentation for Flash based charts in help files of 
+   motion chart, geo map, annotated time line. 
+
+NEW FEATURES
+ 
+ *  New demo 'EventListener' showcasing how a 'Listener' event can be
+    added to charts  
+
+BUG FIXES
+
+ *  gvisGeoMap documentation stated that the default dataMode is
+    'regions', but the function actually used 'markers'. The default
+    for dataMode is now 'regions' and therefore in line with the
+    help file.   
+
+googleVis 0.2.6 [2011-06-12]
+---------------------------
+
+Changes
+
+*  Updated demos
+
+NEW FEATURES
+
+*  New interfaces to three more interactive Google charts:
+   - gvisComboChart
+   - gvisGeoChart
+   - gvisCandlestickChart
+
+*  New function 'gvisMerge' to align two charts next to each other
+
+
+googleVis 0.2.5 [2011-06-04]
+---------------------------
+
+NEW FEATURES
+
+*  New interfaces to more interactive Google charts:
+   - gvisLineChart
+   - gvisBarChart
+   - gvisColumnChart
+   - gvisAreaChart
+   - gvisScatterChart
+   - gvisPieChart
+   - gvisGauge
+   - gvisOrgChart
+   - gvisIntensityMap 
+
+*  New demo 'AnimatedGeoMap'. The demo shows how a Geo Map can be animated
+   with additional JavaScript. 
+   Thanks to Manoj Ananthapadmanabhan and Anand Ramalingam, who
+   provided the idea and initial code.
+    
+BUG FIXES
+
+*  The way RJSONIO treats backslashes changed in version 0.7.1 and
+   as a result some Google charts were no longer displayed.
+
+googleVis 0.2.4 [2011-02-07]
+---------------------------
+
+Changes
+   
+*  plot.gvis no longer writes into the package folder. Instead
+   temporary files are created. This overcomes the need to install
+   the package into a directory with write access. Many thanks to
+   Ben Bolker for this suggestion and code contribution.  
+  
+*  plot.gvis no longer requires the web server provided by
+   the R.rsp package to display the visualisation output. Instead it
+   uses the internal R HTTP help server. Many thanks to John Verzani
+   for this suggestion and code contribution. 
+  
+*  R >= 2.11.0 is required to plot googleVis output, as it uses the
+   internal R HTTP help server.
+  
+*  Updated vignette with a section on how to use googleVis with
+   RApache and brew
+
+NEW FEATURES
+
+*  The plot function generates a web page which includes a link
+   to the HTML code of the chart. Many thanks to Henrik Bengtsson
+   for this suggestion.
+
+*  gvis visualisation functions have a new argument 'chart id', to
+   set the chart id of the exhibit manually. 	         
+
+*  gvis functions return more details about the visualisation chart
+   in a structured way. Suppose x is a 'gvis' object, than
+   x$html$chart is a named character vector of the chart's
+   JavaScript building blocks and html tags. 
+
+*  print.gvis has a new argument 'tag', which gives the user more
+   control over the output
+
+*  Brew example files in: 
+   system.file("brew", package = "googleVis")  
+
+BUG FIXES
+
+*  gvisTable did not accept datetime columns.
+
+googleVis 0.2.3 [2010-12-19]
+---------------------------
+
+Changes
+    
+NEW FEATURES
+
+*  gvisAnnotatedTimeLine accepts date in POSIX* formats
+
+BUG FIXES
+
+*  Google date objects expect the months Jan.- Dec. as 0 - 11 and
+   not 1 - 12 
+*  Fixed typo in the Andrew data set. The Pressure at 1992-08-24
+   12:00:00 was 951 and not 51  
+
+googleVis 0.2.2 [2010-12-12]
+---------------------------
+
+Changes
+    
+ *  Fixed typos in documentation
+
+NEW FEATURES
+
+*  New function:
+   - createGoogleGadget which allows users to create Google Gadgets
+     XML output  
+
+
+googleVis 0.2.1 [2010-11-30]
+---------------------------
+
+Changes
+    
+ *  First version to be released on CRAN
+
+NEW FEATURES
+
+*  New function:
+   - gvisAnnotatedTimeLine to generate interactive annotated time
+     line charts 
+
+googleVis 0.2.0 [2010-11-14]
+---------------------------
+
+Changes
+
+*  The package has been renamed from GoogleMotionChart to googleVis 
+   to reflect a new more flexible implementation.
+*  More functions of the Google Visualisation API are now available.
+
+USER-VISIBLE CHANGES
+
+*  New interfaces, all visualisation functions start with 'gvis'.
+*  Output is now of class 'gvis' with generic print and plot
+   functions.
+*  'gvis' objects are list of lists, which allow the user to extract
+   the various parts of the visualisation output, e.g. the chart
+   object.
+  
+NEW FEATURES
+
+*  New functions:
+   - gvisMotionChart to generate motion charts
+   - gvisGeoMap to generate geographical maps
+   - gvisMap to generate maps
+   - gvisTreeMap to generate tree maps
+   - gvisTable to generate table output
+   - print.gvis: generic function to print 'gvis' objects
+   - plot.gvis: generic function to display 'gvis' objects in a
+     browser via the R.rsp package.  
+
+
+googleVis 0.1.4 [2010-08-12]
+---------------------------
+Changes
+
+*  The package uses the RJSONIO package from Omegahat to
+   transform a data.frame into a json DataTable 
+
+googleVis 0.1.3 [2010-08-08]
+---------------------------
+NEW FEATURES
+
+*  More detailed motion chart configuration settings are possible.
+
+USER-VISIBLE CHANGES
+*  options have to be set via a list. Arguments height and width
+   can be set, plus further configurations.
+*  Updated demo PerformanceAnalyticsMotionChart   
+
+
+googleVis 0.1.2 [2010-08-03]
+---------------------------
+
+First public version.
diff --git a/R/gadget.R b/R/gadget.R
new file mode 100644
index 0000000..26bae80
--- /dev/null
+++ b/R/gadget.R
@@ -0,0 +1,17 @@
+createGoogleGadget <- function(gvis){
+
+  if(!"gvis" %in% class(gvis)){
+    stop("A gvis object is as input required.")
+  }
+sprintf('<?xml version="1.0" encoding="UTF-8" ?> 
+<Module>
+  <ModulePrefs title="%s" />
+  <Content type="html">
+  <![CDATA[ 
+   %s
+  ]]> 
+  </Content>
+</Module>
+',  gvis$chartid, paste(gvis$html$chart, collapse="\n") ) 
+  
+}
diff --git a/R/gvis.R b/R/gvis.R
new file mode 100644
index 0000000..6a07286
--- /dev/null
+++ b/R/gvis.R
@@ -0,0 +1,677 @@
+### File R/gvis.R
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+### Distributed under GPL 2 or later
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+gvisChart <- function(type, checked.data, options, chartid, package, formats = NULL){
+  
+  Chart = gvis(type=type, checked.data, options=options, 
+               chartid=chartid, package, formats=formats)
+  chartid <- Chart$chartid
+  htmlChart <- Chart$chart
+  
+  htmlScaffold <- gvisHtmlWrapper(title="", chartid=chartid, 
+                                  dataName=options$dataName,
+                                  type=tolower(type))
+  
+  output <- structure(
+    list(type=Chart$type,
+         chartid=Chart$chartid,
+         html=list(header=htmlScaffold[["htmlHeader"]],
+                   chart=unlist(htmlChart),
+                   caption=htmlScaffold[["htmlCaption"]],
+                   footer=htmlScaffold[["htmlFooter"]])),
+    class=c("gvis", "list")
+  )
+  
+  return(output)
+}
+
+gvis <- function(type="", data, options, chartid, package, formats=NULL){
+  
+  if( ! is.data.frame(data) ){
+    stop("Data has to be a data.frame. See ?data.frame for more details.")
+  }
+  
+  ## we need a unique chart id to have more than one chart on the same page
+  ## we use type and date to create the chart id
+  if(missing(chartid)){
+    ##    chartid <- paste(type, format(Sys.time(), "%Y-%m-%d-%H-%M-%S"), basename(tempfile(pattern="")),sep="_")
+    chartid <- paste(type, basename(tempfile(pattern="")),sep="ID")
+    
+  }
+  if(missing(package)){
+    package <- type
+  }
+  
+  output <- gvisFormat(data)
+  data.type <- output$data.type
+  data.json <- output$json
+  
+  ## check for not allowed data types
+  checkTypes <- data.type %in% options$data$allowed | isRoleColumn(data.type)
+  if(sum(!checkTypes)){
+    message <- paste("Only the following data types are allowed: ", 
+                     paste(options$data$allowed, collapse=", "), "\n",
+                     "However, ", 
+                     paste(names(data)[!checkTypes], collapse=", "), " is of type ", 
+                     paste(data.type[!checkTypes], collapse=", "),"\n", sep="", collapse=" ")
+    stop(message)
+  }  
+  
+  ## check for NumberFormat objects
+  ## formats will be a named list of strings. Names correspond to objects in the data frame.
+  jsFormats <- ''
+  if (!is.null(formats)) {
+    if (!inherits(formats,'list'))
+      warning('formats object exists but is not a list. Ignoring')
+    
+    if (!all(names(formats) %in% names(data))) 
+      warning('formats object contains names that do not exist in data.')
+    
+    for (idx in c(1:length(formats))) {
+      jsFormats <- paste(jsFormats
+                         , paste('  var dataFormat',idx,' = new google.visualization.NumberFormat({pattern:"',formats[idx],'"});',sep="")
+                         , paste('  dataFormat',idx,'.format(data, ', match(names(formats[idx]), names(data)) - 1,');',sep="")
+                         , sep = "\n"
+      )
+    }
+    
+  }
+  
+  jsHeader <- '
+<!-- jsHeader -->
+<script type="text/javascript">
+'
+  jsHeader  <- paste(infoString(type),   jsHeader , sep="\n")
+  
+  jsData <- '
+// jsData 
+function gvisData%s () {
+var data = new google.visualization.DataTable();
+var datajson =
+%s;
+%s
+data.addRows(datajson);
+return(data);
+}
+'
+  jsData <- sprintf(jsData, chartid,
+                    data.json,
+                    paste(sapply(1:length(data.type), function(x)
+                      if (endsIn(names(data.type)[x], '.tooltip'))
+                        paste("data.addColumn({type: '", data.type[x], "', role: 'tooltip', 'p': {'html': true}});", sep="")
+                      else if(endsIn.No(names(data.type)[x], '.interval')){
+                        id <- unlist(strsplit(names(data.type)[x], ".interval."))
+                        id <- id[length(id)]
+                        paste("data.addColumn({id:'i",id,"', type: '", data.type[x], "', role: 'interval'});", sep="")
+                      }
+                      else if(endsIn(names(data.type)[x], '.style'))
+                        paste("data.addColumn({type: '", data.type[x], "', role: 'style'});", sep="")                                 
+                      else if(endsIn(names(data.type)[x], '.annotation'))
+                        paste("data.addColumn({type: '", data.type[x], "', role: 'annotation'});", sep="")
+                      else if(endsIn(names(data.type)[x], '.annotationText'))
+                        paste("data.addColumn({type: '", data.type[x], "', role: 'annotationText'});", sep="")
+                      else if(endsIn(names(data.type)[x], '.certainty'))
+                        paste("data.addColumn({type: '", data.type[x], "', role: 'certainty'});", sep="")
+                      else if(endsIn(names(data.type)[x], '.scope'))
+                        paste("data.addColumn({type: '", data.type[x], "', role: 'scope'});", sep="")
+                      else if(endsIn(names(data.type)[x], '.emphasis'))
+                        paste("data.addColumn({type: '", data.type[x], "', role: 'emphasis'});", sep="")
+                      else
+                        paste("data.addColumn('", data.type[x], "','",
+                              names(data.type)[x], "');", sep="")
+                    ), collapse="\n")
+                    
+  )
+  
+  jsDisplayChart <- '
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "%s";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChart%s);
+})();
+function displayChart%s() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} %s});
+}, 100);
+}
+'
+  jsDisplayChart <- sprintf(jsDisplayChart,
+                            ifelse(!is.null(options$gvis$gvis.editor), 'charteditor',
+                                   tolower(package)),
+                            chartid, chartid,
+                            ifelse(!is.null(options$gvis$gvis.language),
+                                   paste(",'language':'",
+                                         options$gvis$gvis.language, "'", sep=""), '')
+  )
+  
+  #########
+  
+  jsDrawChart <- '
+// jsDrawChart
+function drawChart%s() {
+var data = gvisData%s();
+var options = {};
+%s
+%s
+%s
+%s
+}
+%s  
+'
+  jsDrawChart <- sprintf(jsDrawChart, chartid,  chartid,
+                         paste(gvisOptions(options), collapse="\n"),
+                         jsFormats,
+                         gvisNewChart(chartid,type,options),
+                         gvisListener(chartid, type, options),
+                         gvisEditor(chartid,type,options)
+  )
+  
+  jsFooter  <- '
+// jsFooter
+</script>
+'
+  
+  jsChart <- '
+<!-- jsChart -->  
+<script type="text/javascript\" src="https://www.google.com/jsapi?callback=displayChart%s"></script>
+'
+  jsChart  <- sprintf(jsChart, chartid)
+  
+  
+  divChart <- '
+<!-- divChart -->
+%s  
+<div id="%s" 
+  style="width: %s; height: %s;">
+</div>
+'  
+  divChart <- sprintf(divChart,
+                      ifelse(!is.null(options$gvis$gvis.editor),
+                             sprintf("<input type='button' onclick='openEditor%s()' value='%s'/>",
+                                     chartid,as.character(options$gvis$gvis.editor)),''),
+                      chartid,
+                      ifelse(!(is.null(options$gvis$width) || (options$gvis$width == "")),options$gvis$width, "500"),
+                      ifelse(!(is.null(options$gvis$height) || (options$gvis$height == "")),options$gvis$height, "automatic")
+  )
+  
+  output <- list(chart=list(jsHeader=jsHeader,
+                            jsData=jsData,
+                            jsDrawChart=jsDrawChart,
+                            jsDisplayChart=jsDisplayChart,
+                            jsFooter=jsFooter,
+                            jsChart=jsChart,
+                            divChart=divChart),
+                 type=type, chartid=chartid)
+  return(output)
+}
+
+
+
+###############
+## Thanks to Sebastian Kranz for this function
+## Thanks also to Wei Luo: http://theweiluo.wordpress.com/2011/09/30/r-to-json-for-d3-js-and-protovis
+
+# Transforms a vector into a vector of JSON strings that
+# can be pasted together afterwards
+toJsonSONvec <- function(vec) {
+  #restore.point("name.value")
+  na.row <- is.na(vec)
+  if(is(vec,'integer')){
+    ret <- vec
+  } else if (is(vec,'numeric')) {
+    # Round to 10 points after the decimal as before
+    ret <- as.character(signif(vec,digits=10))
+  } else if (is(vec,'logical')) {
+    ret <- tolower(as.character(vec))
+  } else if (is(vec,'Date')) {
+    y <- format(vec,"%Y")
+    m <- as.numeric(format(vec,"%m")) -1
+    d <- as.numeric(format(vec,"%d"))
+    ret <- paste("new Date(",y,",",m,",",d,")",sep="")
+  } else if (is(vec,'POSIXct') | is(vec,'POSIXlt')) {
+    y <- format(vec,"%Y")
+    m <- as.numeric(format(vec,"%m")) -1
+    d <- as.numeric(format(vec,"%d"))
+    H <- as.numeric(format(vec,"%H"))
+    M <- as.numeric(format(vec,"%M"))
+    S <- as.numeric(format(vec,"%S"))
+    ret <- paste("new Date(",y,",",m,",",d,",",H,",",M,",",S,")",sep="")
+  } else {
+    quote <- '"';
+    vec <- gsub('"', '\\\\"', vec)
+    ret <- paste(quote, vec, quote, sep='')
+  }
+  ret[na.row] <- "null"
+  ret
+}
+
+toJsonSONarray <- function(dtf){
+  ## Thanks to Sebastian Kranz for this function
+  ## Thanks also to Wei Luo: http://theweiluo.wordpress.com/2011/09/30/r-to-json-for-d3-js-and-protovis
+  
+  #restore.point("toJsonSONarray")
+  clnms <- colnames(dtf)
+  
+  # Transform columns depending on data type and store in a list
+  objs <- lapply(dtf,toJsonSONvec)
+  # Remove names just for the case that one column name was sep or collapse
+  names(objs) <- NULL
+  # Paste columns together
+  str <- do.call(paste,c(objs,list(sep=",\n")))
+  
+  # Add [ ] and paste rows together
+  res <- paste('[\n ', paste0("[\n",str,"\n]",collapse=',\n'), ' \n]',sep="")
+  return(res)
+}
+
+
+gvisFormat <- function(data){
+  #restore.point("gvisFormat")
+  ## Create a list where the Google DataTable type of all variables will be stored
+  
+  ## Convert data.frame to list
+  x <- as.list(data)
+  varNames <- names(x)
+  
+  varTypes <- sapply(varNames,
+                     function(.x){
+                       switch(class(x[[.x]])[1],"integer"="number",
+                              "numeric"="number",
+                              "character"="string",
+                              "factor"="string",
+                              "ordered"="string",
+                              "logical"="boolean",
+                              "Date"="date",
+                              "POSIXct"="datetime",
+                              "POSIXlt"="datetime")
+                     }
+  )
+  
+  ## factor to character
+  x.df <- as.data.frame(
+    lapply(x,
+           function(a){
+             if (is.factor(a)) as.character(a) else a
+           }
+    ),
+    stringsAsFactors=FALSE
+  )
+  
+  ## The function is specified above
+  json <- toJsonSONarray(x.df)
+  output <- list(
+    data.type = unlist(varTypes),
+    json = json
+  )
+  
+  output$json <-fixBackslash(output$json)
+  
+  return(output)
+}
+
+fixBackslash <- function(x){
+  x <-  gsub("\\\\\\\\", "\\\\", x)
+  return(x)
+}
+
+endsIn <- function(source, target){
+  substr(source, nchar(source)-nchar(target)+1, nchar(source)) %in% target
+}
+
+endsIn.No <- function(source, target){
+  ind <- grep(paste0(target, ".[0-9]"), source) 
+  c(1:length(source)) %in% ind    
+}
+
+isRoleColumn <- function(x) {
+  return (
+    (x %in% c("string") & endsIn(names(x), ".tooltip")) |
+      (x %in% c("string") & endsIn(names(x), ".annotation")) |
+      (x %in% c("string") & endsIn(names(x), ".style")) |
+      (x %in% c("string") & endsIn(names(x), ".annotationText")) |
+      (x %in% c("boolean") & endsIn(names(x), ".certainty")) |
+      (x %in% c("boolean") & endsIn(names(x), ".emphasis")) |
+      (x %in% c("boolean") & endsIn(names(x), ".scope")) |
+      (x %in% c("number") & endsIn.No(names(x), ".interval"))
+  )
+}
+
+check.location <- function(x){
+  y = as.character(x)
+  if (! is.character(y))
+    stop(paste("The column has to be of character format. Currently it is", class(x)))
+  y
+}
+
+check.char <- function(x){
+  y = as.character(x)
+  if (! is.character(y))
+    stop(paste("The column has to be of character format. Currently it is", class(x)))
+  y
+}
+
+check.date <- function(x){
+  y = as.Date(x)
+  if (class(y)!="Date")
+    stop(paste("The column has to be of date format. Currently it is", class(x)))
+  y
+}
+
+check.datetime <- function(x){
+  if(! any(class(x) %in% c("POSIXct", "POSIXlt")) )
+    stop(paste("The column has to be of datetime format (POSIXct or POSIXlt). Currently it is", class(x)))
+  x
+}
+
+check.num <- function(x){
+  y = as.numeric(x)
+  if (! is.numeric(y))
+    stop(paste("The column has to be of numeric format. Currently it is", class(x)))
+  y
+}
+
+check.num.pos <- function(x){
+  y = as.numeric(x)
+  if (! is.numeric(y))
+    stop(paste("The column has to be of numeric format. Currently it is", class(x)))
+  if (any(x<0))
+    stop(paste("The column has to be > 0."))       
+  y
+}
+
+gvisCheckData <- function(data="", options=list(), data.structure=list()){
+  ## Convert data.frame to list
+  x <- as.list(data)
+  varNames <- names(x)
+  
+  ## Check if required vars match columns in the data
+  vars.req <- names(grep(TRUE, lapply(data.structure,
+                                      function(x){x$mode})=="required", value=TRUE)) 
+  vars.opt <- names(grep(TRUE, lapply(data.structure,
+                                      function(x){x$mode})=="optional", value=TRUE)) 
+  
+  # required and empty? fill with varNames in order given by data.structure
+  req.and.empty <- ((names(options$data) %in% vars.req) &
+                      (options$data==""))
+  
+  options$data[req.and.empty] <-
+    varNames[match(names(options$data[req.and.empty]),
+                   names(data.structure))]  
+  
+  vars.pos <- match(unlist(options$data[vars.req], use.names=FALSE),
+                    varNames) 
+  if(any(is.na(vars.pos)) & (length(varNames) < length(vars.req))){
+    stop("There are not enough columns in your data.")
+  }
+  x <- x[as.character(options$data[options$data!="" &
+                                     names(options$data) != "allowed" &
+                                     names(options$data) != "date.format"])]
+  
+  sapply(names(options$data[options$data!="" & names(options$data) !=
+                              "allowed" & names(options$data) != "date.format"]), 
+         function(.x){ 
+           .x <- as.character(.x)
+           y <- x[[as.character(options$data[.x])]];
+           # is <<- really necessary?
+           x[[as.character(options$data[.x])]] <<- data.structure[[.x]]$FUN(y);
+         })
+  
+  return(x)
+}
+
+gvisEditor <- function(chartid,type,options){
+  if(is.null(options$gvis$gvis.editor))
+    return('')
+  jseditor <- "
+  function openEditor%s() {
+  var editor = new google.visualization.ChartEditor();
+  google.visualization.events.addListener(editor, 'ok',
+  function() { 
+  chart%s = editor.getChartWrapper();  
+  chart%s.draw(document.getElementById('%s')); 
+  }); 
+  editor.openDialog(chart%s);
+  }
+  "
+  sprintf(jseditor,chartid,chartid,chartid,chartid,chartid)
+  }
+
+gvisNewChart <- function(chartid,type,options){
+  ret <- ""
+  if(is.null(options$gvis$gvis.editor)){
+    jsnewchart <- "
+    var chart = new google.visualization.%s(
+    document.getElementById(\'%s\')
+    );
+    chart.draw(data,options);
+    "
+    ret <- sprintf(jsnewchart,type,chartid)  
+    
+  } else {
+    jsnewchart <- "
+    chart%s = new google.visualization.ChartWrapper({
+    dataTable: data,       
+    chartType: '%s',
+    containerId: '%s',
+    options: options
+    });
+    chart%s.draw();
+    "
+    ret <- sprintf(jsnewchart,chartid,type,chartid,chartid)
+  }
+  ret
+  }
+
+gvisListener <- function(chartid, type, options=list(gvis=list(gvis.listener.jscode = NULL))){
+  event <- "select"
+  jscode <- options$gvis$gvis.listener.jscode
+  jsListener <- ""
+  # not all types support Listener and select event
+  if(!is.null(jscode)){## this actually works in most & (tolower(type) %in% c("table", "geomap"))){
+    jsListener <- "
+    google.visualization.events.addListener(chart, '%s',gvisListener%s);
+    function gvisListener%s() {
+    %s
+    }
+    "
+    jsListener <- sprintf(jsListener,event,chartid,chartid,jscode)
+  }
+  jsListener
+}
+
+
+gvisOptions <- function(options=list(gvis=list(width = 600, height=500))){
+  options <- options$gvis
+ 
+  # wipe out options with start with gvis.
+  options[grep("^gvis.",names(options))] <- NULL
+  #print(options)
+  .par <- sapply(names(options), function(x){
+    if(! (x %in% c("width", "height") & 
+            ! is.numeric(type.convert(gsub("px","", options[[x]])))) 
+  ){
+   
+      paste("options[\"", x,"\"] = ",
+            ifelse(any(checkSquareCurlBracketOps(options[[x]])),
+                   paste(options[[x]], collapse="\n"),
+                   #paste0( toJsonSONvec(options[[x]]), collapse="\n") 
+                   paste0( toJSON(unbox(options[[x]])), collapse="\n")  
+            ),
+            ";",sep="" )      
+      
+      
+    }
+  }
+  )
+ .par <- .par[!sapply(.par,is.null)]
+ # print(.par)
+  return((.par))
+}
+
+
+checkSquareCurlBracketOps <- function(char){
+  
+  first <- substr(char, 1,1)
+  n <- nchar(char)
+  last <- substr(char, n, n)
+  ifelse(first %in% c("{","[") & last %in% c("}", "]"), TRUE, FALSE)
+}
+
+gvisHtmlWrapper <- function(title, dataName, chartid, type){
+  
+  htmlHeader <- '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>%s</title>
+<meta http-equiv="content-type" content="text/html;charset=utf-8" />
+<style type="text/css">
+body {
+  color: #444444;
+  font-family: Arial,Helvetica,sans-serif;
+  font-size: 75%%;
+  }
+  a {
+  color: #4D87C7;
+  text-decoration: none;
+}
+</style>
+</head>
+<body>
+'
+  htmlHeader <- sprintf(htmlHeader,chartid) 
+  
+  htmlFooter <- '
+<!-- htmlFooter -->
+<span> 
+  %s 
+  • <a href="https://developers.google.com/terms/">Google Terms of Use</a> • %s
+</span></div>
+</body>
+</html>
+'
+  
+  if(type %in% "gvisMerge"){
+    policy <- "Data Policy: See individual charts"
+  }else{
+    policy <- sprintf('<a href="https://google-developers.appspot.com/chart/interactive/docs/gallery/%s">Documentation and Data Policy</a>', type)
+  }
+  
+  htmlFooter <- sprintf(htmlFooter, R.Version()$version.string,
+                         policy)  
+  htmlCaption <- sprintf('<div><span>Data: %s • Chart ID: <a href="Chart_%s.html">%s</a> • <a href="https://github.com/mages/googleVis">googleVis-%s</a></span><br />' ,
+                         dataName, chartid, chartid,packageDescription('googleVis')$Version)
+  
+  return(list(htmlHeader=htmlHeader,
+              htmlFooter=htmlFooter,
+              htmlCaption=htmlCaption
+  ))
+}
+
+
+## taken from lattice by Deepayan Sarkar
+modifyList <- function (x, val) {
+  stopifnot(is.list(x), is.list(val))
+  xnames <- names(x)
+  for (v in names(val)) {
+    x[[v]] <- if (v %in% xnames && is.list(x[[v]]) && is.list(val[[v]])) 
+      modifyList(x[[v]], val[[v]])
+    else val[[v]]
+  }
+  x
+}
+
+## info string 
+
+infoString <- function(type=""){
+  result <- string("",file="",append=FALSE)
+  info <- R.Version()
+  BCOMMENT <- "<!-- "
+  ECOMMENT <- " -->\n"
+  
+  result <- result + BCOMMENT + type + " generated in " +
+    info$language + " " + info$major + "." + info$minor + 
+    " by googleVis " +
+    packageDescription('googleVis')$Version + " package" +
+    ECOMMENT 
+  result <- result + BCOMMENT + date() + ECOMMENT
+  result$text
+}
+
+## define class string with nice '+' paste, taken from xtable.
+
+"+.string" <- function(x,y) {
+  x$text <- paste(x$text,as.string(y)$text,sep="")
+  return(x)
+}
+
+print.string <- function(x,...) {
+  cat(x$text,file=x$file,append=x$append)
+  return(invisible())
+}
+
+string <- function(text,file="",append=FALSE) {
+  x <- list(text=text,file=file,append=append)
+  class(x) <- "string"
+  return(x)
+}
+
+as.string <- function(x,file="",append=FALSE) {
+  if (is.null(attr(x,"class",exact=TRUE)))
+    switch(data.class(x),
+           character=return(string(x,file,append)),
+           numeric=return(string(as.character(x),file,append)),
+           stop("Cannot coerse argument to a string"))
+  if (class(x)=="string")
+    return(x)
+  stop("Cannot coerse argument to a string")
+}
+
+is.string <- function(x) {
+  return(class(x)=="string")
+}
diff --git a/R/gvisAnnotatedTimeLine.R b/R/gvisAnnotatedTimeLine.R
new file mode 100644
index 0000000..3361f5c
--- /dev/null
+++ b/R/gvisAnnotatedTimeLine.R
@@ -0,0 +1,310 @@
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+
+#' Google Annotated Time Line with R
+#' \Sexpr{googleChartName <- "annotatedtimeline"}
+#' \Sexpr{gvisChartName <- "gvisAnnotatedTimeLine"}
+#' 
+#' The gvisAnnotatedTimeLine function reads a data.frame and creates text
+#' output referring to the Google Visualisation API, which can be included into
+#' a web page, or as a stand-alone page.
+#' 
+#' An annotated time line is an interactive time series line chart with
+#' optional annotations. The chart is rendered within the browser using Flash.
+#' 
+#' @param data a \code{data.frame}. The data has to have at least two columns,
+#' one with date information (\code{datevar}) and one numerical variable.
+#' @param datevar column name of \code{data} which shows the date dimension.
+#' The information has to be of class \code{\link{Date}} or \code{POSIX*} time
+#' series.
+#' @param numvar column name of \code{data} which shows the values to be
+#' displayed against \code{datevar}. The information has to be
+#' \code{\link{numeric}}.
+#' @param idvar column name of \code{data} which identifies different groups of
+#' the data. The information has to be of class \code{\link{character}} or
+#' \code{\link{factor}}.
+#' @param titlevar column name of \code{data} which shows the title of the
+#' annotations. The information has to be of class \code{\link{character}} or
+#' \code{\link{factor}}.  Missing information can be set to \code{NA}. See
+#' section 'Details' for more details.
+#' @param annotationvar column name of \code{data} which shows the annotation
+#' text. The information has to be of class \code{\link{character}} or
+#' \code{\link{factor}}. Missing information can be set to \code{NA}. See
+#' section 'Details' for more details.
+#' @param date.format if \code{datevar} is of class \code{\link{Date}} then
+#' this argument specifies how the dates are reformatted to be used by
+#' JavaScript.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @section Warnings:
+#' AnnotatedTimeline (gvisAnnotatedTimeLine) is Flash based, conisder using  AnnotationChart (gvisAnnotationChart) instead.
+#' For more details visit: goo.gl/tkiEV8
+#' 
+#' Because of Flash security settings the chart might not work correctly when
+#' accessed from a file location in the browser (e.g.,
+#' file:///c:/webhost/myhost/myviz.html) rather than from a web server URL
+#' (e.g. http://www.myhost.com/myviz.html). See the googleVis package vignette
+#' and the Macromedia web site
+#' (\url{http://www.macromedia.com/support/documentation/en/flashplayer/help/})
+#' for more details.
+#' 
+#' Important: To use this visualization, you must specify the height and width 
+#' of the container element explicitly on your page. So, for example:
+#' options=list(width="600px", height="350px")
+#' 
+#' Use code{\link{gvisAnnotationChart}} for a non-Flash version of this plot.
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso
+#' 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+#' plotting methods. Further see \code{\link{reshape}} for reshaping data, e.g.
+#' from a wide format into a long format.
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Flash and Internet
+#' ## connection to display the visualisation.
+#' 
+#' 
+#' data(Stock)
+#' Stock
+#' A1 <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+#'                            numvar="Value", idvar="Device",
+#'                            titlevar="Title", annotationvar="Annotation",
+#'                            options=list(displayAnnotations=TRUE,
+#'                             legendPosition='newRow',
+#'                             width="600px", height="350px")
+#'                            )
+#' plot(A1)
+#' 
+#' ## Two Y-axis
+#' A2 <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+#'                            numvar="Value", idvar="Device",
+#'                            titlevar="Title", annotationvar="Annotation",
+#'                            options=list(displayAnnotations=TRUE, 
+#'                             width="600px", height="350px", scaleColumns='[0,1]',
+#'                             scaleType='allmaximized')
+#'                           )
+#' plot(A2)
+#' 
+#' ## Zoom into the time window, no Y-axis ticks
+#' A3 <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+#'                            numvar="Value", idvar="Device",
+#'                            titlevar="Title", annotationvar="Annotation",
+#'                            options=list(
+#'                              width="600px", height="350px",
+#'                             zoomStartTime=as.Date("2008-01-04"),
+#'                             zoomEndTime=as.Date("2008-01-05")) 
+#'                           )
+#' plot(A3)
+#' 
+#' 
+#' 
+#' ## Colouring the area below the lines to create an area chart
+#' A4 <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+#'                            numvar="Value", idvar="Device",
+#'                            titlevar="Title", annotationvar="Annotation",
+#'                            options=list(
+#'                              width="600px", height="350px",
+#'                              fill=10, displayExactValues=TRUE,
+#'                              colors="['#0000ff','#00ff00']")
+#'                            )
+#'                           
+#' plot(A4)
+#' 
+#' 
+#' ## Data with POSIXct datetime variable
+#' A5 <- gvisAnnotatedTimeLine(Andrew, datevar="Date/Time UTC",
+#'                             numvar="Pressure_mb",
+#'                             options=list(scaleType='maximized',
+#'                                          width="600px", height="350px")
+#'                             )
+#' 
+#' plot(A5)
+#' 
+#' 
+#' \dontrun{
+#' 
+#' ## Plot Apple's monthly stock prices since 1984
+#' 
+#' ## Get current date
+#' d <- Sys.time() 
+#' current.year <- format(d, "%Y")
+#' current.month <- format(d, "%m")
+#' current.day <- format(d, "%d")
+#' 
+#' ## Yahoo finance sets January to 00 hence: 
+#' month <- as.numeric(current.month)  - 1
+#' month <- ifelse(month < 10, paste("0",month, sep=""), m)
+#' 
+#' ## Get weekly stock prices from Apple Inc.
+#' tckr <- 'AAPL'
+#' yahoo <- 'http://ichart.finance.yahoo.com/table.csv'
+#' 
+#' fn <- sprintf('%s?s=%s&a=08&b=7&c=1984&d=%s&e=%s&f=%s&g=w&ignore=.csv',
+#'       yahoo, tckr, month, current.day, current.year)
+#' 
+#' ## Get data from Yahoo! Finance
+#' data <- read.csv(fn, colClasses=c("Date", rep("numeric",6)))
+#' 
+#' AAPL <- reshape(data[,c("Date", "Close", "Volume")], idvar="Date", 
+#'      		times=c("Close", "Volume"), 
+#'                 timevar="Type",
+#'                 varying=list(c("Close", "Volume")),
+#'                 v.names="Value",
+#'                 direction="long")
+#' 
+#' ## Calculate previous two years for zoom start time
+#' lyd <- as.POSIXlt(as.Date(d))
+#' lyd$year <- lyd$year-2
+#' lyd <- as.Date(lyd)
+#' 
+#' aapl <- gvisAnnotatedTimeLine(AAPL, datevar="Date",
+#'                            numvar="Value", idvar="Type",
+#'                           options=list(
+#'                             colors="['blue', 'lightblue']",
+#'                             zoomStartTime=lyd,
+#'                             zoomEndTime=as.Date(d),
+#'                             legendPosition='newRow',
+#'                             width="600px", height="400px", scaleColumns='[0,1]',
+#'                             scaleType='allmaximized')
+#'                            )
+#' 
+#' plot(aapl)
+#' }
+#' 
+gvisAnnotatedTimeLine <- function(data, datevar="", 
+                                  numvar="", idvar="", titlevar="", 
+                                  annotationvar="", 
+                                  date.format="%Y/%m/%d",
+                                  options=list(), chartid){
+  warning("AnnotatedTimeline (gvisAnnotatedTimeLine) is Flash based, conisder using  AnnotationChart (gvisAnnotationChart) instead.\nFor more details visit: goo.gl/tkiEV8")
+  
+  
+  my.type <- "AnnotatedTimeLine"
+  dataName <- deparse(substitute(data))
+  
+  my.options <- list(gvis=modifyList(list(width = "600px", height="300px"), options), 
+		     dataName=dataName,                     
+                     data=list(datevar=datevar, numvar=numvar,
+                       idvar=idvar, titlevar=titlevar, annotationvar=annotationvar,
+		       date.format=date.format,
+                       allowed=c("number", "string", "date", "datetime"))
+                     )
+  
+  checked.data <- gvisCheckAnnotatedTimeLineData(data, my.options, datevar=datevar,
+                                                 idvar=idvar, titlevar=titlevar, annotationvar=annotationvar)
+
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid=chartid)
+  
+  return(output)
+}
+
+
+gvisCheckAnnotatedTimeLineData <- function(data, options, datevar,idvar,
+                                           titlevar, annotationvar){
+
+  if( any(class(data[[datevar]]) %in% c("POSIXct", "POSIXlt")) ){   
+    data.structure <- list(
+                           datevar  = list(mode="required",FUN=check.datetime),
+                           numvar   =  list(mode="required",FUN=check.num),
+                           idvar  = list(mode="optional",FUN=check.char),                   
+                           titlevar = list(mode="optional",FUN=check.char),
+                           annotationvar  = list(mode="optional",FUN=check.char))
+  }else{
+    data.structure <- list(
+                           datevar  = list(mode="required",FUN=check.date),
+                           numvar   =  list(mode="required",FUN=check.num),
+                           idvar  = list(mode="optional",FUN=check.char),                   
+                           titlevar = list(mode="optional",FUN=check.char),
+                           annotationvar  = list(mode="optional",FUN=check.char))
+  }
+  
+  x <- gvisCheckData(data=data, options=options, data.structure=data.structure)
+   
+
+  x.df <- as.data.frame(x)
+
+
+    ##check if idvar is missing that datevar define unique rows
+  if(idvar==""){
+    if(length(x.df[,1]) != length(unique(x.df[,1])))
+      message("Warning: The data appears to more than one entry for the same date.\n",
+              "Have you considered using the idvar variable?")
+    ## if idvar is missing no reshape is required.
+    return(x.df)
+  }
+  
+
+  groups <- factor(x.df[[idvar]])
+  ngroups <- nlevels(groups)
+
+
+  checkTitleAnno <- c(titlevar != "", annotationvar != "")
+  if(all(checkTitleAnno)){
+    varying.vars <- c(2,4,5)
+  }else{
+    if(any(checkTitleAnno))
+      varying.vars <-  c(2,4)
+    else
+      varying.vars <- 2
+  }
+  var.names <- names(x.df)[varying.vars]
+  
+  x.df <- reshape(x.df,
+                  v.names=var.names, ##numvar , titlevar, annotationvar
+                  idvar=names(x.df)[1], ## datevar 
+                  timevar=names(x.df)[3], ## idvar
+                  direction="wide") 
+
+  names(x.df) <- gsub(paste(var.names[1], ".", sep=""), "", names(x.df))
+  
+  return(x.df)
+}
+
diff --git a/R/gvisAnnotationChart.R b/R/gvisAnnotationChart.R
new file mode 100644
index 0000000..9581f05
--- /dev/null
+++ b/R/gvisAnnotationChart.R
@@ -0,0 +1,224 @@
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+
+#' Google Annotation Chart with R
+#' \Sexpr{googleChartName <- "annotationchart"}
+#' \Sexpr{gvisChartName <- "gvisAnnotationChart"}
+#' 
+#' gvisAnnotationChart charts are interactive time series line charts that support 
+#' annotations. Unlike the gvisAnnotatedTimeLine, which uses Flash, 
+#' annotation charts are SVG/VML and should be preferred whenever possible.
+#' 
+#' @param data a \code{data.frame}. The data has to have at least two columns,
+#' one with date information (\code{datevar}) and one numerical variable.
+#' @param datevar column name of \code{data} which shows the date dimension.
+#' The information has to be of class \code{\link{Date}} or \code{POSIX*} time
+#' series.
+#' @param numvar column name of \code{data} which shows the values to be
+#' displayed against \code{datevar}. The information has to be
+#' \code{\link{numeric}}.
+#' @param idvar column name of \code{data} which identifies different groups of
+#' the data. The information has to be of class \code{\link{character}} or
+#' \code{\link{factor}}.
+#' @param titlevar column name of \code{data} which shows the title of the
+#' annotations. The information has to be of class \code{\link{character}} or
+#' \code{\link{factor}}.  Missing information can be set to \code{NA}. See
+#' section 'Details' for more details.
+#' @param annotationvar column name of \code{data} which shows the annotation
+#' text. The information has to be of class \code{\link{character}} or
+#' \code{\link{factor}}. Missing information can be set to \code{NA}. See
+#' section 'Details' for more details.
+#' @param date.format if \code{datevar} is of class \code{\link{Date}} then
+#' this argument specifies how the dates are reformatted to be used by
+#' JavaScript.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}.
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso
+#' 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+#' plotting methods. Further see \code{\link{reshape}} for reshaping data, e.g.
+#' from a wide format into a long format.
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Internet
+#' ## connection to display the visualisation.
+#' 
+#' 
+#' data(Stock)
+#' Stock
+#' A1 <- gvisAnnotationChart(Stock, datevar="Date",
+#'                            numvar="Value", idvar="Device",
+#'                            titlevar="Title", annotationvar="Annotation",
+#'                            options=list(displayAnnotations=TRUE,
+#'                             legendPosition='newRow',
+#'                             width=600, height=350)
+#'                            )
+#' plot(A1)
+#' 
+#' ## Two Y-axis
+#' A2 <- gvisAnnotationChart(Stock, datevar="Date",
+#'                            numvar="Value", idvar="Device",
+#'                            titlevar="Title", annotationvar="Annotation",
+#'                            options=list(displayAnnotations=TRUE, 
+#'                             width=600, height=350, scaleColumns='[0,1]',
+#'                             scaleType='allmaximized')
+#'                           )
+#' plot(A2)
+#' 
+#' ## Zoom into the time window, no Y-axis ticks
+#' A3 <- gvisAnnotationChart(Stock, datevar="Date",
+#'                            numvar="Value", idvar="Device",
+#'                            titlevar="Title", annotationvar="Annotation",
+#'                            options=list(
+#'                              width=600, height=350,
+#'                             zoomStartTime=as.Date("2008-01-04"),
+#'                             zoomEndTime=as.Date("2008-01-05")) 
+#'                           )
+#' plot(A3)
+#' 
+#' 
+#' 
+#' ## Colouring the area below the lines to create an area chart
+#' A4 <- gvisAnnotationChart(Stock, datevar="Date",
+#'                            numvar="Value", idvar="Device",
+#'                            titlevar="Title", annotationvar="Annotation",
+#'                            options=list(
+#'                              width=600, height=350,
+#'                              fill=10, displayExactValues=TRUE,
+#'                              colors="['#0000ff','#00ff00']")
+#'                            )
+#'                           
+#' plot(A4)
+#' 
+#' 
+#' ## Data with POSIXct datetime variable
+#' A5 <- gvisAnnotationChart(Andrew, datevar="Date/Time UTC",
+#'                             numvar="Pressure_mb",
+#'                             options=list(scaleType='maximized')
+#'                             )
+#' 
+#' plot(A5)
+#' 
+#' 
+#' \dontrun{
+#' 
+#' ## Plot Apple's monthly stock prices since 1984
+#' 
+#' ## Get current date
+#' d <- Sys.time() 
+#' current.year <- format(d, "%Y")
+#' current.month <- format(d, "%m")
+#' current.day <- format(d, "%d")
+#' 
+#' ## Yahoo finance sets January to 00 hence: 
+#' month <- as.numeric(current.month)  - 1
+#' month <- ifelse(month < 10, paste("0",month, sep=""), m)
+#' 
+#' ## Get weekly stock prices from Apple Inc.
+#' tckr <- 'AAPL'
+#' yahoo <- 'http://ichart.finance.yahoo.com/table.csv'
+#' 
+#' fn <- sprintf('%s?s=%s&a=08&b=7&c=1984&d=%s&e=%s&f=%s&g=w&ignore=.csv',
+#'       yahoo, tckr, month, current.day, current.year)
+#' 
+#' ## Get data from Yahoo! Finance
+#' data <- read.csv(fn, colClasses=c("Date", rep("numeric",6)))
+#' 
+#' AAPL <- reshape(data[,c("Date", "Close", "Volume")], idvar="Date", 
+#'      		times=c("Close", "Volume"), 
+#'                 timevar="Type",
+#'                 varying=list(c("Close", "Volume")),
+#'                 v.names="Value",
+#'                 direction="long")
+#' 
+#' ## Calculate previous two years for zoom start time
+#' lyd <- as.POSIXlt(as.Date(d))
+#' lyd$year <- lyd$year-2
+#' lyd <- as.Date(lyd)
+#' 
+#' aapl <- gvisAnnotationChart(AAPL, datevar="Date",
+#'                            numvar="Value", idvar="Type",
+#'                           options=list(
+#'                             colors="['blue', 'lightblue']",
+#'                             zoomStartTime=lyd,
+#'                             zoomEndTime=as.Date(d),
+#'                             legendPosition='newRow',
+#'                             width=600, height=400, scaleColumns='[0,1]',
+#'                             scaleType='allmaximized')
+#'                            )
+#' 
+#' plot(aapl)
+#' }
+#' 
+gvisAnnotationChart <- function(data, datevar="", 
+                                  numvar="", idvar="", titlevar="", 
+                                  annotationvar="", 
+                                  date.format="%Y/%m/%d",
+                                  options=list(), chartid){
+  
+  
+  my.type <- "AnnotationChart"
+  dataName <- deparse(substitute(data))
+  
+  my.options <- list(gvis=modifyList(list(width = 600, height=300), options), 
+		     dataName=dataName,                     
+                     data=list(datevar=datevar, numvar=numvar,
+                       idvar=idvar, titlevar=titlevar, annotationvar=annotationvar,
+		       date.format=date.format,
+                       allowed=c("number", "string", "date", "datetime"))
+                     )
+  
+  checked.data <- gvisCheckAnnotatedTimeLineData(data, my.options, datevar=datevar,
+                                                 idvar=idvar, titlevar=titlevar, annotationvar=annotationvar)
+
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid=chartid)
+  
+  return(output)
+}
+
diff --git a/R/gvisBubbleChart.R b/R/gvisBubbleChart.R
new file mode 100644
index 0000000..05c70da
--- /dev/null
+++ b/R/gvisBubbleChart.R
@@ -0,0 +1,165 @@
+### Part of the R package googleVis
+### Copyright 2011 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+
+#' Google Bubble Chart with R
+#' \Sexpr{googleChartName <- "bubblechart"}
+#' \Sexpr{gvisChartName <- "gvisBubbleChart"}
+#' 
+#' 
+#' The gvisBubbleChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page.
+#' 
+#' A bubble chart is used to visualize a data set with 2 to 4 dimensions. The
+#' first two dimensions are visualized as coordinates, the 3rd as color and the
+#' 4th as size.
+#' 
+#' The bubble chart is rendered within the browser using SVG or VML and
+#' displays tips when hovering over points.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a bubble chart.
+#' The data has to have at least three columns for \code{idvar, xvar}, and
+#' \code{yvar}.
+#' @param idvar column name of \code{data} with the bubble
+#' @param xvar column name of a numerical vector in \code{data} to be plotted
+#' on the x-axis.
+#' @param yvar column name of a numerical vector in \code{data} to be plotted
+#' on the y-axis.
+#' @param colorvar column name of data that identifies bubbles in the same
+#' series. Use the same value to identify all bubbles that belong to the same
+#' series; bubbles in the same series will be assigned the same color. Series
+#' can be configured using the \code{series} option.
+#' @param sizevar values in this column are mapped to actual pixel values using
+#' the \code{sizeAxis} option.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}.
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{gvisMotionChart}} for a moving bubble chart
+#' over time, and \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods.
+#' @keywords iplot
+#' @examples
+#' 
+#' 
+#' bubble1 <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses")
+#' plot(bubble1)
+#' 
+#' ## Set color and size
+#' bubble2 <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses",
+#'                           colorvar="Location", sizevar="Profit",
+#'                           options=list(hAxis='{minValue:75, maxValue:125}'))
+#' 
+#' plot(bubble2)
+#' 
+#' ## Use year to color the bubbles
+#' bubble3 <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses",
+#'                            colorvar="Year", sizevar="Profit",
+#'                            options=list(hAxis='{minValue:75, maxValue:125}'))
+#' plot(bubble3)
+#' 
+#' ## Gradient colour example
+#' bubble4 <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses",
+#'                           sizevar="Profit",
+#'                           options=list(hAxis='{minValue:75,  maxValue:125}', 
+#'                                   colorAxis="{colors: ['lightblue', 'blue']}"))
+#' plot(bubble4)
+#' 
+#' \dontrun{
+#' ## Moving bubble chart over time, aka motion chart
+#' 
+#' M <- gvisMotionChart(Fruits, Fruit, Year)
+#' plot(M)
+#' }
+#' 
+#' 
+#' 
+#' 
+gvisBubbleChart <- function(data, idvar="", xvar="", yvar="", colorvar="", sizevar="", options=list(), chartid){
+
+  my.type <- "BubbleChart"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=options, 
+                     dataName=dataName,
+                     data=list(idvar=idvar,
+                       xvar=xvar,
+                       yvar=yvar,                       
+                       colorvar=colorvar,
+                       sizevar=sizevar,
+                       allowed=c("number", "string")
+                       )
+                     )
+
+ 
+  checked.data <- gvisCheckBubbleChartData(data, my.options)
+
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid=chartid,
+                      package="corechart")
+  
+  return(output)
+}
+   
+  
+
+
+gvisCheckBubbleChartData <- function(data, options){
+
+  varNames <- names(data)
+  
+  data.structure <- list(
+                         idvar = list(mode="required", FUN=check.char),
+                         xvar = list(mode="required", FUN=check.num),
+                         yvar  = list(mode="required", FUN=check.num),
+                         colorvar  = list(mode="optional", FUN=check.char),
+                         sizevar  = list(mode="optional", FUN=check.num))
+	
+  x <- gvisCheckData(data=data,options=options,data.structure=data.structure)
+   x <- data.frame(x)
+   
+  return(x)
+}
diff --git a/R/gvisCalendar.R b/R/gvisCalendar.R
new file mode 100644
index 0000000..1b198a7
--- /dev/null
+++ b/R/gvisCalendar.R
@@ -0,0 +1,144 @@
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+
+#' Google Calendar Chart with R
+#' \Sexpr{googleChartName <- "Calendar"}
+#' \Sexpr{gvisChartName <- "gvisCalendar"}
+#' 
+#' A calendar chart is a visualization used to show activity over the course 
+#' of a long span of time, such as months or years. They're best used when 
+#' you want to illustrate how some quantity varies depending on the day of 
+#' the week, or how it trends over time.
+#' 
+#' @param data a \code{data.frame}. The data has to have at least two columns,
+#' one with date information (\code{datevar}) and one numerical variable.
+#' @param datevar column name of \code{data} which shows the date dimension.
+#' The information has to be of class \code{\link{Date}} or \code{POSIX*} time
+#' series.
+#' @param numvar column name of \code{data} which shows the values to be
+#' displayed against \code{datevar}. The information has to be
+#' \code{\link{numeric}}.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}.
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' 
+#' @section Warning:
+#' The calendar chart may be undergoing substantial revisions in future 
+#' Google Charts releases.
+#' 
+#' @seealso
+#' 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+#' plotting methods. 
+#' @keywords iplot
+#' @examples
+#' cl1 <- gvisCalendar(Cairo, datevar="Date", numvar="Temp")
+#' plot(cl1)
+#'
+#'## Not all months shown? 
+#'## We can change the setting of the width ...
+#' 
+#' cl2 <- gvisCalendar(Cairo, datevar="Date", numvar="Temp",
+#'                     options=list(width=1000))
+#' plot(cl2)
+#' 
+#' ## ... or the cell size
+#' cl3 <- gvisCalendar(Cairo, datevar="Date", 
+#'                     numvar="Temp", 
+#'                     options=list(calendar="{ cellSize: 10 }"))
+#' plot(cl3)
+#' 
+#' ## Example with many options set
+#' cl4 <- gvisCalendar(Cairo, datevar="Date", numvar="Temp",
+#'                     options=list(
+#'                     title="Daily temperature in Cairo",
+#'                     height=320,
+#'                     calendar="{yearLabel: { fontName: 'Times-Roman',
+#'                                fontSize: 32, color: '#1A8763', bold: true},
+#'                                cellSize: 10,
+#'                                cellColor: { stroke: 'red', strokeOpacity: 0.2 },
+#'                                focusedCellColor: {stroke:'red'}}")
+#'                   )
+#' plot(cl4)
+#'
+
+gvisCalendar <- function(data, datevar="", 
+                                numvar="", 
+                                options=list(), chartid){
+  
+  
+  my.type <- "Calendar"
+  dataName <- deparse(substitute(data))
+  
+  my.options <- list(gvis=modifyList(list(width = 600, height=500), options), 
+                     dataName=dataName,                     
+                     data=list(datevar=datevar, numvar=numvar,
+                               allowed=c("number", "date", "datetime"))
+  )
+  
+  checked.data <- gvisCheckCalendar(data, datevar, numvar) 
+  output <- gvisChart(type=my.type, checked.data=checked.data, 
+                      options=my.options, chartid=chartid)
+  
+  return(output)
+}
+
+gvisCheckCalendar <- function(data, datevar, numvar){
+  
+  if(any(c(datevar, numvar) %in% ""))
+    return(data[, 1:2])
+  
+  if(numvar %in% "")
+    return(cbind(data[, datevar], data[, 2]))
+  
+  if(datevar %in% "")
+    return(cbind(data[, 1], data[, numvar]))
+
+  return(data[, c(datevar, numvar)])
+
+}
+
diff --git a/R/gvisChartEditor.R b/R/gvisChartEditor.R
new file mode 100644
index 0000000..2917d2e
--- /dev/null
+++ b/R/gvisChartEditor.R
@@ -0,0 +1,36 @@
+### File R/gvisChartEditor.R
+### Part of the R package googleVis
+### Copyright 2010, 2011, 2012, 2013 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+gvisChartEditor <- function(data, type="Table",options=list(),...){
+
+  ## myCall <- paste("gvis", type, "options=modifyList(list(gvis.editor='Editor'),options),...)", sep="")
+  ## eval(parse(text=mvCall)
+ 
+  
+  if (type=="Table"){
+    
+    gvis.object <- gvisTable(data,
+         options=modifyList(list(gvis.editor="Editor"),options),...)
+  }
+  if (type=="LineChart"){
+    gvis.object <- gvisLineChart(data,
+         options=modifyList(list(gvis.editor="Editor"),options),...)
+  }
+  gvis.object
+}
diff --git a/R/gvisCoreCharts.R b/R/gvisCoreCharts.R
new file mode 100644
index 0000000..76d3f26
--- /dev/null
+++ b/R/gvisCoreCharts.R
@@ -0,0 +1,901 @@
+### File R/gvisCoreCharts.R
+### Part of the R package googleVis
+### Copyright 2011 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+#' Google Line Chart with R
+#' \Sexpr{googleChartName <- "linechart"}
+#' \Sexpr{gvisChartName <- "gvisLineChart"}
+#' 
+#' The gvisLineChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser using SVG or VML.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a line chart
+#' @param xvar name of the character column which contains the category labels
+#' for the x-axes.
+#' @param yvar a vector of column names of the numerical variables to be
+#' plotted. Each column is displayed as a separate line.
+#' @param options list of configuration options, see
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' df <- data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+#' 
+#' ## Line chart
+#' Line1 <- gvisLineChart(df, xvar="country", yvar=c("val1", "val2"))
+#' plot(Line1)
+#' 
+#' 
+#' ## Add a customised title and smoothed curve
+#' Line2 <- gvisLineChart(df, xvar="country", yvar=c("val1", "val2"),
+#'              options=list(title="Hello World",
+#'                           titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}",
+#'                           curveType='function'))
+#' plot(Line2)
+#' 
+#' \dontrun{
+#' ## Change y-axis to percentages
+#' Line3 <- gvisLineChart(df, xvar="country", yvar=c("val1", "val2"),
+#'                        options=list(vAxis="{format:'#,###%'}"))
+#' plot(Line3)
+#' 
+#' }
+#' 
+#' ## Create a chart with two y-axis:
+#' Line4 <-  gvisLineChart(df, "country", c("val1","val2"),
+#'                         options=list(series="[{targetAxisIndex: 0},
+#'                                               {targetAxisIndex:1}]",
+#'                           vAxes="[{title:'val1'}, {title:'val2'}]"
+#'                           ))
+#' plot(Line4)
+#' 
+#' ## Line chart with edit button
+#' Line5 <- gvisLineChart(df, xvar="country", yvar=c("val1", "val2"),
+#'                        options=list(gvis.editor="Edit me!"))
+#' plot(Line5)
+#' 
+#' ## Customizing lines 
+#' Dashed <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+#'              options=list(
+#'              series="[{color:'green', targetAxisIndex: 0, 
+#'                        lineWidth: 1, lineDashStyle: [2, 2, 20, 2, 20, 2]}, 
+#'                       {color: 'blue',targetAxisIndex: 1, 
+#'                        lineWidth: 2, lineDashStyle: [4, 1]}]",
+#'                        vAxes="[{title:'val1'}, {title:'val2'}]"
+#'                        ))
+#' plot(Dashed)
+#' 
+gvisLineChart <- function(data, xvar="", yvar="", options=list(), 
+                          chartid){##, editor
+
+  ##  if(!missing(editor)){
+  ##   options=list(options, gvis.editor=editor) 
+  ## }
+  gvisCoreChart(data, xvar, yvar, options, chartid, 
+                chart.type="LineChart")
+}
+
+
+
+#' Google Area Chart with R
+#' \Sexpr{googleChartName <- "areachart"}
+#' \Sexpr{gvisChartName <- "gvisAreaChart"}
+#' 
+#' The gvisAreaChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page.
+#' 
+#' The area chart is rendered within the browser using SVG or VML and displays
+#' tips when hovering over points.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as an area chart
+#' @param xvar name of the character column which contains the category labels
+#' for the x-axes.
+#' @param yvar a vector of column names of the numerical variables to be
+#' plotted. Each column is displayed as a separate line.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+#' 
+#' ## Area chart
+#' Area1 <- gvisAreaChart(df, xvar="country", yvar=c("val1", "val2"))
+#' plot(Area1)
+#' 
+#' ## Stacked chart
+#' Area2 <- gvisAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+#'       options=list(isStacked=TRUE))
+#' plot(Area2)
+#' 
+#' 
+#' ## Add a customised title
+#' Area3 <- gvisAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+#'              options=list(title="Hello World",
+#'                           titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}"))
+#' plot(Area3)
+#' 
+#' \dontrun{
+#' ## Change y-axis to percentages
+#' Area3 <- gvisAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+#'                        options=list(vAxis="{format:'#,###%'}"))
+#' plot(Area3)
+#' }
+#' 
+gvisAreaChart <- function(data, xvar="", yvar="", options=list(), 
+                          chartid){
+  
+  gvisCoreChart(data, xvar, yvar, options, chartid, 
+                chart.type="AreaChart")
+}
+
+
+#' Google Stepped Area Chart with R
+#' \Sexpr{googleChartName <- "steppedarechart"}
+#' \Sexpr{gvisChartName <- "gvisSteppedAreChart"}
+#' 
+#' The gvisSteppedAreaChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page.
+#' 
+#' The stepped area chart is rendered within the browser using SVG or VML and
+#' displays tips when hovering over points.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a stepped area
+#' chart.
+#' @param xvar name of the character column which contains the category labels
+#' for the x-axes.
+#' @param yvar a vector of column names of the numerical variables to be
+#' plotted.  Each column is displayed as a separate line.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+#' 
+#' ## Stepped Area chart
+#' SteppedArea1 <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"))
+#' plot(SteppedArea1)
+#' 
+#' ## Stacked chart
+#' SteppedArea2 <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+#'       options=list(isStacked=TRUE))
+#' plot(SteppedArea2)
+#' 
+#' 
+#' ## Add a customised title
+#' SteppedArea3 <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+#'              options=list(title="Hello World",
+#'                           titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}"))
+#' plot(SteppedArea3)
+#' 
+#' \dontrun{
+#' ## Change y-axis to percentages
+#' SteppedArea3 <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+#'                        options=list(vAxis="{format:'#,###%'}"))
+#' plot(SteppedArea3)
+#' }
+#' 
+gvisSteppedAreaChart <- function(data, xvar="", yvar="", 
+                                 options=list(), chartid){
+  
+  gvisCoreChart(data, xvar, yvar, options, chartid, 
+                chart.type="SteppedAreaChart")
+}
+
+
+
+#' Google Bar Chart with R
+#' \Sexpr{googleChartName <- "barchart"}
+#' \Sexpr{gvisChartName <- "gvisBarChart"}
+#' 
+#' The gvisBarChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser using SVG or VML.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a bar chart
+#' @param xvar name of the character column which contains the category labels
+#' for the x-axes.
+#' @param yvar a vector of column names of the numerical variables to be
+#' plotted.  Each column is displayed as a separate bar/column.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' df <- data.frame(country=c("US", "GB", "BR"), 
+#'                            val1=c(1,3,4), 
+#'                            val2=c(23,12,32))
+#' 
+#' ## Bar chart
+#' Bar1 <- gvisBarChart(df, xvar="country", yvar=c("val1", "val2"))
+#' plot(Bar1)
+#' 
+#' ## Stacked bar chart
+#' Bar2 <- gvisBarChart(df, xvar="country", yvar=c("val1", "val2"),
+#'      options=list(isStacked=TRUE))
+#' plot(Bar2)
+#' 
+#' 
+#' ## Add a customised title and change width of bars
+#' Bar3 <- gvisBarChart(df, xvar="country", yvar=c("val1", "val2"),
+#'              options=list(title="Hello World",
+#'                           titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}",
+#'                           bar="{groupWidth:'100%'}"))
+#' plot(Bar3)
+#' 
+#' \dontrun{
+#' ## Change x-axis to percentages
+#' Bar4 <- gvisBarChart(df, xvar="country", yvar=c("val1", "val2"),
+#'                        options=list(hAxis="{format:'#,###%'}"))
+#' plot(Bar4)
+#' 
+#' ## The following example reads data from a Wikipedia table and displays
+#' ## the information in a bar chart.
+#' ## We use the readHMLTable function of the XML package to get the data
+#' library(XML)
+#' ## Get the data of the biggest ISO container companies from Wikipedia
+#' ##(table 3):
+#' df=readHTMLTable(readLines("http://en.wikipedia.org/wiki/Intermodal_freight_transport"))[[3]][,1:2]
+#' ## Rename the second column
+#' names(df)[2]="TEU capacity"
+#' ## The numbers are displayed with commas to separate thousands, so let's
+#' ## get rid of them:
+#' df[,2]=as.numeric(gsub(",", "", as.character(df[,2])))
+#' 
+#' ## Finally we can create a nice bar chart:
+#' Bar5 <- gvisBarChart(df, options=list(
+#'                     chartArea="{left:250,top:50,width:\"50%\",height:\"75%\"}",
+#'                     legend="bottom", 
+#'                     title="Top 20 container shipping companies in order of TEU capacity"))
+#' 
+#' plot(Bar5)
+#' 
+#' }
+#' 
+gvisBarChart <- function(data, xvar="", yvar="", options=list(), 
+                         chartid){
+  
+  gvisCoreChart(data, xvar, yvar, options, chartid, 
+                chart.type="BarChart")
+}
+
+
+
+#' Google Column Chart with R
+#' \Sexpr{googleChartName <- "columnchart"}
+#' \Sexpr{gvisChartName <- "gvisColumnChart"}
+#' 
+#' The gvisColumnChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser using SVG or VML.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a column chart
+#' @param xvar name of the character column which contains the category labels
+#' for the x-axes.
+#' @param yvar a vector of column names of the numerical variables to be
+#' plotted.  Each column is displayed as a separate bar/column.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+#' 
+#' ## Column chart
+#' Col1 <- gvisColumnChart(df, xvar="country", yvar=c("val1", "val2"))
+#' plot(Col1)
+#' 
+#' ## Stacked column chart
+#' Col2 <- gvisColumnChart(df, xvar="country", yvar=c("val1", "val2"),
+#'      options=list(isStacked=TRUE))
+#' plot(Col2)
+#' 
+#' 
+#' ## Add a customised title and and change width of columns
+#' Col3 <- gvisColumnChart(df, xvar="country", yvar=c("val1", "val2"),
+#'              options=list(title="Hello World",
+#'                           titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}",
+#'                           bar="{groupWidth:'100%'}"))
+#' plot(Col3)
+#' 
+#' \dontrun{
+#' ## Change y-axis to percentages
+#' Col4 <- gvisColumnChart(df, xvar="country", yvar=c("val1", "val2"),
+#'                        options=list(vAxis="{format:'#,###%'}"))
+#' plot(Col4)
+#' }
+#' 
+#' 
+gvisColumnChart <- function(data, xvar="", yvar="", options=list(), 
+                            chartid){
+  
+  gvisCoreChart(data, xvar, yvar, options, chartid, 
+                chart.type="ColumnChart")
+}
+
+
+#' Google Combo Chart with R
+#' \Sexpr{googleChartName <- "combochart"}
+#' \Sexpr{gvisChartName <- "gvisComboChart"}
+#' 
+#' A chart that lets you render each series as a different marker type from the
+#' following list: columns, lines, and area lines.
+#' 
+#' The gvisComboChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser using SVG or VML.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a columns, line
+#' and area chart.
+#' @param xvar name of the character column which contains the category labels
+#' for the x-axes.
+#' @param yvar a vector of column names of the numerical variables to be
+#' plotted.  Each column is displayed as a separate column, line or area
+#' series.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' CityPopularity
+#' ## Add the mean
+#' CityPopularity$Mean=mean(CityPopularity$Popularity)
+#' 
+#' C1 <- gvisComboChart(CityPopularity, xvar="City",
+#'                                      yvar=c("Mean", "Popularity"),
+#'                                    options=list(seriesType="bars",
+#'                                                 title="City Popularity",
+#'                                                 series='{0: {type:"line"}}'))
+#' plot(C1)
+#' 
+#' ## Changing the width of columsn
+#' C2 <- gvisComboChart(CityPopularity, xvar="City",
+#'                                      yvar=c("Mean", "Popularity"),
+#'                                    options=list(seriesType="bars",
+#'                                                 bar="{groupWidth:'100%'}",
+#'                                                 title="City Popularity",
+#'                                                 series='{0: {type:"line"}}'))
+#' plot(C2)
+#' 
+#' 
+gvisComboChart <- function(data, xvar="", yvar="", options=list(), 
+                           chartid){
+
+  gvisCoreChart(data, xvar, yvar, options, chartid, 
+                chart.type="ComboChart")
+}
+
+
+
+
+#' Google Candlestick chart with R
+#' \Sexpr{googleChartName <- "candlestickchart"}
+#' \Sexpr{gvisChartName <- "gvisCandlestickChart"}
+#' 
+#' An interactive candlestick chart.
+#' 
+#' The gvisCandlestickChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser using SVG or VML.
+#' 
+#' A candlestick chart is used to show an opening and closing value overlaid on
+#' top of a total variance. Candlestick charts are often used to show stock
+#' value behavior. In this chart, items where the opening value is less than
+#' the closing value (a gain) are drawn as filled boxes, and items where the
+#' opening value is more than the closing value (a loss) are drawn as hollow
+#' boxes.
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a candlestick
+#' chart. The data has to have at least 5 columns.
+#' @param xvar name of the character column which contains the category labels
+#' for the x-axes.
+#' @param low name of the numeric column specifying the low/minimum value of
+#' this marker. This is the base of the candle's center line.
+#' @param open name of the numeric column specifying the opening/initial value
+#' of this marker. This is one vertical border of the candle. If less than the
+#' \code{close} value, the candle will be filled; otherwise it will be hollow.
+#' @param close name of the numeric column specifying the closing/final value
+#' of this marker. This is the second vertical border of the candle. If less
+#' than the \code{open} value, the candle will be hollow; otherwise it will be
+#' filled.
+#' @param high name of the numeric column specifying the high/maximum value of
+#' this marker. This is the top of the candle's center line.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' ## Example data set
+#' OpenClose
+#' 
+#' C1 <- gvisCandlestickChart(OpenClose, xvar="Weekday", low="Low",
+#'                                       open="Open", close="Close",
+#'                                       high="High",
+#'                                       options=list(legend='none'))
+#' 
+#' plot(C1)
+#' 
+#' 
+gvisCandlestickChart<- function(data, xvar="", low="", open="", close="", 
+                                high="", options=list(), chartid){
+  
+  data <- gvisCheckCandestickChartData(data)
+  
+  gvisCoreChart(data, xvar, yvar=c(low, open, close, high), 
+                options, chartid, chart.type="CandlestickChart")
+}
+
+
+
+#' Google Scatter Chart with R
+#' \Sexpr{googleChartName <- "scatterchart"}
+#' \Sexpr{gvisChartName <- "gvisScatterChart"}
+#' 
+#' The gvisScatterChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser using SVG or VML.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a scatter chart.
+#' Two or more columns are required, all must be numeric. The values in the
+#' first column are used for the X-axis. The values in following columns are
+#' used for the Y-axis. Each column is displayed with a separate color.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' 
+#' ## Scatter chart
+#' Scatter1 <- gvisScatterChart(women)
+#' plot(Scatter1)
+#' 
+#' ## Using optional arguments
+#' Scatter2 <- gvisScatterChart(women, options=list(legend="none",
+#'                  lineWidth=2, pointSize=2,
+#'                  title="Women", vAxis="{title:'weight (lbs)'}",
+#'                  crosshair="{ trigger: 'both' }", 
+#'                  hAxis="{title:'height (in)'}", width=500, height=400))
+#'                  
+#' plot(Scatter2)
+#' 
+#' 
+#' df=data.frame(x=sin(1:100/3), 
+#'               Circle=cos(1:100/3), 
+#'  	      Ellipse=cos(1:100/3)*0.5)
+#' 
+#' ## Plot several variables as smooth curves
+#' Scatter3 <- gvisScatterChart(df, 
+#' 	    		options=list(curveType='function', 
+#' 				     pointSize=0, 
+#' 				     lineWidth=2))
+#' plot(Scatter3)
+#' 
+#' ## Two series in the same plot with different
+#' ## x-values
+#' df <- data.frame(x=c(2,2,1,3,4),
+#'                  y1=c(0,3,NA,NA,NA),
+#'                  y2=c(NA,NA,0,3,2))
+#' Scatter4 <- gvisScatterChart(df,
+#'                              options=list(lineWidth=2,
+#'                                           pointSize=2))
+#' plot(Scatter4)
+#' 
+#' ## Customize points
+#' M <- matrix(nrow=6,ncol=6)
+#' M[col(M)==row(M)] <- 1:6
+#' dat <- data.frame(X=1:6, M)
+#' SC <- gvisScatterChart(dat, 
+#'                         options=list(
+#'                         title="Customizing points",
+#'                         legend="right",
+#'                         pointSize=30,
+#'                         series="{
+#'                              0: { pointShape: 'circle' },
+#'                              1: { pointShape: 'triangle' },
+#'                              2: { pointShape: 'square' },
+#'                              3: { pointShape: 'diamond' },
+#'                              4: { pointShape: 'star' },
+#'                              5: { pointShape: 'polygon' }
+#'                              }"))
+#' plot(SC)
+#'
+gvisScatterChart <- function(data, options=list(), chartid){
+  
+  my.type <- "ScatterChart"
+  dataName <- deparse(substitute(data))
+  
+  my.options <- list(gvis=modifyList(list(allowHtml=TRUE),options), 
+                     dataName=dataName,
+                     data=list(allowed=c("number")))
+  
+  checked.data <- gvisCheckScatterChartData(data)
+  
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid=chartid, package="corechart") 
+  
+  return(output)
+}
+
+
+gvisCheckCandestickChartData <- function(data){
+  if(ncol(data) < 5)
+    stop(paste("The input data requires 5 columns, for xvar, low, open, close, high.\n",
+               "However, your data set has only:", ncol(data)))          
+  return(data)
+}
+
+gvisCheckScatterChartData <- function(data){
+  
+  ## nothing to check at the moment here
+  return(data)
+}
+
+
+
+gvisCoreChart <- function(data, xvar="", yvar="", options=list(), 
+                          chartid, chart.type){
+  
+  if(!is.data.frame(data)){
+    stop("Error: data has to be a data.frame.")
+  }
+  
+  dataName <- deparse(substitute(data))
+  
+  my.options <- list(gvis=modifyList(list(allowHtml=TRUE),options), dataName=dataName,
+                     data=list(xvar=xvar, yvar=yvar,
+                       allowed=c("string", "number", "date", 
+                                 "datetime"#, "boolean"
+                                 ))
+                     )
+  
+  
+  checked.data <- gvisCheckCoreChartData(data, xvar=xvar, yvar=yvar)
+
+  
+  output <- gvisChart(type=chart.type, checked.data=checked.data, options=my.options, chartid=chartid, package="corechart") 
+  
+  return(output)
+}
+
+
+gvisCheckCoreChartData <- function(data, xvar, yvar){
+  
+  if(!is.data.frame(data)){
+    stop("Error: data has to be a data.frame.")
+  }
+  
+  if(xvar=="")
+    xvar <- names(data)[1]
+  
+  if(ncol(data)>1){
+    rest <- names(data)[!names(data) %in% xvar]
+    data <- data[,c(xvar, rest)]
+  }
+  
+  if("integer" %in% class(data[,xvar]))
+    data[,xvar] <- as.character(data[,xvar])
+  
+  if("" %in% yvar){
+    if(ncol(data) > 2){
+      yvar <- sapply(data[,-1], is.numeric)
+      yvar <- names(yvar[yvar])
+    }else{
+      yvar=names(data)[2]
+    }
+    
+  }
+  
+  data <- data[,c(xvar, yvar)]
+  names(data) <- c(xvar, yvar)
+  
+  if(!any(sapply(data, is.numeric))){
+    stop("Error: Your data has to have at least one numerical column.")
+  }
+
+  return(data)
+}
+
diff --git a/R/gvisGeoChart.R b/R/gvisGeoChart.R
new file mode 100644
index 0000000..dca7eb4
--- /dev/null
+++ b/R/gvisGeoChart.R
@@ -0,0 +1,277 @@
+### File R/gvisGeoChart.R
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+#' Google Geo Chart with R
+#' \Sexpr{googleChartName <- "geochart"}
+#' \Sexpr{gvisChartName <- "gvisGeoChart"}
+#' 
+#' The gvisGeoChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page.
+#' 
+#' A geo chart is a map of a country, a continent, or a region with two modes:
+#' The region mode colorizes whole regions, such as countries, provinces, or
+#' states. The marker mode marks designated regions using bubbles that are
+#' scaled according to a value that you specify.
+#' 
+#' A geo chart is rendered within the browser using SVG or VML. Note that the
+#' map is not scrollable or draggable.
+#' 
+#' 
+#' @param data a \code{data.frame}. The data has to have at least one column
+#' with location name (\code{locationvar}), value to be mapped to location. The
+#' format of the data varies depending on which display mode that you use:
+#' Regions or Markers.
+#' @param locationvar column name of \code{data} with the geo locations to be
+#' analysed. The locations can be provide in two formats: \describe{
+#' \item{Format 1}{'latitude:longitude'. See the example below.} \item{Format
+#' 2}{Address, country name, region name locations, or US metropolitan area
+#' codes, see
+#' \url{http://code.google.com/apis/adwords/docs/developer/adwords_api_us_metros.html}.
+#' This format works with the \code{dataMode} option set to either 'markers' or
+#' 'regions'. The following formats are accepted: A specific address (for
+#' example, "1600 Pennsylvania Ave"). A country name as a string (for example,
+#' "England"), or an uppercase ISO-3166 code or its English text equivalent
+#' (for example, "GB" or "United Kingdom").  An uppercase ISO-3166-2 region
+#' code name or its English text equivalent (for example, "US-NJ" or "New
+#' Jersey").  } }
+#' @param colorvar column name of \code{data} with the optional numeric column
+#' used to assign a color to this marker, based on the scale specified in the
+#' \code{colorAxis.colors} property. If this column is not present, all markers
+#' will be the same color. If the column is present, null values are not
+#' allowed. Values are scaled relative to each other, or absolutely to values
+#' specified in the \code{colorAxis.values} property.
+#' @param sizevar only used for \code{displayMode='markers'}. Column name of
+#' \code{data} with the optional numeric column used to assign the marker size,
+#' relative to the other marker sizes. If this column is not present, the value
+#' from the previous column will be used (or default `size, if no color column
+#' is provided as well). If the column is present, null valuesare not allowed.
+#' @param hovervar column name of \code{data} with the additional string text
+#' displayed when the user hovers over this region.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com}, 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' 
+#' @seealso 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} 
+#' for printing and plotting methods.
+#' 
+#' @export
+#' 
+#' @keywords iplot
+#' 
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Internet
+#' ## connection to display the visualisation.
+#' 
+#' ## Regions examples
+#' ## The regions style fills entire regions (typically countries) with
+#' ## colors corresponding to the values that you assign
+#' 
+#' G1a <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit') 
+#' 
+#' plot(G1a)
+#' 
+#' ## Change projection
+#' G1b <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit',
+#'                    options=list(projection="kavrayskiy-vii")) 
+#' 
+#' plot(G1b)
+#' 
+#' ## Plot only Europe
+#' G2 <- gvisGeoChart(Exports, "Country", "Profit",
+#'                    options=list(region="150"))
+#' 
+#' plot(G2)
+#' 
+#' 
+#' ## Example showing US data by state 
+#' require(datasets)
+#' 
+#' states <- data.frame(state.name, state.x77)
+#' G3 <- gvisGeoChart(states, "state.name", "Illiteracy",
+#'                  options=list(region="US", displayMode="regions", 
+#'                               resolution="provinces",
+#'    	 width=600, height=400))
+#' plot(G3)
+#' 
+#' ## Markers Example
+#' ## A marker style map renders bubble-shaped markers at specified
+#' ## locations with the color and size that you specify.
+#' 
+#' G4 <- gvisGeoChart(CityPopularity, locationvar='City', colorvar='Popularity',
+#'                       options=list(region='US', height=350, 
+#'                                    displayMode='markers',
+#' 				   colorAxis="{values:[200,400,600,800],
+#'                                    colors:[\'red', \'pink\', \'orange',\'green']}")
+#'                       ) 
+#' plot(G4)
+#' 
+#' G5 <- gvisGeoChart(Andrew, "LatLong", colorvar='Speed_kt',
+#'                    options=list(region="US"))
+#' plot(G5)
+#' 
+#' 
+#' G6 <- gvisGeoChart(Andrew, "LatLong", sizevar='Speed_kt',
+#'                    colorvar="Pressure_mb", options=list(region="US"))
+#' plot(G6)
+#' 
+#' ## Create lat:long values and plot a map of Oceania
+#' ## Set background colour to light-blue
+#' 
+#' require(stats)
+#' data(quakes)
+#' head(quakes)
+#' quakes$latlong<-paste(quakes$lat, quakes$long, sep=":")
+#' 
+#' G7 <- gvisGeoChart(quakes, "latlong", "depth", "mag",
+#'                    options=list(displayMode="Markers", region="009",
+#'                    colorAxis="{colors:['red', 'grey']}",
+#'                    backgroundColor="lightblue"))
+#' 
+#' plot(G7)
+#' 
+#' \dontrun{
+#' # Plot S&P countries' credit rating sourced from Wikipedia
+#' # Use the hovervar to show the rating
+#' library(XML)
+#' url <- "http://en.wikipedia.org/wiki/List_of_countries_by_credit_rating"
+#' x <- readHTMLTable(readLines(url), which=3)
+#' levels(x$Rating) <- substring(levels(x$Rating), 4, 
+#'                               nchar(levels(x$Rating)))
+#' x$Ranking <- x$Rating
+#' levels(x$Ranking) <- nlevels(x$Rating):1
+#' x$Ranking <- as.character(x$Ranking)
+#' x$Rating <- paste(x$Country, x$Rating, sep=": ")
+#' #### Create a geo chart
+#' G8 <- gvisGeoChart(x, "Country", "Ranking", hovervar="Rating",
+#'                 options=list(gvis.editor="S&P", 
+#'                              colorAxis="{colors:['#91BFDB', '#FC8D59']}"))
+#' plot(G8)
+#' 
+#' 
+#' ## Plot world wide earth quakes of the last 30 days with magnitude >= 4.0 
+#' library(XML)
+#' ## Get earthquake data of the last 30 days
+#' eq <- read.csv("http://earthquake.usgs.gov/earthquakes/feed/v0.1/summary/2.5_week.csv")
+#' eq$loc=paste(eq$Latitude, eq$Longitude, sep=":")
+#' 
+#' G9 <- gvisGeoChart(eq, "loc", "Depth", "Magnitude",
+#'                    options=list(displayMode="Markers", 
+#'                    colorAxis="{colors:['purple', 'red', 'orange', 'grey']}",
+#'                    backgroundColor="lightblue"), chartid="EQ")
+#' plot(G9)
+#' }
+#' 
+gvisGeoChart <- function(data, locationvar="", ## numvar="",
+                         colorvar="", sizevar="",
+                         hovervar="",
+                         options=list(), chartid){
+
+  my.type <- "GeoChart"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=modifyList(list(width = 556, height=347),options), 
+                     dataName=dataName,
+                     data=list(locationvar=locationvar,
+                               hovervar=hovervar,  
+                               ## numvar=numvar,
+                       colorvar=colorvar,
+                       sizevar=sizevar,
+                       
+                       allowed=c("number", "string")
+                       )
+                     )
+  
+  checked.data <- gvisCheckGeoChartData(data, my.options)
+
+  if(any("numeric" %in% lapply(checked.data[,1], class))){
+    my.options <- modifyList(list(gvis=list()), my.options)
+  }
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid=chartid)
+  
+  return(output)
+}
+
+
+gvisCheckGeoChartData <- function(data, options){
+
+  data.structure <- list(
+        	     locationvar = list(mode="required",FUN=check.location),
+        	     hovervar    = list(mode="optional",FUN=check.char),
+        	     ## numvar      = list(mode="optional",FUN=check.num),
+                     colorvar      = list(mode="optional",FUN=check.num),
+        	     sizevar    = list(mode="optional",FUN=check.num))
+	
+  x <- gvisCheckData(data=data,options=options,data.structure=data.structure)
+
+  if (sum(nchar(gsub("[[:digit:].-]+:[[:digit:].-]+", "", x[[1]]))) == 0){
+  	# split first index and delete this one
+  	latlong <- as.data.frame(do.call("rbind",strsplit(as.character(x[[1]]),':')))
+  	x[[1]] <- NULL
+	varNames <- names(x)
+  	x$Latitude <- as.numeric(as.character(latlong$V1))
+  	x$Longitude <- as.numeric(as.character(latlong$V2))
+    	x <- x[c("Latitude","Longitude",varNames)]
+  }
+
+  return(data.frame(x))
+}
+
+## gvisCheckGeoMapData <- function(data, options){
+## 
+##   data.structure <- list(
+##                          locationvar = list(mode="required",FUN=check.location),
+##                          numvar      = list(mode="optional",FUN=check.num),
+##                          sizevar     = list(mode="optional",FUN=check.num)
+##                          )
+## 	
+##   x <- gvisCheckData(data=data,options=options,data.structure=data.structure)
+##   
+##   return(data.frame(x))
+## }
diff --git a/R/gvisGeoMap.R b/R/gvisGeoMap.R
new file mode 100644
index 0000000..7cf57f7
--- /dev/null
+++ b/R/gvisGeoMap.R
@@ -0,0 +1,208 @@
+### File R/gvisGeoMap.R
+### Part of the R package googleVis
+### Copyright 2010, 2011, 2012, 2013 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+#'
+
+#' Google Geo Map with R 
+#' \Sexpr{googleChartName <- "geomap"}
+#' \Sexpr{gvisChartName <- "gvisGeoMap"}
+#' @description
+#' The gvisGeoMap function reads a data.frame and
+#' creates text output referring to the Google Visualisation API, which can be
+#' included into a web page, or as a stand-alone page.
+#' 
+#' A geo map is a map of a country, continent, or region map, with colours
+#' and values assigned to specific regions. Values are displayed as a colour
+#' scale, and you can specify optional hover-text for regions. The map is
+#' rendered in the browser. Note that the
+#' map is not scroll-able or drag-gable, but can be configured to allow
+#' zooming.
+#'
+#' @param data \code{data.frame}. The data has to have at least two
+#' columns with location name (\code{locationvar}), value to be mapped
+#' to location (\code{numvar}) and an optional variable to display any
+#' text while the mouse hovers over the location (\code{hovervar}).
+#' @param locationvar column name of \code{data} with the geo locations to be
+#' analysed. The locations can be provide in two formats:
+#' 
+#' \describe{      
+#' \item{Format 1}{'latitude:longitude'. See the example below.}
+#' \item{Format 2}{Address, country name, region name locations, or
+#' US metropolitan area codes, see
+#' \url{http://code.google.com/apis/adwords/docs/developer/adwords_api_us_metros.html}. 
+#' This format works with the \code{dataMode} option set to either
+#' 'markers' or 'regions'. The following formats are accepted: 
+#' A specific address (for example, "1600 Pennsylvania Ave"). 
+#' A country name as a string (for example, "England"), or an uppercase ISO-3166 code
+#'  or its English text equivalent (for example, "GB" or "United Kingdom").
+#'   An uppercase ISO-3166-2 region code name or its English text
+#'    equivalent (for example, "US-NJ" or "New Jersey"). 
+#'    }
+#'  }
+#' @param numvar column name of \code{data} with the numeric value
+#'   displayed when the user hovers over this region.
+#' @param hovervar column name of \code{data} with the additional string
+#'  text displayed when the user hovers over this region. 
+#' @param options list of configuration options.
+#' The options are documented in detail by Google online:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com}, 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' 
+#' 
+#' @section Warnings:
+#' GeoMap (gvisGeoMap) is Flash based, conisder using GeoChart (gvisGeoChart) instead.
+#' For more details visit: goo.gl/tkiEV8
+#' 
+#' Because of Flash security settings the chart 
+#' might not work correctly when accessed from a file location in the 
+#' browser (e.g., file:///c:/webhost/myhost/myviz.html) rather than 
+#' from a web server URL (e.g. http://www.myhost.com/myviz.html). 
+#' See the googleVis package vignette and the Macromedia web 
+#' site (\url{http://www.macromedia.com/support/documentation/en/flashplayer/help/}) 
+#' for more details.
+#' 
+#' @export
+#'  
+#' @keywords iplot
+#' 
+#' @examples
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Internet
+#' ## connection to display the visualisation.
+#' 
+#' ## Regions Example
+#' ## The regions style fills entire regions (typically countries) with colors
+#' ## corresponding to the values that you assign. Specify the regions style
+#' ## by assigning options['dataMode'] = 'regions' in your code.
+#' 
+#' G1 <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+#'                  options=list(dataMode="regions")) 
+#' 
+#' plot(G1)
+#' 
+#' ## Markers Example
+#' ## The "markers" style displays a circle, sized and colored to indicate
+#' ## a value, over the regions that you specify. 
+#' G2 <- gvisGeoMap(CityPopularity, locationvar='City', numvar='Popularity',
+#'                  options=list(region='US', height=350, 
+#'                               dataMode='markers',
+#'                               colors='[0xFF8747, 0xFFB581, 0xc06000]'))  
+#' 
+#' plot(G2) 
+#' 
+#' ## Example showing US data by state 
+#' 
+#' require(datasets)
+#' states <- data.frame(state.name, state.x77)
+#' 
+#' G3 <- gvisGeoMap(states, "state.name", "Illiteracy",
+#'                  options=list(region="US", dataMode="regions",
+#'                               width=600, height=400))
+#' plot(G3) 
+#' 
+#' ## Example with latitude and longitude information
+#' ## Show Hurricane Andrew (1992) storm track
+#' G4 <- gvisGeoMap(Andrew, locationvar="LatLong", numvar="Speed_kt", 
+#'                  hovervar="Category", 
+#'                  options=list(height=350, region="US", dataMode="markers"))
+#' 
+#' plot(G4) 
+#' 
+#' ## World population
+#' WorldPopulation=data.frame(Country=Population$Country, 
+#'                            Population.in.millions=round(Population$Population/1e6,0),
+#'                            Rank=paste(Population$Country, "Rank:", Population$Rank))
+#' 
+#' G5 <- gvisGeoMap(WorldPopulation, "Country", "Population.in.millions", "Rank", 
+#'                  options=list(dataMode="regions", width=600, height=300))
+#' plot(G5)
+#' 
+
+gvisGeoMap <- function(data, locationvar="", numvar="", hovervar="", options=list(), chartid){
+
+  warning("GeoMap (gvisGeoMap) is Flash based, conisder using GeoChart (gvisGeoChart) instead.\nFor more details visit: goo.gl/tkiEV8")
+  
+  my.type <- "GeoMap"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=modifyList(list(width = 556, height=347),options), 
+                     dataName=dataName,
+                     data=list(locationvar=locationvar, numvar=numvar,
+                       hovervar=hovervar,  
+                     allowed=c("number", "string")))
+  
+  checked.data <- gvisCheckGeoMapData(data, my.options)
+
+  if(any("numeric" %in% lapply(checked.data[,c(1,2)],class))){
+    my.options <- modifyList(list(gvis=list(dataMode = "regions")), my.options)
+  }
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid=chartid)
+  
+  return(output)
+}
+
+gvisCheckGeoMapData <- function(data, options){
+
+  data.structure <- list(
+        	     locationvar = list(mode="required",FUN=check.location),
+        	     numvar      = list(mode="optional",FUN=check.num),
+        	     hovervar    = list(mode="optional",FUN=check.char))
+	
+  x <- gvisCheckData(data=data,options=options,data.structure=data.structure)
+
+  if (sum(nchar(gsub("[[:digit:].-]+:[[:digit:].-]+", "", x[[1]]))) == 0){
+  	# split first index and delete this one
+  	latlong <- as.data.frame(do.call("rbind",strsplit(as.character(x[[1]]),':')))
+  	x[[1]] <- NULL
+	varNames <- names(x)
+  	x$Latitude <- as.numeric(as.character(latlong$V1))
+  	x$Longitude <- as.numeric(as.character(latlong$V2))
+    	x <- x[c("Latitude","Longitude",varNames)]
+  }
+
+  return(data.frame(x))
+}
+
diff --git a/R/gvisHistogram.R b/R/gvisHistogram.R
new file mode 100644
index 0000000..91e6111
--- /dev/null
+++ b/R/gvisHistogram.R
@@ -0,0 +1,107 @@
+### Part of the R package googleVis
+### Copyright 2011 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+#' Google Histogram Chart with R
+#' \Sexpr{googleChartName <- "histogram"}
+#' \Sexpr{gvisChartName <- "gvisHistogram"}
+#' 
+#' The gvisHistogram function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser using SVG or VML.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a histogram. 
+#' Each column will be displayed as a histogram.
+#' 
+#' @param options list of configuration options, see
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}.
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' 
+#' hist1 <- gvisHistogram(dino)
+#' plot(hist1)
+#' 
+#' ## Histogram of the top 20 countries
+#' pop <- Population[1:20,c("Country", "Population")]
+#' pop=transform(pop, Population=round(Population/1e6))
+#' 
+#' hist2 <- gvisHistogram(pop, option=list(title="Country Populations",
+#'                                     legend="{ position: 'none' }",
+#'                                     colors="['green']"))
+#' plot(hist2)
+#'                                     
+#' set.seed(123)
+#' dat=data.frame(A=rpois(100, 20), 
+#'                B=rpois(100, 5), 
+#'                C=rpois(100, 50))
+#' hist3 <- gvisHistogram(dat, options=list(
+#'                        legend="{ position: 'top', maxLines: 2 }",
+#'                        colors="['#5C3292', '#1A8763', '#871B47']"))
+#' 
+#' plot(hist3)
+
+gvisHistogram <- function(data, options=list(), chartid){##, editor
+  
+  my.type <- "Histogram"
+  dataName <- deparse(substitute(data))
+  
+  my.options <- list(gvis=modifyList(list(allowHtml=TRUE),options), 
+                     dataName=dataName,
+                     data=list(allowed=c("number", "string")))
+  
+  output <- gvisChart(type=my.type, checked.data=data, 
+                      options=my.options, chartid=chartid, 
+                      package="corechart") 
+}
diff --git a/R/gvisIntensityMap.R b/R/gvisIntensityMap.R
new file mode 100644
index 0000000..0c95e02
--- /dev/null
+++ b/R/gvisIntensityMap.R
@@ -0,0 +1,129 @@
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+#' Google Intensity Map with R
+#' \Sexpr{googleChartName <- "intensitymap"}
+#' \Sexpr{gvisChartName <- "gvisIntensityMap"}
+#' 
+#' An intensity map highlights regions or countries based on relative values.
+#' 
+#' The gvisIntensityMap function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page.
+#' 
+#' 
+#' @param data a \code{data.frame}. The data has to have at least two columns
+#' with location name (\code{locationvar}) and any number of numeric columns
+#' (\code{numvar}) to be mapped.
+#' @param locationvar column name of \code{data} with the geo locations to be
+#' analysed. The location has to contain country ISO codes or USA state codes.
+#' @param numvar column names of \code{data} with the numeric values to be
+#' displayed.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' @section Note:
+#' Please note that the maximum height for this visualisation is 220 and 
+#' the maximum width is 440. For more details see the Google documentation.
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso
+#' 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+#' plotting methods, \code{\link{gvisMap}} and \code{\link{gvisGeoMap}} for an
+#' alternative to \code{gvisIntensityMap}.
+#' 
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Internet
+#' ## connection to display the visualisation.
+#' 
+#' df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+#' Intensity1 <- gvisIntensityMap(df, locationvar="country", numvar=c("val1", "val2"))
+#' plot(Intensity1)
+#' 
+#' ## Set colours for each tab
+#' Intensity2 <- gvisIntensityMap(df,
+#'               options=list(colors="['#4682b4', '#0073CF']"))
+#' plot(Intensity2)
+#' 
+#' 
+#' 
+gvisIntensityMap <- function(data, locationvar="", numvar="", options=list(), chartid){
+
+  my.type <- "IntensityMap"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=modifyList(list(width = 600),options), 
+                     dataName=dataName,
+                     data=list(locationvar=locationvar, numvar=numvar,
+                     allowed=c("number", "string")))
+  
+ checked.data <- gvisCheckIntensityMapData(data, locationvar, numvar)
+
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid=chartid)
+  
+  return(output)
+}
+
+gvisCheckIntensityMapData <- function(data, locationvar, numvar){
+
+  if(! is.data.frame(data) ){
+    stop("Error: data has to be a data.frame.")
+  }
+  if(locationvar=="")
+    locationvar <- 1
+  data[[locationvar]] <- as.character(data[[locationvar]])
+
+   if("" %in% numvar)
+    numvar <- 2:ncol(data)
+
+  data[numvar] <-  sapply(data[numvar], as.numeric)
+
+  data <-  data[c(locationvar, numvar)]
+  
+  return(data)
+}
diff --git a/R/gvisMap.R b/R/gvisMap.R
new file mode 100644
index 0000000..ef6c61c
--- /dev/null
+++ b/R/gvisMap.R
@@ -0,0 +1,163 @@
+### File R/gvisMap.R
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+
+#' Google Maps with R
+#' \Sexpr{googleChartName <- "map"}
+#' \Sexpr{gvisChartName <- "gvisMap"}
+#' 
+#' The gvisMap function reads a data.frame and creates text output referring to
+#' the Google Visualisation API, which can be included into a web page, or as a
+#' stand-alone page.
+#' 
+#' The maps are the well known Google Maps.
+#' 
+#' @param data a \code{data.frame}. The data has to have at least two columns
+#' with location name (\code{locationvar}) and the variable to display the text
+#' in the tip icon (\code{tipvar}).
+#' 
+#' @param locationvar column name of \code{data} with the geo locations to be
+#' analysed. The locations can be provide in two formats: \describe{
+#' \item{Format 1}{'latitude:longitude'. See the example below.} \item{Format
+#' 2}{The first column should be a string that contains an address. This
+#' address should be as complete as you can make it.  } }
+#' @param tipvar column name of \code{data} with the string text displayed over
+#' the tip icon.
+#' @param options list of configuration options for Google Map.  
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso
+#' 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+#' plotting methods, \code{\link{gvisGeoMap}} and
+#' \code{\link{gvisIntensityMap}} for an alternative to \code{gvisMap}.
+#' 
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Internet
+#' ## connection to display the visualisation.
+#'   
+#' ## Example with latitude and longitude information
+#' ## Plot Hurricane Andrew (1992) storm path:
+#' 
+#' data(Andrew)
+#' 
+#' M1 <- gvisMap(Andrew, "LatLong" , "Tip",
+#'               options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE,
+#'                            mapType='hybrid', useMapTypeControl=TRUE,
+#'                            width=800,height=400))
+#' 
+#' plot(M1) 
+#' 
+#' 
+#' ## Example with address, here UK post-code and some html code in tooltip
+#' 
+#' df <- data.frame(Postcode=c("EC3M 7HA", "EC2P 2EJ"),
+#'                  Tip=c("<a href='http://www.lloyds.com'>Lloyd's</a>", 
+#'                  "<a href='http://www.guildhall.cityoflondon.gov.uk/'>Guildhall</a>"))
+#'  
+#' M2 <- gvisMap(df, "Postcode", "Tip",
+#'               options=list(showTip=TRUE, mapType='normal',
+#'               enableScrollWheel=TRUE))
+#'  
+#' plot(M2)
+#' 
+#' ## Change mapping icons
+#' M3 <- gvisMap(df, "Postcode", "Tip",
+#'               options=list(showTip=TRUE, mapType='normal',
+#'               enableScrollWheel=TRUE,
+#'               icons=paste0("{",
+#'               "'default': {'normal': 'http://icons.iconarchive.com/",
+#'               "icons/icons-land/vista-map-markers/48/",
+#'               "Map-Marker-Ball-Azure-icon.png',\n",
+#'               "'selected': 'http://icons.iconarchive.com/",
+#'               "icons/icons-land/vista-map-markers/48/",
+#'               "Map-Marker-Ball-Right-Azure-icon.png'",
+#'               "}}")))
+#'                         
+#' plot(M3)
+
+gvisMap <- function(data, locationvar="", tipvar="",options=list(), chartid){
+
+  my.type <- "Map"
+  dataName <- deparse(substitute(data))
+  my.options <- list(gvis=modifyList(list(showTip = TRUE),options), 
+		     dataName=dataName, 
+                     data=list(locationvar=locationvar, tipvar=tipvar,
+		      allowed=c("number","string"))
+                     )
+  
+  checked.data <- gvisCheckMapData(data, my.options)
+
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid=chartid)
+  
+  return(output)
+}
+
+gvisCheckMapData <- function(data, options){
+
+  data.structure <- list(
+        	     locationvar   = list(mode="required",FUN=check.location),
+        	     tipvar  = list(mode="required",FUN=check.char))
+	
+  x <- gvisCheckData(data=data,options=options,data.structure=data.structure)
+
+  if (sum(nchar(gsub("[[:digit:].-]+:[[:digit:].-]+", "", x[[1]]))) == 0){
+  	# split first index and delete this one
+  	latlong <- as.data.frame(do.call("rbind",strsplit(as.character(x[[1]]),':')))
+  	x[[1]] <- NULL
+	varNames <- names(x)
+  	x$Latitude <- as.numeric(as.character(latlong$V1))
+  	x$Longitude <- as.numeric(as.character(latlong$V2))
+    	x <- x[c("Latitude","Longitude",varNames)]
+  }
+  
+  return(data.frame(x))
+}
diff --git a/R/gvisMethods.R b/R/gvisMethods.R
new file mode 100644
index 0000000..577518e
--- /dev/null
+++ b/R/gvisMethods.R
@@ -0,0 +1,188 @@
+### File R/gvisMethods.R
+### Part of the R package googleVis
+### Copyright 2010, 2011, 2012, 2013 Markus Gesmann, Diego de Castillo
+### Distributed under GPL 2 or later
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+print.gvis <- function(x, tag=NULL, file="", ...){
+
+  if(is.null(tag))
+    tag <- getOption("gvis.print.tag")
+  
+  if(!tag %in% getOption("gvis.tags"))
+        stop(paste(tag,
+        "is not a valid option. Set tag to NULL or one of the following:\n",
+                   paste(getOption("gvis.tags"), collapse=", "))) 
+      
+  tag <- ifelse( tag %in% c("chartid", "type", "html"), tag, paste(".", tag, sep=""))
+
+  output <- unlist(x)
+  tag.names <- names(output)
+  .id <- apply(t(tag), 2, function(y)
+               grep(paste("\\", y, sep=""), tag.names)
+               )
+  cat(output[.id], file=file, ...)
+  
+}
+
+
+isServerRunning <- function() {
+  #tools:::httpdPort > 0L
+  ifelse(R.version['svn rev'] < 67550 | getRversion() < "3.2.0",
+         get("httpdPort", envir=environment(startDynamicHelp))>0,
+         tools::startDynamicHelp(NA)>0
+  )  
+}
+
+googlevis.httpd.handler <- function(path, query, ...) {
+  path <- gsub("^/custom/googleVis/", "", path)
+  f <- sprintf("%s%s%s",
+               tempdir(),
+               .Platform$file.sep,
+                 path) 
+  list(file=f,
+       "content-type"="text/html",
+       "status code"=200L)
+}
+
+plot.gvis <- function(x, tag=NULL, ...){
+
+  if(missing(tag)) ## Has tag being actively set?
+    tag <- getOption("gvis.plot.tag")
+
+  if(is.null(tag) | !('gvis' %in% class(x))){  ## Open browser window if tag is NULL   
+    if(!isServerRunning() ) {
+      startDynamicHelp()
+    }
+    
+    env <- get( ".httpd.handlers.env", asNamespace("tools"))
+    env[["googleVis"]] <- googlevis.httpd.handler    
+    root.dir <- tempdir()
+    
+    ## Write the whole visualisation into a html file
+    if('gvis' %in% class(x)){          
+      ## Write the pure chart html code into a separate file
+      chart.txt <- '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>%s</title>
+  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+  <style type="text/css">
+    body {
+          color: #444444;
+          font-family: Arial,Helvetica,sans-serif;
+          font-size: 75%%;
+    }
+    a {
+          color: #4D87C7;
+          text-decoration: none;
+    }
+  </style>
+</head>
+<body>
+<p>
+  You find below the HTML code of the visualisation.<br />
+  You can copy and paste the code into an existing HTML page.<br />
+  For more information see also <a href="/library/googleVis/html/gvisMethods.html">?print.gvis</a></p>
+<p><textarea rows="50" name="html" cols="80">
+%s
+</textarea>
+</p>
+</body>
+</html>
+'    
+      chart.txt <- sprintf(chart.txt, x$chartid,gsub(">",">",gsub("<","<",
+                                                                     paste(unlist(x$html$chart), collapse="\n"))))
+      cat(chart.txt, file=file.path(root.dir, paste("Chart_", x$chartid, ".html", sep="")))      
+      file <- file.path(root.dir, paste(x$chartid ,".html", sep=""))
+    }else{## not a gvis object
+      basex <- basename(x)
+      if(length(grep("htm", substr(basex, nchar(basex)-3,nchar(basex)))) < 1)
+        warning("The file does not appear to be an html file.\n")
+      file.copy(from=x, to=file.path(root.dir, basex),...)
+      file <- file.path(root.dir, basex)
+    }    
+    print(x, file=file)    
+    .url <- sprintf("http://127.0.0.1:%s/custom/googleVis/%s",
+                    #tools:::httpdPort,
+                    ifelse(R.version['svn rev'] < 67550 | getRversion() < "3.2.0",
+                           get("httpdPort", envir=environment(startDynamicHelp)),
+                           tools::startDynamicHelp(NA)
+                           ),
+                    basename(file))
+     if(interactive()){
+#      viewer <- getOption("googleVis.viewer")
+#       if (!is.null(viewer) )        
+#         viewer(.url)#"http://localhost:8100")
+#       else
+             browseURL(.url, ...)
+     }else{ ## not interactive modus     
+      browseURL(.url, browser='false',...)
+     }
+    invisible(file)
+  }else{ ## givs.plot.tag not NULL
+    if('gvis' %in% class(x)){
+      return(print(x, tag=tag))
+    }else{
+      return(print(x))
+    }
+  }  
+}
+  
+gvisMerge <- function(x, y, horizontal=FALSE, tableOptions='border="0"',
+                      chartid){
+
+  type="gvisMerge"
+
+  if(any(c(missing(x), missing(y))))
+    stop("Please provide two gvis-objects as input parameters.\n")
+     
+  ## test x and y are givs objects
+  if(!any(c(inherits(x, "gvis"),   inherits(y, "gvis"))))
+    stop("x and y have to be gvis objects\n")
+  
+  if(missing(chartid)){   
+    chartid <- paste("Merged", basename(tempfile(pattern="")),sep="ID")
+  }
+
+  htmlScaffold <- gvisHtmlWrapper(title="", chartid=chartid, dataName="various", type=type)
+  
+  output <- structure(
+                 list(type=type,
+                      chartid=chartid, 
+                      html=list(header=htmlScaffold[["htmlHeader"]],
+                        chart=c(jsHeader=paste(x$html$chart["jsHeader"]),
+                          jsData=paste(x$html$chart["jsData"], y$html$chart["jsData"], sep="\n"),
+                          jsDrawChart=paste(x$html$chart["jsDrawChart"], y$html$chart["jsDrawChart"], sep="\n"),
+                          jsDisplayChart=paste(x$html$chart["jsDisplayChart"], y$html$chart["jsDisplayChart"], sep="\n"),
+                          jsFooter=paste(x$html$chart["jsFooter"]),
+                          jsChart=paste(x$html$chart["jsChart"], y$html$chart["jsChart"], sep="\n"),
+                          divChart= paste("\n<table ", tableOptions, ">\n<tr>\n<td>\n", x$html$chart["divChart"], "\n</td>\n",                            
+                            ifelse(horizontal,"<td>\n","</tr>\n<tr>\n<td>\n"), y$html$chart["divChart"],
+                            "\n</td>\n</tr>\n</table>\n", sep="")
+                          ),
+                        caption=htmlScaffold[["htmlCaption"]],
+                        footer=htmlScaffold[["htmlFooter"]]
+                        )
+                      ),
+                      class=c("gvis", "list")
+                      )
+  return(output) 
+}
+
+
diff --git a/R/gvisMotionChart.R b/R/gvisMotionChart.R
new file mode 100644
index 0000000..1b06693
--- /dev/null
+++ b/R/gvisMotionChart.R
@@ -0,0 +1,342 @@
+### File R/gvisMotionChart.R
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+#' Google Motion Chart with R
+#' \Sexpr{googleChartName <- "motionchart"}
+#' \Sexpr{gvisChartName <- "gvisMotionChart"}
+#'
+#' @description
+#' The gvisMotionChart function reads a data.frame and
+#' creates text output referring to the Google Visualisation API, 
+#' which can be included into a web page, or as a stand-alone page. 
+#' The actual chart is rendered by the web browser in Flash.
+#' A motion chart is a dynamic chart to explore several indicators over 
+#' time.
+#' 
+#' @param data a \code{data.frame}. The data has to have at least four
+#' columns with subject name (\code{idvar}), time (\code{timevar}) and
+#' two columns of numeric values. Further columns, numeric and
+#' character/factor are optional. The combination of \code{idvar} and
+#' \code{timevar} has to describe a unique row. The column names of the
+#' \code{idvar} and \code{timevar} have to be specified. Further
+#' columns, if not specified by the other arguments (\code{xvar, yvar,
+#' colorvar, sizevar}), will be assumed to be in the order of the 
+#' arguments.
+#' @param idvar column name of \code{data} with the subject to be 
+#' analysed.
+#' @param timevar column name of \code{data} which shows the time 
+#' dimension. The information has to be either numeric, of class 
+#' \code{\link{Date}} or a character which follows the pattern  
+#' 'YYYYWww' (e.g. '2010W04' for weekly data) or 'YYYYQq' 
+#' (e.g. '2010Q1' for quarterly data).
+#' @param xvar column name of a numerical vector in \code{data} to be 
+#' plotted on the x-axis.
+#' @param yvar column name of a numerical vector in \code{data} to be 
+#' plotted on the y-axis.
+#' @param colorvar column name of data that identifies bubbles in the 
+#' same series. Use the same value to identify all bubbles that belong 
+#' to the same series; bubbles in the same series will be assigned the 
+#' same color. Series can be configured using the \code{series} option.
+#' @param sizevar values in this column are mapped to actual pixel 
+#' values using the \code{sizeAxis} option.
+#' @param date.format if \code{timevar} is of class \code{\link{Date}} 
+#' then this argument specifies how the dates are reformatted to be 
+#' used by JavaScript. 
+#' @param options list of configuration options for Google Motion Chart.
+#' The options are documented in detail by Google online:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com}, 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' 
+#' 
+#' @section Warnings:
+#' Because of Flash security settings the chart 
+#' might not work correctly when accessed from a file location in the 
+#' browser (e.g., file:///c:/webhost/myhost/myviz.html) rather than 
+#' from a web server URL (e.g. http://www.myhost.com/myviz.html). 
+#' See the googleVis package vignette and the Macromedia web 
+#' site (\url{http://www.macromedia.com/support/documentation/en/flashplayer/help/}) 
+#' for more details.
+#' 
+#' @section Note:
+#' Please note that a \code{timevar} with values less than 100 will 
+#' be shown as years 19xx.
+#' 
+#' @seealso 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} 
+#' for printing and plotting methods.
+#' 
+#' @export
+#' 
+#' @keywords iplot
+#' 
+#' @examples
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Flash and Internet
+#' ## connection to display the visualisation.
+#' M1 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
+#' plot(M1)
+#' 
+#' \dontrun{
+#' ## Usage of date variable
+#' M2 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Date",
+#'                       date.format = "\%Y\%m\%d") 
+#'                       plot(M2)
+#'                       
+#' ## Display weekly data:
+#' M3 <- gvisMotionChart(Fruits, "Fruit", "Date", date.format="\%YW\%W")
+#' plot(M3) 
+#' }
+#' ## Options: no side panel on the right
+#' M4 <- gvisMotionChart(Fruits,"Fruit", "Year",
+#'                       options=list(showSidePanel=FALSE))
+#' plot(M4)
+#' 
+#' ## Options: trails un-ticked
+#' M5 <- gvisMotionChart(Fruits, "Fruit", "Year",
+#'                       options=list(state='{"showTrails":false};'))
+#'                       
+#' plot(M5)
+#' 
+#' ## You can change some of displaying settings via the browser,
+#' ## e.g. the level of opacity of non-selected items, or the chart type.
+#' ## The state string from the 'Advanced' tab can be used to set those
+#' ## settings via R. Just copy and past the string from the browser into
+#' ## the argument state of the options list.
+#' ## Here is an example of a motion chart, with an initial line chart
+#' ## displayed. Ensure that you have a newline at the start and end of
+#' ## your settings string.
+#' 
+#' myStateSettings <-'
+#' {"xZoomedDataMin":1199145600000,"colorOption":"2",
+#' "duration":{"timeUnit":"Y","multiplier":1},"yLambda":1,
+#' "yAxisOption":"4","sizeOption":"_UNISIZE",
+#' "iconKeySettings":[],"xLambda":1,"nonSelectedAlpha":0,
+#' "xZoomedDataMax":1262304000000,"iconType":"LINE",
+#' "dimensions":{"iconDimensions":["dim0"]},
+#' "showTrails":false,"uniColorForNonSelected":false,
+#' "xAxisOption":"_TIME","orderedByX":false,"playDuration":15000,
+#' "xZoomedIn":false,"time":"2010","yZoomedDataMin":0,
+#' "yZoomedIn":false,"orderedByY":false,"yZoomedDataMax":100}
+#' '
+#' M6a <- gvisMotionChart(Fruits, "Fruit", "Year", 
+#'                        options=list(state=myStateSettings))
+#' plot(M6a)
+#' 
+#' ## Newline set explicitly
+#' myStateSettings <-'\n{"iconType":"LINE"}\n'
+#' M6b <- gvisMotionChart(Fruits, "Fruit", "Year", 
+#'                        options=list(state=myStateSettings))
+#' plot(M6b)
+#' 
+#' 
+#' ## Define which columns are used for the initial setup of the various
+#' ## dimensions
+#' M7 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year",
+#'                       xvar="Profit", yvar="Expenses",
+#'                       colorvar="Location", sizevar="Sales")
+#' plot(M7)
+#' ## For more information see:
+#' ## https://developers.google.com/chart/interactive/docs/gallery/motionchart
+#' 
+#' ## See also the demo(WorldBank). It demonstrates how you can access
+#' ## country level data from the World Bank to create Gapminder-like
+#' ## plots.
+#'  
+gvisMotionChart <- function(data, idvar="id", timevar="time",
+                            xvar="", yvar="", colorvar="", sizevar="",
+                            date.format="%Y/%m/%d",
+                            options=list(), chartid){
+  
+  
+  my.type <- "MotionChart"
+  dataName <- deparse(substitute(data))
+  
+  vars <- c(idvar, timevar)#, xvar, yvar)#, colorvar, sizevar) 
+  vars.pos <- na.omit(match(vars, names(data)))
+  nm <- c(names(data)[vars.pos], names(data)[-vars.pos])
+  data <- cbind(data[, vars.pos], data[,-vars.pos])
+  names(data) <- nm
+  
+  
+  if(xvar != ""){
+    x.col <- match(xvar, names(data) ) - 1
+    xvar <- paste0("\"xAxisOption\":\"",x.col,"\",")   
+  }
+  if(yvar != ""){
+    y.col <- match(yvar, names(data) ) - 1
+    yvar <- paste0("\"yAxisOption\":\"",y.col,"\",")   
+  }
+  if(colorvar != ""){
+    colour.col <- match(colorvar, names(data) ) - 1
+    colorvar <- paste0("\"colorOption\":\"",colour.col,"\",")   
+  }
+  if(sizevar != ""){
+    size.col <- match(sizevar, names(data) ) - 1
+    sizevar <- paste0("\"sizeOption\":\"",size.col,"\",") 
+  }
+  
+  myState <- ""
+  if(!all(c(xvar, yvar, colorvar, sizevar) %in% "")){
+    myState <- paste0("\n{", xvar, yvar, colorvar, sizevar,
+                      "\"dimensions\":{\"iconDimensions\":[\"dim0\"]}}\n") 
+  }
+  
+  ## Combine options for other generic functions
+  my.options <- list(gvis=modifyList(list(width = 600, height=500,
+                                          state=myState), options),
+                     dataName=dataName,
+                     data=list(idvar=idvar, timevar=timevar,
+                               date.format=date.format,
+                               allowed=c("number",
+                                         "string", "date"))
+  )
+  
+  checked.data <- gvisCheckMotionChartData(data, my.options)
+  
+  output <- gvisChart(type=my.type, checked.data=checked.data,
+                      options=my.options, chartid)
+  
+  return(output)
+}
+
+
+
+gvisCheckMotionChartData <- function(data, options){
+  
+  ## Motion Charts require in the first column the idvar and time var in the second column
+  ## The combination of idvar and timevar has to be unique
+  
+  ## Google Motion Chart needs a 'string' in the id variable (first column)
+  ## A number or date in the time variable (second column)
+  ## Everything else has to be a number or string
+  
+  ## Convert data.frame to list
+  x <- as.list(data)
+  varNames <- names(x)
+  
+  ## typeMotionChart will hold the Google DataTable formats of our data
+  typeMotionChart <- as.list(rep(NA, length(varNames)))
+  names(typeMotionChart) <- varNames
+  
+  ## Check if idvar and timevar match columns in the data
+  idvar.timevar.pos <- match(c(options$data$idvar, 
+                               options$data$timevar), varNames)
+  if(sum(!is.na(idvar.timevar.pos)) < 2){
+    stop("There is a missmatch between the idvar and timevar specified and the colnames of your data.")
+  }
+  
+  
+  typeMotionChart[[options$data$timevar]] <-
+    testTimevar(x[[options$data$timevar]], options$data$date.format)
+  
+  if(typeMotionChart[[options$data$timevar]] == "string" &
+       (options$data$date.format %in% c("%YW%W","%YW%U"))){
+    ## only true for weekly data
+    x[[options$data$timevar]] <- format.Date(x[[options$data$timevar]],
+                                             options$data$date.format) 
+  }
+  
+  
+  ## idvar has to be a character, so lets try to convert it into a character
+  if( ! is.character(x[[options$data$idvar]]) ){
+    x[[options$data$idvar]] <- as.character(x[[options$data$idvar]])
+  }
+  typeMotionChart[[options$data$idvar]] <- "string"
+  
+  varOthers <- varNames[ -idvar.timevar.pos  ]  
+  
+  varOrder <- c(options$data$idvar, options$data$timevar, varOthers)
+  x <- x[varOrder]
+  
+  typeMotionChart[varOthers] <- sapply(varOthers, function(.x)
+    ifelse(is.numeric(x[[.x]]), "number","string"))
+  
+  typeMotionChart <- typeMotionChart[varOrder]
+  x[varOthers] <- lapply(varOthers,function(.x){
+    if(class(x[[.x]])=="Date") as.character(x[[.x]]) else x[[.x]]
+  }) 
+  
+  
+  ## check uniqueness of rows
+  
+  if( nrow(data) != nrow(unique(as.data.frame(x)[1:2]))  ){
+    stop("The data must have rows with ",
+         "unique combinations of idvar and timevar.\n",
+         "Your data has ",
+         nrow(data),
+         " rows, but idvar and timevar only define ",
+         nrow(unique(as.data.frame(x)[1:2])),
+         " unique rows.")
+  }
+  
+  X <- data.frame(x)
+  names(X) <- varNames
+  
+  return(X)
+}
+
+testTimevar <- function(x, date.format){
+  ## Check if timevar is either a numeric or date
+  if( is.numeric(x) )
+    return("number")  
+  
+  if(class(x)=="Date"& date.format %in% c("%YW%W","%YW%U"))
+    return("string") 
+  
+  ##Quarters. Accept in ISO format as a character
+  if(class(x)=="character" &  all(grepl("[0-9]{4}Q[1-4]" ,x)  == TRUE))
+    return("string")
+  
+  ##Weeks. Accept in ISO format as a character
+  if(class(x)=="character" &  all(grepl("[0-9]{4}W[0-4][0-9]|5[0-3]" , x)  == TRUE))
+    return("string")
+  
+  if(class(x)=="Date")
+    return("date")
+  
+  stop(paste("The timevar has to be of numeric or Date format. Currently it is ", class(x)))
+  
+}
diff --git a/R/gvisOrgChart.R b/R/gvisOrgChart.R
new file mode 100644
index 0000000..d3734b5
--- /dev/null
+++ b/R/gvisOrgChart.R
@@ -0,0 +1,142 @@
+### File R/gvisOrgChart.R
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+
+#' Google Org Chart with R
+#' \Sexpr{googleChartName <- "orgchart"}
+#' \Sexpr{gvisChartName <- "gvisOrgChart"}
+#' 
+#' An organizational chart that supports selection.
+#' 
+#' The gvisOrgChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser.
+#' 
+#' 
+#' @param data a \code{data.frame}. The data has to have at least three
+#' columns. Each row in the data table describes one node (a rectangle in the
+#' graph). Each node (except the root node) has one or more parent nodes. Each
+#' node is sized and colored according to its values relative to the other
+#' nodes currently shown.
+#' @param idvar column name of \code{data} describing the ID for each node. It
+#' should be unique among all nodes, and can include any characters, including
+#' spaces. This is shown on the node. You can specify a formatted value to show
+#' on the chart instead, but the unformatted value is still used as the ID.
+#' @param parentvar column name of \code{data} that match to entries in
+#' \code{idvar}. If this is a root node, leave this \code{NA}. Only one root is
+#' allowed.
+#' @param tipvar column name of \code{data} for the tip variable. Tool-tip text
+#' to show, when a user hovers over this node.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso
+#' 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+#' plotting methods.
+#' @keywords iplot
+#' 
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Internet
+#' ## connection to display the visualisation.
+#' 
+#' Regions
+#' Org1 <- gvisOrgChart(Regions, idvar = "Region", parentvar = "Parent", 
+#'      			      tipvar="Val")
+#' plot(Org1)
+#' 
+#' ## Set a few options
+#' Org2 <- gvisOrgChart(Regions, idvar = "Region", parentvar = "Parent", 
+#'      			      tipvar="Val", 
+#'      		     options=list(width=600, height=400,
+#'                      	          size='large', allowCollapse=TRUE))
+#' plot(Org2)
+#' 
+
+
+
+gvisOrgChart <- function(data, idvar="", parentvar="", tipvar="", options=list(), chartid){
+
+  my.type <- "OrgChart"
+  dataName <- deparse(substitute(data))
+  my.options <- list(gvis=modifyList(list(width = 600, height=400), options), 
+		     dataName=dataName, 
+                     data=list(idvar=idvar, parentvar=parentvar, tipvar=tipvar,
+		      allowed=c("string"))
+                     )
+  
+  checked.data <- gvisCheckOrgChartData(data, my.options)
+
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid)
+  
+  return(output)
+}
+
+
+## plot(gvisOrgChart(Regions))
+## plot(gvisOrgChart(Regions, options=list(width=600, height=400, size='large', allowCollapse=TRUE)))
+
+gvisCheckOrgChartData <- function(data, options){
+
+  data.structure <- list(
+        	     idvar     = list(mode="required",FUN=check.char),
+        	     parentvar = list(mode="required",FUN=check.char),
+        	     tipvar  = list(mode="required",FUN=check.char))
+	
+  x <- gvisCheckData(data=data,options=options,data.structure=data.structure)
+
+  # is there parent for every id?
+  parent.match.id <- x[[2]][!(x[[2]] %in% x[[1]])]
+  if (sum(is.na(parent.match.id))!=1 || length(parent.match.id)!=1){
+     stop("parentvar and idvar do not fit together.")
+  }
+
+  return(data.frame(x))
+}
diff --git a/R/gvisPieGaugeChart.R b/R/gvisPieGaugeChart.R
new file mode 100644
index 0000000..b016671
--- /dev/null
+++ b/R/gvisPieGaugeChart.R
@@ -0,0 +1,202 @@
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+
+#' Google Pie Chart with R
+#' \Sexpr{googleChartName <- "piechart"}
+#' \Sexpr{gvisChartName <- "gvisPieChart"}
+#' 
+#' The gvisPieChart function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser using SVG or VML.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a pie chart
+#' @param labelvar Name of the character column which contains the category
+#' labels for the slice labels.
+#' @param numvar a vector of column names of the numerical variables of the
+#' slice values.
+#' @param options list of configuration options for Google Pie Charts, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' Pie1 <- gvisPieChart(CityPopularity)
+#' plot(Pie1)
+#' 
+#' ## Doughnut chart - a pie with a hole
+#' Pie2 <- gvisPieChart(CityPopularity, options=list(
+#'                     slices="{4: {offset: 0.2}, 0: {offset: 0.3}}",
+#'                     title='City popularity',
+#'                     legend='none',
+#'                     pieSliceText='label',
+#'                     pieHole=0.5))
+#' plot(Pie2)
+#' 
+#' 
+#' 
+gvisPieChart <- function(data, labelvar="", numvar="", options=list(), chartid){
+
+  my.type <- "PieChart"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=modifyList(list(allowHtml=TRUE),options), dataName=dataName,
+                     data=list(locationvar=labelvar, numvar=numvar,
+                       allowed=c("number", "string"))
+                     )
+
+ 
+  checked.data <- gvisCheckPieChartData(data, my.options)
+  
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options,
+                      chartid=chartid, package="corechart") 
+  
+  return(output)
+}
+
+#' Google Gauge with R
+#' \Sexpr{googleChartName <- "gauge"}
+#' \Sexpr{gvisChartName <- "gvisGauge"}
+#' 
+#' The gvisGauge function reads a data.frame and creates text output referring
+#' to the Google Visualisation API, which can be included into a web page, or
+#' as a stand-alone page. The actual chart is rendered by the web browser using
+#' SVG or VML.
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a gauge
+#' @param labelvar name of the character column which contains the category
+#' labels for the slice labels.
+#' @param numvar a vector of column names of the numerical variables of the
+#' slice values.
+#' @param options list of configuration options, see: 
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods
+#' 
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires an internet
+#' ## connection to display the visualisation.
+#' 
+#' Gauge1 <- gvisGauge(CityPopularity, options=list(min=0, max=800, greenFrom=500,
+#'                     greenTo=800, yellowFrom=300, yellowTo=500,
+#'                     redFrom=0, redTo=300))
+#' 
+#' plot(Gauge1)
+#' 
+gvisGauge <- function(data, labelvar="", numvar="", options=list(), chartid){
+
+  my.type <- "Gauge"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=modifyList(list(allowHtml=TRUE),options), dataName=dataName,
+                     data=list(locationvar=labelvar, numvar=numvar,
+                       allowed=c("number", "string"))
+                     )
+
+ 
+  checked.data <- gvisCheckPieChartData(data, my.options)
+  
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options,
+                      chartid=chartid, package="gauge") 
+  
+  return(output)
+}
+
+
+## plot(gvisGauge(CityPopularity, options=list(min=0, max=800, greenFrom=500,
+##         greenTo=800, yellowFrom=300, yellowTo=500, redFrom=0, redTo=300)))
+
+gvisCheckPieChartData <- function(data, options){
+
+  data.structure <- list(
+                         locationvar = list(mode="required",FUN=check.location),
+                         numvar = list(mode="required",FUN=check.num)
+                         )
+  x <- gvisCheckData(data=data, options=options, data.structure=data.structure)
+
+  return(data)
+}
+
diff --git a/R/gvisSankey.R b/R/gvisSankey.R
new file mode 100644
index 0000000..606cd5f
--- /dev/null
+++ b/R/gvisSankey.R
@@ -0,0 +1,118 @@
+### Copyright 2010 - 2014 Markus Gesmann
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+#' Google Sankey Chart with R
+#' \Sexpr{googleChartName <- "sankey"}
+#' \Sexpr{gvisChartName <- "gvisSankey"}
+#' @description
+#' A sankey diagram is a visualization used to depict a flow from one set of 
+#' values to another. The things being connected are called nodes and the 
+#' connections are called links. They're named after Captain Sankey, who created 
+#' a diagram of steam engine efficiency that used arrows having widths 
+#' proportional to heat loss.
+#'  
+#' @param data data.frame that contains the data to be visualised
+#' @param from a string that referes to the column name in 
+#'  \code{data} for the source nodes to be used
+#' @param to a string that referes to the column name in 
+#'  \code{data} for the destination nodes to be used
+#' @param weight name of the column with the numerical weight of the connections 
+#' @param options list of configuration options.
+#' The options are documented in detail by Google online:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com}
+#' 
+#' @export
+#' 
+#' @section Warning:
+#' The sankey chart may be undergoing substantial revisions in 
+#' future Google Charts releases.
+#'  
+#' @keywords iplot
+#' 
+#' @examples
+#' dat <- data.frame(From=c(rep("A",3), rep("B", 3)), 
+#'                   To=c(rep(c("X", "Y", "Z"),2)), 
+#'                   Weight=c(5,7,6,2,9,4))
+#'
+#' sk1 <- gvisSankey(dat, from="From", to="To", weight="Weight")
+#' plot(sk1)
+#' 
+#' sk2 <- gvisSankey(dat, from="From", to="To", weight="Weight",
+#'                 options=list(sankey="{link: {color: { fill: '#d799ae' } },
+#'                                      node: { color: { fill: '#a61d4c' },
+#'                                      label: { color: '#871b47' } }}"))
+#' plot(sk2)
+#' 
+
+gvisSankey <- function(data, from="", to="", weight="", 
+                       options=list(), chartid){
+
+  my.type <- "Sankey"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=modifyList(list(width=400, height=400),options), dataName=dataName,
+                     data=list(from=from, to=to, weight=weight,
+                       allowed=c("number", "string"))
+                     )
+
+ 
+  #checked.data <- gvisCheckSankeyData(data, my.options)
+  
+  output <- gvisChart(type=my.type, checked.data=data, options=my.options,
+                      chartid=chartid, package="sankey") 
+  
+  return(output)
+}
+# 
+# gvisCheckSankeyData <- function(data, options){
+# 
+#   data.structure <- list(
+#                          from = list(mode="required", FUN=check.char),
+#                          to = list(mode="required", FUN=check.char),
+#                          weight = list(mode="required", FUN=check.num)
+#                          )
+#   data <- gvisCheckData(data=data, options=options, data.structure=data.structure)
+# 
+#   return(data)
+# }
+
diff --git a/R/gvisTable.R b/R/gvisTable.R
new file mode 100644
index 0000000..7720d94
--- /dev/null
+++ b/R/gvisTable.R
@@ -0,0 +1,127 @@
+### File R/gvisTable.R
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+
+#' Google Table Chart with R
+#' \Sexpr{googleChartName <- "table"}
+#' \Sexpr{gvisChartName <- "gvisTable"}
+#' 
+#' 
+#' The gvisTable function reads a data.frame and creates text output referring
+#' to the Google Visualisation API, which can be included into a web page, or
+#' as a stand-alone page. The actual chart is rendered by the web browser.
+#' 
+#' A table that can be sorted and paged. Table cells can be formatted using
+#' format strings, or by directly inserting HTML as cell values. Numeric values
+#' are right-aligned; boolean values are displayed as check marks. Users can
+#' select single rows either with the keyboard or the mouse. Users can sort
+#' rows by clicking on column headers. The header row remains fixed as the user
+#' scrolls. The table fires a number of events corresponding to user
+#' interaction.
+#' 
+#' 
+#' @param data a \code{\link{data.frame}} to be displayed as a table
+#' @param formats named list. If \code{NULL} (default) no specific format will 
+#' be used. The named list needs to contain the column names of the data and 
+#' the specified format. The format string is a subset of the ICU pattern set. 
+#' For instance, {pattern:'#,###\%'} will result in output values "1,000\%", 
+#' "750\%", and "50\%" for values 10, 7.5, and 0.5. 
+#' @param options list of configuration options, see: 
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+#' printing and plotting methods.
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Flash and Internet
+#' ## connection to display the visualisation.
+#' 
+#' ## Table with links to wikipedia (flags) 
+#' tbl1 <- gvisTable(Population)
+#' plot(tbl1)
+#' 
+#' ## Table with enabled paging
+#' tbl2 <- gvisTable(Population, options=list(page='enable', 
+#'                                            height='automatic',
+#'                                            width='automatic'))
+#' 
+#' plot(tbl2)
+#' 
+#' ## Table with formating options
+#' tbl3 <- gvisTable(Population, formats=list(Population="#,###"))
+#' 
+#' Population[['% of World Population']] <- Population[['% of World Population']]/100 
+#' tbl4 <- gvisTable(Population, formats=list(Population="#,###", 
+#'                                            '% of World Population'='#.#%'))
+#' plot(tbl4)                                           
+#' 
+gvisTable <- function(data, options=list(), chartid, formats = NULL){
+
+  my.type <- "Table"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=modifyList(list(allowHtml=TRUE),options), 
+                     dataName=dataName,
+                     data=list(allowed=c("number","string","date","datetime","boolean")))
+  
+  checked.data <- gvisCheckTableData(data)
+  
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, 
+                      chartid=chartid, formats = formats) 
+  
+  return(output)
+}
+
+
+gvisCheckTableData <- function(data){
+
+  # nothing to check at the moment here
+  return(data)
+}
diff --git a/R/gvisTimeLine.R b/R/gvisTimeLine.R
new file mode 100644
index 0000000..70cf18c
--- /dev/null
+++ b/R/gvisTimeLine.R
@@ -0,0 +1,158 @@
+### File R/gvisPieChart.R
+### Part of the R package googleVis
+### Copyright 2010, 2011, 2012, 2013 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+#' Google Timeline Chart with R
+#' \Sexpr{googleChartName <- "timeline"}
+#' \Sexpr{gvisChartName <- "gvisTimeline"}
+#' 
+#' @description
+#' A timeline is a chart that depicts how a set of resources are used 
+#' over time. One popular type of timeline is the Gantt chart.
+#' 
+#' @param data data.frame that contains the data to be visualised
+#' @param rowlabel a string that referes to the column name in 
+#'  \code{data} for the row labels to be used
+#' @param barlabel a string that referes to the column name in 
+#'  \code{data} for the bar labels to be used
+#' @param start number, date or datetime for the start dates
+#' @param end number, date or datetime for the end dates
+#' @param options list of configuration options.
+#' The options are documented in detail by Google online:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'  
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com}
+#' 
+#' @export
+#' 
+#' @keywords iplot
+#' 
+#' @examples
+#' dat <- data.frame(Term=c("1","2","3"),
+#'                   President=c("Whasington", "Adams", "Jefferson"),
+#'                   start=as.Date(x=c("1789-03-29", "1797-02-03", "1801-02-03")),
+#'                   end=as.Date(x=c("1797-02-03", "1801-02-03", "1809-02-03")))
+#' 
+#' tl <- gvisTimeline(data=dat[,-1], rowlabel="President", 
+#'                    start="start", end="end")
+#' plot(tl)
+#' 
+#' tl <- gvisTimeline(data=dat, barlabel="President", 
+#'                    start="start", end="end")
+#' plot(tl)
+#' 
+#' tl <- gvisTimeline(data=dat, rowlabel="President", 
+#'                    start="start", end="end",
+#'                    options=list(timeline="{showRowLabels:false}"))
+#' plot(tl)
+#' 
+#' dat <- data.frame(Position=c(rep("President", 3), rep("Vice", 3)),
+#'                   Name=c("Washington", "Adams", "Jefferson",
+#'                          "Adams", "Jefferson", "Burr"),
+#'                   start=as.Date(x=rep(c("1789-03-29", "1797-02-03", "1801-02-03"),2)),
+#'                   end=as.Date(x=rep(c("1797-02-03", "1801-02-03", "1809-02-03"),2)))
+#' 
+#' tl <- gvisTimeline(data=dat, rowlabel="Name",barlabel="Position", 
+#'                    start="start", end="end",
+#'                    options=list(timeline="{showRowLabels:true}"))
+#' plot(tl)
+#' 
+#' tl <- gvisTimeline(data=dat, rowlabel="Name",barlabel="Position", 
+#'                    start="start", end="end",
+#'                    options=list(timeline="{groupByRowLabel:false}",
+#'                                 backgroundColor='#ffd', height=350,
+#'                                 colors="['#cbb69d', '#603913', '#c69c6e']"))
+#' 
+#' plot(tl)
+#'
+#' # Datetime example 
+#' dat <- data.frame(Room=c("Room 1","Room 2","Room 3"),
+#'                   Language=c("English", "German", "French"),
+#'                   start=as.POSIXct(c("2014-03-14 14:00", "2014-03-14 15:00", 
+#'                                      "2014-03-14 14:30")),
+#'                  end=as.POSIXct(c("2014-03-14 15:00", "2014-03-14 16:00", 
+#'                                   "2014-03-14 15:30")))
+#' tl <- gvisTimeline(data=dat, rowlabel="Language",
+#'                    start="start", end="end")
+#' plot(tl)
+#'
+#' \dontrun{
+#' require(timeline)
+#' data(ww2)
+#' timeline(ww2, ww2.events, event.spots=2, event.label='', event.above=FALSE)
+#' ww2$Person <- gsub("\\n" ," ", ww2$Person)
+#' plot(gvisTimeline(ww2, barlabel="Person", rowlabel="Group",
+#'                   start="StartDate", end="EndDate",
+#'      options=list(width=600, height=350))
+#' )
+#' }
+
+gvisTimeline <- function(data, rowlabel="", barlabel="", start="", 
+                         end="", options=list(), chartid){
+
+  my.type <- "Timeline"
+  dataName <- deparse(substitute(data))
+
+  my.options <- list(gvis=modifyList(list(width=600, height=200),options), dataName=dataName,
+                     data=list(rowlabel=rowlabel, barlabel=barlabel, start=start, end=end,
+                       allowed=c("number", "string", "date", "datetime"))
+                     )
+
+ 
+  checked.data <- gvisCheckTimelineData(data, rl=rowlabel, bl=barlabel,
+                                        start=start, end=end)
+  
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options,
+                      chartid=chartid, package="timeline") 
+  
+  return(output)
+}
+
+gvisCheckTimelineData <- function(data, rl, bl, start, end){
+
+  if(any(c(rl, bl, start, end) %in% ""))
+    return(data)
+  else  
+    return(data[, c(rl, bl, start, end)])
+}
+
diff --git a/R/gvisTreeMap.R b/R/gvisTreeMap.R
new file mode 100644
index 0000000..8c551f2
--- /dev/null
+++ b/R/gvisTreeMap.R
@@ -0,0 +1,262 @@
+### File R/gvisTreeMap.R
+### Part of the R package googleVis
+### Copyright 2010 - 2014 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+#' Google Tree Map with R
+#' \Sexpr{googleChartName <- "treemap"}
+#' \Sexpr{gvisChartName <- "gvisTreeMap"}
+#' 
+#' The gvisTreeMap function reads a data.frame and creates text output
+#' referring to the Google Visualisation API, which can be included into a web
+#' page, or as a stand-alone page. The actual chart is rendered by the web
+#' browser.
+#' 
+#' A tree map is a visual representation of a data tree, where each node can
+#' have zero or more children, and one parent (except for the root, which has
+#' no parents). Each node is displayed as a rectangle, sized and colored
+#' according to values that you assign. Sizes and colors are valued relative to
+#' all other nodes in the graph. You can specify how many levels to display
+#' simultaneously, and optionally to display deeper levels in a hinted fashion.
+#' If a node is a leaf node, you can specify a size and color; if it is not a
+#' leaf, it will be displayed as a bounding box for leaf nodes. The default
+#' behavior is to move down the tree when a user left-clicks a node, and to
+#' move back up the tree when a user right-clicks the graph.
+#' 
+#' The total size of the graph is determined by the size of the containing
+#' element that you insert in your page. If you have leaf nodes with names too
+#' long to show, the name will be truncated with an ellipsis (...).
+#' 
+#' @param data a \code{data.frame}. The data has to have at least four columns.
+#' Each row in the data table describes one node (a rectangle in the graph).
+#' Each node (except the root node) has one or more parent nodes. Each node is
+#' sized and colored according to its values relative to the other nodes
+#' currently shown.
+#' @param idvar column name of \code{data} describing the ID for each node. It
+#' can be any valid JavaScript string, including spaces, and any length that a
+#' string can hold. This value is displayed as the node header.
+#' @param parentvar column name of \code{data} that match to entries in
+#' \code{idvar}. If this is a root node, leave this \code{NA}. Only one root is
+#' allowed per treemap.
+#' @param sizevar column name of \code{data} with positive values to define the
+#' size of maps.  Any positive value is allowed. This value determines the size
+#' of the node, computed relative to all other nodes currently shown. This
+#' value is ignored for non-leaf nodes (it is actually calculated from the size
+#' of all its children).
+#' @param colorvar column name of \code{data} with values to define range of
+#' color. The value is used to calculate a color for this node. Any value,
+#' positive or negative, is allowed. The color value is first recomputed on a
+#' scale from \code{minColorValue} to \code{maxColorValue}, and then the node
+#' is assigned a color from the gradient between \code{minColor} and
+#' \code{maxColor}.
+#' @param options list of configuration options, see:
+#' 
+#' % START DYNAMIC CONTENT
+#' 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName,
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURLConfigOptions.txt")))}
+#' 
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOptions.txt")))}
+#'   
+#' @param chartid character. If missing (default) a random chart id will be 
+#' generated based on chart type and \code{\link{tempfile}}
+#' 
+#' @return \Sexpr[results=rd]{paste(gvisChartName)} returns list 
+#' of \code{\link{class}}
+#'  \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+#'  "mansections", "gvisOutputStructure.txt")))}
+#'   
+#' @references Google Chart Tools API: 
+#' \Sexpr[results=rd]{gsub("CHARTNAME", 
+#' googleChartName, 
+#' readLines(file.path(".", "inst",  "mansections", 
+#' "GoogleChartToolsURL.txt")))}
+#' 
+#' % END DYNAMIC CONTENT
+#' 
+#' @section Warning :
+#' 
+#' Tree maps display a tree like structure where every child has to have a
+#' unique parent.
+#' 
+#' Values in column \code{sizevar} should be greater than zero and finite.
+#' @author Markus Gesmann \email{markus.gesmann@@gmail.com},
+#' 
+#' Diego de Castillo \email{decastillo@@gmail.com}
+#' @seealso
+#' 
+#' See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+#' plotting methods.
+#' 
+#' Please note that the \code{treemap} package offeres a static version of tree
+#' maps via its \code{tmPlot} function.
+#' @keywords iplot
+#' @examples
+#' 
+#' ## Please note that by default the googleVis plot command
+#' ## will open a browser window and requires Internet
+#' ## connection to display the visualisation.
+#' 
+#' Tree <- gvisTreeMap(Regions,  idvar="Region", parentvar="Parent",
+#'                     sizevar="Val", colorvar="Fac")
+#' plot(Tree)
+#' 
+#' 
+#' Tree2 <- gvisTreeMap(Regions,  "Region", "Parent", "Val", "Fac",
+#'                     options=list(width=600, height=500,
+#'                                  fontSize=16,
+#'                                  minColor='#EDF8FB',
+#'                                  midColor='#66C2A4',
+#'                                  maxColor='#006D2C',
+#'                                  headerHeight=20,
+#'                                  fontColor='black',
+#'                                  showScale=TRUE))
+#' 
+#' plot(Tree2)
+#' 
+#' ## Simple static treemap with no drill down options based on US states
+#' ## and their area. However we still have to create a parent id to use
+#' ## gvisTreeMap
+#'  
+#' require(datasets)
+#' states <- data.frame(state.name, state.area)
+#' 
+#' ## Create parent variable
+#' 
+#' total=data.frame(state.area=sum(states$state.area), state.name="USA")
+#' 
+#' my.states <- rbind(total, states)
+#' my.states$parent="USA"
+#' ## Set parent variable to NA at root level
+#' my.states$parent[my.states$state.name=="USA"] <- NA
+#' 
+#' my.states$state.area.log=log(my.states$state.area)
+#' statesTree <- gvisTreeMap(my.states, "state.name", "parent",
+#'                           "state.area", "state.area.log")
+#' plot(statesTree)
+#' 
+#' 
+#' ## We add US regions to the above data set to enable drill down capabilities
+#' 
+#' states2 <- data.frame(state.region, state.name, state.area)
+#' 
+#' regions <- aggregate(list(region.area=states2$state.area),
+#'                      list(region=state.region), sum)
+#' 
+#' my.states2 <- data.frame(regionid=c("USA",
+#'                                     as.character(regions$region),
+#'                                     as.character(states2$state.name)),
+#'                          parentid=c(NA, rep("USA", 4),
+#'                                    as.character(states2$state.region)),
+#'                          state.area=c(sum(states2$state.area),
+#'                                       regions$region.area, states2$state.area))
+#' 
+#' my.states2$state.area.log=log(my.states2$state.area)
+#' 
+#' statesTree2 <- gvisTreeMap(my.states2, "regionid", "parentid",
+#'                            "state.area", "state.area.log")
+#' 
+#' plot(statesTree2)
+#' 
+#' ## Now we add another layer with US divisions
+#' 
+#' states3 <- data.frame(state.region, state.division, state.name, state.area)
+#' 
+#' regions <- aggregate(list(region.area=states3$state.area),
+#'                      list(region=state.region), sum)
+#' 
+#' divisions <- aggregate(list(division.area=states3$state.area),
+#'                      list(division=state.division, region=state.region),
+#'                      sum)
+#' 
+#' my.states3 <- data.frame(regionid=c("USA",
+#'                                     as.character(regions$region),
+#'                                     as.character(divisions$division),
+#'                                     as.character(states3$state.name)),
+#'                          parentid=c(NA, rep("USA", 4), 
+#'                                    as.character(divisions$region),
+#'                                    as.character(states3$state.division)),
+#'                          state.area=c(sum(states3$state.area),
+#'                                       regions$region.area,
+#'                                       divisions$division.area,
+#'                                       states3$state.area))
+#' 
+#' my.states3$state.area.log=log(my.states3$state.area)
+#' 
+#' statesTree3 <- gvisTreeMap(my.states3, "regionid", "parentid",
+#'                            "state.area", "state.area.log")
+#' 
+#' plot(statesTree3)
+#' 
+#' 
+#' 
+gvisTreeMap <- function(data, idvar="", parentvar="", sizevar="", colorvar="",options=list(), chartid){
+
+  my.type <- "TreeMap"
+  dataName <- deparse(substitute(data))
+  my.options <- list(gvis=modifyList(list(width = 600, height=500),options), 
+		     dataName=dataName, 
+                     data=list(idvar=idvar, parentvar=parentvar, sizevar=sizevar,colorvar=colorvar,
+		      allowed=c("number", "string"))
+                     )
+  
+  checked.data <- gvisCheckTreeMapData(data, my.options)
+
+  output <- gvisChart(type=my.type, checked.data=checked.data, options=my.options, chartid)
+  
+  return(output)
+}
+
+gvisCheckTreeMapData <- function(data, options){
+
+  data.structure <- list(
+        	     idvar     = list(mode="required",FUN=check.char),
+        	     parentvar = list(mode="required",FUN=check.char),
+        	     sizevar   = list(mode="required",FUN=check.num.pos),
+        	     colorvar  = list(mode="required",FUN=check.num))
+	
+  x <- gvisCheckData(data=data,options=options,data.structure=data.structure)
+
+  # is there parent for every id?
+  parent.match.id <- x[[2]][!(x[[2]] %in% x[[1]])]
+  if (sum(is.na(parent.match.id))!=1 || length(parent.match.id)!=1){
+     stop("parentvar and idvar do not fit together.")
+  }
+  x  <- data.frame(x)
+
+##  less.equal.zero <- sum(x[['sizevar']] <= 0) 
+##  infinite <- sum(is.infinite(x[['sizevar']]))
+
+
+##  if(less.equal.zero > 0){
+##    warning(paste("Values in column sizevar should be greater than 0,\n",
+##                  "however, your data has ", less.equal.zero, "values less or equal to 0.\n",
+##                  sep=""))
+##  }
+##  if(infinite>0){
+##    warning(paste("Values in column sizevar have to be greater than 0 and finite,\n",
+##                  "however, your data has", infinite, "infinite values.",
+##                  sep=""))
+##  }
+
+     
+  return(x)
+     
+}
diff --git a/R/shiny.R b/R/shiny.R
new file mode 100644
index 0000000..2cfc6fa
--- /dev/null
+++ b/R/shiny.R
@@ -0,0 +1,92 @@
+### File R/shiny.R
+### Part of the R package googleVis
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+#' renderGvis
+#' 
+#' Use a googleVis Chart as Shiny Output
+#'
+#' @description 
+#' This function lets you use googleVis charts as Shiny output. 
+#' Use it to wrap a googleVis-generating function that you assign to an 
+#' \code{output} element in \code{server.R}; then create an \code{htmlOutput} 
+#' with the same name in \code{ui.R}.
+#' 
+#' @param expr An expression that returns a gvis object.
+#' @param env The environment in which to evaluate \code{expr}
+#' @param quoted Is \code{expr} a quoted expression (with \code{quote()})?
+#' This is useful if you want to save an expression in a variable.
+#' 
+#' @section Details:
+#' More information about shiny is available online: 
+#'  \url{http://www.rstudio.com/shiny/}. 
+#'  You find further examples with googleVis on shiny on mages' blog:
+#'  \url{http://lamages.blogspot.co.uk/search/label/shiny}
+#'  
+#' @return Returns a function that can be assigned to a Shiny \code{output} 
+#' element.  
+#' 
+#' @author Joe Cheng, \email{joe@@rstudio.com}
+#' 
+#' @keywords shiny 
+#' 
+#' @export  
+#' 
+#' @examples   
+#' \dontrun{
+#' # To run this example:
+#' shiny::runApp(system.file("shiny/", package="googleVis"))
+#' # server.R
+#' library(googleVis)
+#' 
+#' shinyServer(function(input, output) {
+#'   datasetInput <- reactive({
+#'     switch(input$dataset,
+#'            "rock" = rock,
+#'            "pressure" = pressure,
+#'            "cars" = cars)
+#'   })
+#'   
+#'   output$view <- renderGvis({
+#'     gvisScatterChart(datasetInput(),
+#'                      options=list(title=paste('Data:',input$dataset)))
+#'   })
+#' })
+#' 
+#' # ui.R
+#' shinyUI(pageWithSidebar(
+#'   headerPanel("googleVis on Shiny"),
+#'   sidebarPanel(
+#'     selectInput("dataset", "Choose a dataset:",
+#'                 choices = c("rock", "pressure", "cars"))
+#'   ),
+#'   mainPanel(
+#'     htmlOutput("view")
+#'   )
+#' ))
+#' }
+#' 
+#' 
+renderGvis <- function(expr, env=parent.frame(), quoted=FALSE) {
+  # Convert expr to a function
+  func <- shiny::exprToFunction(expr, env, quoted)
+
+  function() {
+    chart <- func()
+    paste(chart$html$chart, collapse="\n")
+  }
+}
diff --git a/R/zzz.R b/R/zzz.R
new file mode 100644
index 0000000..80f3614
--- /dev/null
+++ b/R/zzz.R
@@ -0,0 +1,108 @@
+### File R/zzz.R
+### Part of the R package googleVis
+### Copyright 2010, 2011, 2012 Markus Gesmann, Diego de Castillo
+
+### It is made available under the terms of the GNU General Public
+### License, version 2, or at your option, any later version,
+### incorporated herein by reference.
+###
+### This program is distributed in the hope that it will be
+### useful, but WITHOUT ANY WARRANTY; without even the implied
+### warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+### PURPOSE.  See the GNU General Public License for more
+### details.
+###
+### You should have received a copy of the GNU General Public
+### License along with this program; if not, write to the Free
+### Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+### MA 02110-1301, USA
+
+
+.onLoad<- function(lib, pkg,...)
+{
+
+  options(gvis.plot.tag=NULL)
+  options(gvis.print.tag="html")
+  options(googleVis.viewer=getOption("viewer"))
+
+  ## Set possible gvis.out.options
+  ## Output from
+  ## unique(unlist(strsplit(names(unlist( gvisTable(data.frame(x=1, y=1)))),".", fixed=TRUE)))
+
+  gvis.tags <- c("type",  "chartid", "html", "header", "chart", "jsHeader", "jsData", "jsDrawChart", 
+                 "jsDisplayChart", "jsFooter", "jsChart", "divChart", "caption", "footer")
+  options(gvis.tags=gvis.tags)
+  
+  ## This function are required to set option in googleVis functions,
+  ## e.g. to set startZoom and stopZoom windows in gvisAnnotatedTimeLine
+
+  setMethod("toJSON", "Date",
+            function(x, container = length(x) > 1 || length(names(x)) > 0, ...) {
+              dt <- as.Date(x)
+              y <- format(dt,"%Y")
+              m <- as.numeric(format(dt,"%m")) -1
+              d <- as.numeric(format(dt,"%d"))
+              
+              tmp <- paste("new Date(",y,",",m,",",d,")",sep="")
+              paste(tmp, collapse=", ")
+            })
+  
+  setMethod("toJSON", "POSIXct",
+            function(x, container = length(x) > 1 || length(names(x)) > 0, ...) {
+              dt <- as.POSIXct(x)
+              y <- format(dt,"%Y")
+              m <- as.numeric(format(dt,"%m")) -1
+              d <- as.numeric(format(dt,"%d"))
+              H <- as.numeric(format(dt,"%H"))
+              M <- as.numeric(format(dt,"%M"))
+              S <- as.numeric(format(dt,"%S"))
+              
+              tmp <- paste("new Date(",y,",",m,",",d,",",H,",",M,",",S,")",sep="")
+              paste(tmp, collapse=", ")
+            })
+  
+  setMethod("toJSON", "POSIXlt",
+            function(x, container = length(x) > 1 || length(names(x)) > 0, ...) {
+              dt <- as.POSIXlt(x)
+              y <- format(dt,"%Y")
+              m <- as.numeric(format(dt,"%m")) -1
+              d <- as.numeric(format(dt,"%d"))
+              H <- as.numeric(format(dt,"%H"))
+              M <- as.numeric(format(dt,"%M"))
+              S <- as.numeric(format(dt,"%S"))
+              
+              tmp <- paste("new Date(",y,",",m,",",d,",",H,",",M,",",S,")",sep="")
+              paste(tmp, collapse=", ")
+            })
+    
+  invisible()
+}
+
+.onAttach <- function(lib, pkg,...){
+  packageStartupMessage(gvisWelcomeMessage())
+}
+gvisWelcomeMessage <- function(){
+  
+ # if(is.null(getOption("viewer")))
+    display <- "the standard browser to display its output.\n"
+#  else
+#    display <- paste("the RStudio Viewer pane to display its output.\n",
+#                     "Set options('googleVis.viewer'=NULL) to use your browser.\n",
+#                     sep="")
+  paste("\n",     
+        "Welcome to googleVis version ", packageDescription("googleVis")$Version, "\n",
+        "\n",
+        "Please read Google's Terms of Use\n",
+        "before you start using the package:\n",
+        "https://developers.google.com/terms/\n",
+        "\n",
+        "Note, the plot method of googleVis will by default use\n",
+        display,
+        "\n",
+        "See the googleVis package vignettes for more details,\n",
+        "or visit http://github.com/mages/googleVis.\n",
+        "\n",               
+        "To suppress this message use:\n",
+        "suppressPackageStartupMessages(library(googleVis))\n",  
+          sep="")
+}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..43de20c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,55 @@
+# googleVis 
+[![Travis-CI Build Status](https://travis-ci.org/mages/googleVis.svg?branch=master)](https://travis-ci.org/mages/googleVis)   [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/googleVis)](https://cran.r-project.org/package=googleVis/) ![downloads](http://cranlogs.r-pkg.org/badges/grand-total/googleVis)
+
+
+The googleVis package provides an interface between R and the [Google's charts tools](https://developers.google.com/chart/). 
+It allows users to create web pages with interactive charts based on R data frames. Charts are displayed locally via the R HTTP help server. 
+A modern browser with Internet connection is required and for some 
+charts a Flash player. The data remains local and is not uploaded to 
+Google.
+
+You find [examples](https://CRAN.R-project.org/package=googleVis/vignettes/googleVis_examples.html) of all googleVis function on [CRAN](https://cran.r-project.org/package=googleVis/). Perhaps the best known example is the [motion chart](http://mages.github.io/googleVis/WorldBank.html), popularised by [Hans Rosling](http://www.gapminder.org) in his [2006 TED talk](http://www.ted.com/talks/hans_rosling_shows_the_best_stats_you_ve_ever_seen). 
+
+Please read [Google's Terms of Use](https://developers.google.com/terms/) before you start using the package. 
+
+## Installation
+
+You can install the stable version from
+[CRAN](https://cran.r-project.org/package=googleVis/):
+
+```s
+install.packages('googleVis')
+```
+
+To install the current development version from github you need the [devtools package](https://cran.r-project.org/package=devtools/) and the other packages on which googleVis depends:
+
+```s
+install.packages(c("devtools","jsonlite", "knitr", "shiny", "httpuv"))
+```
+
+To install googleVis run:
+```s
+library(devtools)
+install_github("mages/googleVis")
+```
+
+## Usage
+
+```s
+library(googleVis)
+?googleVis
+demo(googleVis)
+```
+
+See the googleVis package [vignettes](https://cran.r-project.org/package=googleVis/) for more details. For a brief introduction read the five page [R Journal article](https://journal.r-project.org/archive/2011-2/RJournal_2011-2_Gesmann+de~Castillo.pdf) and go through our [tutorial](http://decastillo.github.io/googleVis_Tutorial). More examples have been posted on Markus' [blog](http://lamages.blogspot.co.uk/search/label/googleVis).
+
+[<img src="https://raw.github.com/mages/googleVis/master/vignettes/figures/googleVisTutorial2013.png" alt="Tutorial" width="400"/>](http://decastillo.github.io/googleVis_Tutorial)
+
+[![Donate](https://www.paypal.com/en_GB/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=HHPMW8TXCCRSC&lc=GB&item_name=googleVis&currency_code=GBP&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
+
+## License
+
+This package is free and open source software, licensed under [GPL 2 or later](http://opensource.org/licenses/gpl-license).
+
+<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/deed.en_GB"><img alt="Creative Commons Licence" class="c1" src="http://i.creativecommons.org/l/by-sa/4.0/80x15.png" /></a><br />
+<span>googleVis documentation</span> by <a href="https://github.com/mages/googleVis" rel="cc:attributionURL">Markus Gesmann & Diego de Castillo</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/deed.en_GB">Creative Commons Attribution-ShareAlike 4.0 International License</a>. Based on a work at <a href="https://developers.google.com/chart/interactive/docs/gallery" rel="dct:source">https://developers.google.com/chart/interactive/docs/gallery</a>.
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..bc1b1a0
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,74 @@
+Thanks to:
+  o Google, who make the visualisation API available
+  o All the guys behind www.gapminder.org and Hans Rosling for telling
+    everyone that data is not boring 
+  o Sebastian Pérez Saaibi for his inspiring talk on 'Generator
+    Tool for Google Motion Charts' at the R/RMETRICS conference 2010
+  o Henrik Bengtsson for providing the 'R.rsp: R Server Pages'
+    package and his reviews and comments
+  o Duncan Temple Lang for providing the 'RJSONIO' package
+  o Deepayan Sarkar for showing us in the lattice package how to deal
+    with lists of options  
+  o Paul Cleary for a bug report on the handling of months:
+    Google date objects expect the months Jan.- Dec. as 0 - 11 and
+    not 1 - 12.
+  o Ben Bolker for comments on plot.gvis and the usage of temporary
+    files  
+  o John Verzani for pointing out how to use the R http help server
+  o Cornelius Puschmann and Jeffrey Breen for highlighting a
+    dependency issue with RJONSIO version 0.7-1
+  o Manoj Ananthapadmanabhan and Anand Ramalingam for providing
+    ideas and code to animate a Google Geo Map
+  o Rahul Premraj for pointing out a rounding issue with Google Maps 
+  o Mike Silberbauer for an example showing how to shade the
+    areas in annotated time line charts
+  o Tony Breyal for providing instructions on changing the Flash
+    security settings to display Flash charts locally 
+  o Alexander Holcroft for reporting a bug in gvisMotionChart
+    when displaying data with special characters in column names
+  o Pat Burns for pointing out typos in the vignette
+  o Jason Pickering for providing a patch to allow for quarterly 
+    and weekly time dimensions to be displayed with gvisMotionChart
+  o Oliver Jay and Wai Tung Ho for reporting an issue with one-row 
+    data sets
+  o Erik Bülow for pointing out how to load the Google API via a
+    secure connection
+  o Sebastian Kranz for comments to enhance the argument list for
+    gvisMotionChart to make it more user friendly 
+  o Sebastian Kranz and Wei Luo for providing ideas and code to
+    improve the transformation of R data frames into JSON code
+  o Sebastian Kranz for reporting a bug in version 0.3.0
+  o Leonardo Trabuco for helping to clarify the usage of the
+    argument state in the help file of gvisMotionChart
+  o Mark Melling for reporting an issue with jsDisplayChart and
+    providing a solution
+  o Joe Cheng for code contribution to make googleVis work with shiny
+  o John Maindonald for reporting that the WorldBank demo didn't 
+    download all data, but only the first 12000 records.
+  o Sebastian Campbell for reporting a typo in the Andrew and Stock
+    data set and pointing out that the core charts, such as line
+    charts accept also date variables for the x-axis. 
+  o John Maindonald for providing a simplified version of the
+    WorldBank demo using the WDI package. 
+  o John Muschelli for suggesting to add hovervar as an additional
+    argument to gvisGeoChart.
+  o Jacqueline Buros for providing code to include formats parameter 
+    to gvisTable()
+  o JJ Allaire for pointing out how to use the viewer pane in RStudio
+  o Oliver Gjoneski and Ashton Trey Belew for patches on roles and 
+    tooltips
+  o Yihui Xie for pointing out formatting issues of the markdown 
+    vignettes
+  o John Taveras for reporting in gvisCheckCoreChartData
+  o Paul Murrell for reporting an issue with setting width and height of 
+    googleVis charts
+  o Kurt Hornik for pointing out issues with README.md
+  o stanstrup for reporting an issue with gvisCoreChart
+  o Jason Miller for highlighting that the column "% of World 
+    Population" in sample data set "Population" needed to be 
+    devided by 100
+  o Juuso Parkkinen for reporting a bug in gvisMotionChart
+  o Nick Salkowski for suggestions to improve the documentation
+  o Kurt Hornik for informing of CRAN and R changes 
+  o Sarang Brahme for comments on the documentation of gvisIntensityMap
+  o Carsten Langer for reporting an issue with ordered factors
diff --git a/build/googleVis.pdf b/build/googleVis.pdf
new file mode 100644
index 0000000..bd8f033
Binary files /dev/null and b/build/googleVis.pdf differ
diff --git a/build/vignette.rds b/build/vignette.rds
new file mode 100644
index 0000000..1f4280f
Binary files /dev/null and b/build/vignette.rds differ
diff --git a/data/Andrew.RData b/data/Andrew.RData
new file mode 100644
index 0000000..733c2eb
Binary files /dev/null and b/data/Andrew.RData differ
diff --git a/data/Cairo.RData b/data/Cairo.RData
new file mode 100644
index 0000000..adef457
Binary files /dev/null and b/data/Cairo.RData differ
diff --git a/data/CityPopularity.RData b/data/CityPopularity.RData
new file mode 100644
index 0000000..017d54b
Binary files /dev/null and b/data/CityPopularity.RData differ
diff --git a/data/Exports.RData b/data/Exports.RData
new file mode 100644
index 0000000..6ac9414
Binary files /dev/null and b/data/Exports.RData differ
diff --git a/data/Fruits.RData b/data/Fruits.RData
new file mode 100644
index 0000000..61c267b
Binary files /dev/null and b/data/Fruits.RData differ
diff --git a/data/OpenClose.RData b/data/OpenClose.RData
new file mode 100644
index 0000000..faafddc
Binary files /dev/null and b/data/OpenClose.RData differ
diff --git a/data/Population.RData b/data/Population.RData
new file mode 100644
index 0000000..8c293b6
Binary files /dev/null and b/data/Population.RData differ
diff --git a/data/Regions.RData b/data/Regions.RData
new file mode 100644
index 0000000..e3a07eb
Binary files /dev/null and b/data/Regions.RData differ
diff --git a/data/Stock.RData b/data/Stock.RData
new file mode 100644
index 0000000..b0819d5
Binary files /dev/null and b/data/Stock.RData differ
diff --git a/data/dino.RData b/data/dino.RData
new file mode 100644
index 0000000..2fbd343
Binary files /dev/null and b/data/dino.RData differ
diff --git a/debian/README.test b/debian/README.test
deleted file mode 100644
index 55a9142..0000000
--- a/debian/README.test
+++ /dev/null
@@ -1,8 +0,0 @@
-Notes on how this package can be tested.
-────────────────────────────────────────
-
-To run the unit tests provided by the package you can do
-
-   sh  run-unit-test
-
-in this directory.
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 03989ca..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,18 +0,0 @@
-r-cran-googlevis (0.6.2-1) unstable; urgency=medium
-
-  * New upstream version
-  * Fix autopkgtest
-  * Convert to dh-r
-  * Canonical homepage for CRAN
-  * debhelper 10
-  * d/watch:
-     - version=4
-     - Fix watch file
-
- -- Andreas Tille <tille at debian.org>  Sun, 15 Jan 2017 22:46:04 +0100
-
-r-cran-googlevis (0.6.0-1) unstable; urgency=low
-
-  * Initial release (closes: #829663)
-
- -- Andreas Tille <tille at debian.org>  Tue, 05 Jul 2016 08:54:07 +0200
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index f599e28..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-10
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 7092cc7..0000000
--- a/debian/control
+++ /dev/null
@@ -1,26 +0,0 @@
-Source: r-cran-googlevis
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
-Section: gnu-r
-Priority: optional
-Build-Depends: debhelper (>= 10),
-               dh-r,
-               r-base-dev,
-               r-cran-jsonlite
-Standards-Version: 3.9.8
-Vcs-Browser: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/R/r-cran-googlevis/trunk/
-Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/R/r-cran-googlevis/trunk/
-Homepage: https://cran.r-project.org/package=googleVis
-
-Package: r-cran-googlevis
-Architecture: all
-Depends: ${misc:Depends},
-         ${R:Depends},
-Recommends: ${R:Recommends}
-Suggests: ${R:Suggests}
-Description: GNU R Interface to Google Charts
- R interface to Google Charts API, allowing users to create interactive
- charts based on data frames. Charts are displayed locally via the R HTTP
- help server. A modern browser with Internet connection is required and
- for some charts a Flash player. The data remains local and is not
- uploaded to Google.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 5abe7e7..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,285 +0,0 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: googleVis
-Upstream-Contact: Markus Gesmann <markus.gesmann at googlemail.com>
-Source: https://cran.r-project.org/package=googleVis
-
-Files: *
-Copyright: 2013-2016 Markus Gesmann, Diego de Castillo, Joe Cheng
-License: GPL-2+
-
-Files: README.md
-Copyright: 2013-2016 Markus Gesmann, Diego de Castillo, Joe Cheng
-License: CC-4.0
- Creative Commons Attribution 4.0 International Public License
- .
- By exercising the Licensed Rights (defined below), You accept and agree to be
- bound by the terms and conditions of this Creative Commons Attribution 4.0
- International Public License ("Public License"). To the extent this Public
- License may be interpreted as a contract, You are granted the Licensed Rights
- in consideration of Your acceptance of these terms and conditions, and the
- Licensor grants You such rights in consideration of benefits the Licensor
- receives from making the Licensed Material available under these terms and
- conditions.
- .
- Section 1 – Definitions.
- .
- a. Adapted Material means material subject to Copyright and Similar Rights
-    that is derived from or based upon the Licensed Material and in which the
-    Licensed Material is translated, altered, arranged, transformed, or
-    otherwise modified in a manner requiring permission under the Copyright and
-    Similar Rights held by the Licensor. For purposes of this Public License,
-    where the Licensed Material is a musical work, performance, or sound
-    recording, Adapted Material is always produced where the Licensed Material
-    is synched in timed relation with a moving image.
- b. Adapter's License means the license You apply to Your Copyright and Similar
-    Rights in Your contributions to Adapted Material in accordance with the
-    terms and conditions of this Public License.
- c. Copyright and Similar Rights means copyright and/or similar rights closely
-    related to copyright including, without limitation, performance, broadcast,
-    sound recording, and Sui Generis Database Rights, without regard to how the
-    rights are labeled or categorized. For purposes of this Public License, the
-    rights specified in Section 2(b)(1)-(2) are not Copyright and Similar
-    Rights.
- d. Effective Technological Measures means those measures that, in the absence
-    of proper authority, may not be circumvented under laws fulfilling
-    obligations under Article 11 of the WIPO Copyright Treaty adopted on
-    December 20, 1996, and/or similar international agreements.
- e. Exceptions and Limitations means fair use, fair dealing, and/or any other
-    exception or limitation to Copyright and Similar Rights that applies to
-    Your use of the Licensed Material.
- f. Licensed Material means the artistic or literary work, database, or other
-    material to which the Licensor applied this Public License.
- g. Licensed Rights means the rights granted to You subject to the terms and
-    conditions of this Public License, which are limited to all Copyright and
-    Similar Rights that apply to Your use of the Licensed Material and that the
-    Licensor has authority to license.
- h. Licensor means the individual(s) or entity(ies) granting rights under this
-    Public License.
- i. Share means to provide material to the public by any means or process that
-    requires permission under the Licensed Rights, such as reproduction, public
-    display, public performance, distribution, dissemination, communication, or
-    importation, and to make material available to the public including in ways
-    that members of the public may access the material from a place and at a
-    time individually chosen by them.
- j. Sui Generis Database Rights means rights other than copyright resulting
-    from Directive 96/9/EC of the European Parliament and of the Council of 11
-    March 1996 on the legal protection of databases, as amended and/or
-    succeeded, as well as other essentially equivalent rights anywhere in the
-    world.
- k. You means the individual or entity exercising the Licensed Rights under
-    this Public License. Your has a corresponding meaning.
- .
- Section 2 – Scope.
- .
- a. License grant.
-     1. Subject to the terms and conditions of this Public License, the
-        Licensor hereby grants You a worldwide, royalty-free,
-        non-sublicensable, non-exclusive, irrevocable license to exercise the
-        Licensed Rights in the Licensed Material to:
-         A. reproduce and Share the Licensed Material, in whole or in part; and
-         B. produce, reproduce, and Share Adapted Material.
-     2. Exceptions and Limitations. For the avoidance of doubt, where
-        Exceptions and Limitations apply to Your use, this Public License does
-        not apply, and You do not need to comply with its terms and conditions.
-     3. Term. The term of this Public License is specified in Section 6(a).
-     4. Media and formats; technical modifications allowed. The Licensor
-        authorizes You to exercise the Licensed Rights in all media and formats
-        whether now known or hereafter created, and to make technical
-        modifications necessary to do so. The Licensor waives and/or agrees not
-        to assert any right or authority to forbid You from making technical
-        modifications necessary to exercise the Licensed Rights, including
-        technical modifications necessary to circumvent Effective Technological
-        Measures. For purposes of this Public License, simply making
-        modifications authorized by this Section 2(a)(4) never produces Adapted
-        Material.
-     5. Downstream recipients.
-         A. Offer from the Licensor – Licensed Material. Every recipient of the
-            Licensed Material automatically receives an offer from the Licensor
-            to exercise the Licensed Rights under the terms and conditions of
-            this Public License.
-         B. No downstream restrictions. You may not offer or impose any
-            additional or different terms or conditions on, or apply any
-            Effective Technological Measures to, the Licensed Material if doing
-            so restricts exercise of the Licensed Rights by any recipient of
-            the Licensed Material.
-     6. No endorsement. Nothing in this Public License constitutes or may be
-        construed as permission to assert or imply that You are, or that Your
-        use of the Licensed Material is, connected with, or sponsored,
-        endorsed, or granted official status by, the Licensor or others
-        designated to receive attribution as provided in Section 3(a)(1)(A)(i).
- b. Other rights.
- .
-     1. Moral rights, such as the right of integrity, are not licensed under
-        this Public License, nor are publicity, privacy, and/or other similar
-        personality rights; however, to the extent possible, the Licensor
-        waives and/or agrees not to assert any such rights held by the Licensor
-        to the limited extent necessary to allow You to exercise the Licensed
-        Rights, but not otherwise.
-     2. Patent and trademark rights are not licensed under this Public License.
-     3. To the extent possible, the Licensor waives any right to collect
-        royalties from You for the exercise of the Licensed Rights, whether
-        directly or through a collecting society under any voluntary or
-        waivable statutory or compulsory licensing scheme. In all other cases
-        the Licensor expressly reserves any right to collect such royalties.
- .
- Section 3 – License Conditions.
- .
- Your exercise of the Licensed Rights is expressly made subject to the following
- conditions.
- .
- a. Attribution.
- .
-     1. If You Share the Licensed Material (including in modified form), You
-        must:
- .
-         A. retain the following if it is supplied by the Licensor with the
-            Licensed Material:
-             i. identification of the creator(s) of the Licensed Material and
-                any others designated to receive attribution, in any reasonable
-                manner requested by the Licensor (including by pseudonym if
-                designated);
-            ii. a copyright notice;
-            iii. a notice that refers to this Public License;
-            iv. a notice that refers to the disclaimer of warranties;
-             v. a URI or hyperlink to the Licensed Material to the extent
-                reasonably practicable;
-         B. indicate if You modified the Licensed Material and retain an
-            indication of any previous modifications; and
-         C. indicate the Licensed Material is licensed under this Public
-            License, and include the text of, or the URI or hyperlink to, this
-            Public License.
-     2. You may satisfy the conditions in Section 3(a)(1) in any reasonable
-        manner based on the medium, means, and context in which You Share the
-        Licensed Material. For example, it may be reasonable to satisfy the
-        conditions by providing a URI or hyperlink to a resource that includes
-        the required information.
-     3. If requested by the Licensor, You must remove any of the information
-        required by Section 3(a)(1)(A) to the extent reasonably practicable.
-     4. If You Share Adapted Material You produce, the Adapter's License You
-        apply must not prevent recipients of the Adapted Material from
-        complying with this Public License.
- .
- Section 4 – Sui Generis Database Rights.
- .
- Where the Licensed Rights include Sui Generis Database Rights that apply to
- Your use of the Licensed Material:
- .
- a. for the avoidance of doubt, Section 2(a)(1) grants You the right to
-    extract, reuse, reproduce, and Share all or a substantial portion of the
-    contents of the database;
- b. if You include all or a substantial portion of the database contents in a
-    database in which You have Sui Generis Database Rights, then the database
-    in which You have Sui Generis Database Rights (but not its individual
-    contents) is Adapted Material; and
- c. You must comply with the conditions in Section 3(a) if You Share all or a
-    substantial portion of the contents of the database.
- .
- For the avoidance of doubt, this Section 4 supplements and does not replace
- Your obligations under this Public License where the Licensed Rights include
- other Copyright and Similar Rights.
- .
- Section 5 – Disclaimer of Warranties and Limitation of Liability.
- .
- a. Unless otherwise separately undertaken by the Licensor, to the extent
-    possible, the Licensor offers the Licensed Material as-is and as-available,
-    and makes no representations or warranties of any kind concerning the
-    Licensed Material, whether express, implied, statutory, or other. This
-    includes, without limitation, warranties of title, merchantability, fitness
-    for a particular purpose, non-infringement, absence of latent or other
-    defects, accuracy, or the presence or absence of errors, whether or not
-    known or discoverable. Where disclaimers of warranties are not allowed in
-    full or in part, this disclaimer may not apply to You.
- b. To the extent possible, in no event will the Licensor be liable to You on
-    any legal theory (including, without limitation, negligence) or otherwise
-    for any direct, special, indirect, incidental, consequential, punitive,
-    exemplary, or other losses, costs, expenses, or damages arising out of this
-    Public License or use of the Licensed Material, even if the Licensor has
-    been advised of the possibility of such losses, costs, expenses, or
-    damages. Where a limitation of liability is not allowed in full or in part,
-    this limitation may not apply to You.
- .
- c. The disclaimer of warranties and limitation of liability provided above
-    shall be interpreted in a manner that, to the extent possible, most closely
-    approximates an absolute disclaimer and waiver of all liability.
- .
- Section 6 – Term and Termination.
- .
- a. This Public License applies for the term of the Copyright and Similar
-    Rights licensed here. However, if You fail to comply with this Public
-    License, then Your rights under this Public License terminate
-    automatically.
- b. Where Your right to use the Licensed Material has terminated under Section
-    6(a), it reinstates:
- .
-     1. automatically as of the date the violation is cured, provided it is
-        cured within 30 days of Your discovery of the violation; or
-     2. upon express reinstatement by the Licensor.
-    For the avoidance of doubt, this Section 6(b) does not affect any right the
-    Licensor may have to seek remedies for Your violations of this Public
-    License.
- c. For the avoidance of doubt, the Licensor may also offer the Licensed
-    Material under separate terms or conditions or stop distributing the
-    Licensed Material at any time; however, doing so will not terminate this
-    Public License.
- d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
- .
- Section 7 – Other Terms and Conditions.
- .
- a. The Licensor shall not be bound by any additional or different terms or
-    conditions communicated by You unless expressly agreed.
- b. Any arrangements, understandings, or agreements regarding the Licensed
-    Material not stated herein are separate from and independent of the terms
-    and conditions of this Public License.
- .
- Section 8 – Interpretation.
- .
- a. For the avoidance of doubt, this Public License does not, and shall not be
-    interpreted to, reduce, limit, restrict, or impose conditions on any use of
-    the Licensed Material that could lawfully be made without permission under
-    this Public License.
- b. To the extent possible, if any provision of this Public License is deemed
-    unenforceable, it shall be automatically reformed to the minimum extent
-    necessary to make it enforceable. If the provision cannot be reformed, it
-    shall be severed from this Public License without affecting the
-    enforceability of the remaining terms and conditions.
- c. No term or condition of this Public License will be waived and no failure
-    to comply consented to unless expressly agreed to by the Licensor.
- d. Nothing in this Public License constitutes or may be interpreted as a
-    limitation upon, or waiver of, any privileges and immunities that apply to
-    the Licensor or You, including from the legal processes of any jurisdiction
-    or authority.
- .
- Creative Commons is not a party to its public licenses. Notwithstanding,
- Creative Commons may elect to apply one of its public licenses to material it
- publishes and in those instances will be considered the “Licensor.” The text of
- the Creative Commons public licenses is dedicated to the public domain under
- the CC0 Public Domain Dedication. Except for the limited purpose of indicating
- that material is shared under a Creative Commons public license or as otherwise
- permitted by the Creative Commons policies published at creativecommons.org/
- policies, Creative Commons does not authorize the use of the trademark
- “Creative Commons” or any other trademark or logo of Creative Commons without
- its prior written consent including, without limitation, in connection with any
- unauthorized modifications to any of its public licenses or any other
- arrangements, understandings, or agreements concerning use of licensed
- material. For the avoidance of doubt, this paragraph does not form part of the
- public licenses.
- .
- Creative Commons may be contacted at creativecommons.org.
-
-Files: debian/*
-Copyright: 2016-2017 Andreas Tille <tille at debian.org>
-License: GPL-2+
-
-License: GPL-2+
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
- .
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- .
- On Debian systems, the complete text of the GNU General Public
- License can be found in `/usr/share/common-licenses/GPL-2'.
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 9a4f4f8..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/README.test
-debian/tests/run-unit-test
diff --git a/debian/examples b/debian/examples
deleted file mode 100644
index 18244c8..0000000
--- a/debian/examples
+++ /dev/null
@@ -1 +0,0 @@
-vignettes
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 2cbc1b2..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/make -f
-
-%:
-	dh $@ --buildsystem R
-
-override_dh_install:
-	dh_install
-	find debian -name "*.rsp" -exec chmod -x \{\} \;
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
deleted file mode 100644
index d2aa55a..0000000
--- a/debian/tests/control
+++ /dev/null
@@ -1,3 +0,0 @@
-Tests: run-unit-test
-Depends: @
-Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
deleted file mode 100644
index f1be852..0000000
--- a/debian/tests/run-unit-test
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh -e
-oname=googleVis
-pkg=r-cran-`echo $oname | tr '[A-Z]' '[a-z]'`
-
-if [ "$ADTTMP" = "" ] ; then
-  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
-  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
-fi
-cd $ADTTMP
-cp -a /usr/share/doc/$pkg/examples/vignettes/* $ADTTMP
-find . -name "*.gz" -exec gunzip \{\} \;
-for rnw in `ls *.[rRS]nw` ; do
-rfile=`echo $rnw | sed 's/\.[rRS]nw/.R/'`
-R --no-save <<EOT
-  Stangle("$rnw")
-  source("$rfile", echo=TRUE)
-EOT
-  echo "$rnw passed"
-done
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 249f8bd..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,3 +0,0 @@
-version=4
-
-http://cran.r-project.org/src/contrib/googleVis_([-\d.]*)\.tar\.gz
diff --git a/demo/00Index b/demo/00Index
new file mode 100644
index 0000000..adaa3ad
--- /dev/null
+++ b/demo/00Index
@@ -0,0 +1,6 @@
+googleVis		Examples of various googleVis functions and plots
+AnimatedGeoChart		Prototype of an animate a geo map with JavaScript
+EventListener		Examples of basic JavaScript event handlers
+WorldBank		Visualising country level data sourced from the World Bank
+Trendlines    Adding trendlines to Scatter Charts, Bar Charts, Column Charts, and Line Charts
+Roles   Concept and use of roles with googleVis
diff --git a/demo/AnimatedGeoChart.R b/demo/AnimatedGeoChart.R
new file mode 100644
index 0000000..298c38b
--- /dev/null
+++ b/demo/AnimatedGeoChart.R
@@ -0,0 +1,148 @@
+## Animated Geo Maps based on ideas and code by:
+## Manoj Ananthapadmanabhan and Anand Ramalingam
+
+## Here we animate the percentage of vote for president won by the
+## Democratic candidate in the elections from 1932 - 2008
+
+## This demo requires the 'pscl' package
+if( !is.element("pscl", installed.packages()[,1]) )
+  install.packages("pscl")
+
+
+require(pscl)
+data(presidentialElections)
+
+## Add min and max values to the data
+df = data.frame(state=rep(c("Min", "Max"),20), 
+		 		demVote=rep(c(0, 100),20),
+  		 		year=sort(rep(seq(1932,2008,4),2)))
+
+
+presidentialElections <- rbind(presidentialElections[,1:3], df)
+
+## Create Geo Maps for each election
+gvisData <- by(presidentialElections, list(year=presidentialElections$year), function(x){
+	
+	year <- x$year[1]	
+	g <- gvisGeoChart(x, "state", "demVote", 
+		options=list(region="US", dataMode="regions", resolution="provinces"),
+		 chartid=paste("[", year, "]", sep=""))
+	.data <- g$html$chart["jsData"]
+	.data <-gsub("function ", "", .data)
+	.data <- sub("\\] ()", "\\] = function ", .data)
+	return(.data)	
+}
+)
+
+animation <- "
+var gvisData = {};
+
+var Animation = {};
+Animation.startYear = 1;
+Animation.endYear = 20;
+Animation.currentYear = Animation.startYear;
+Animation.divCharts = {};
+
+Animation.playAnimation = function() {
+  if (Animation.currentYear > Animation.endYear) {
+   	return;
+  }
+  document.getElementById('chart-header').innerHTML = 'Percent of the vote for president won by the Democratic candidate in year: '+ (1928 + 4*Animation.currentYear);
+  if (Animation.currentYear > Animation.startYear) {
+  	Animation.divCharts[Animation.currentYear-1].style.display = 'none';
+  }
+  Animation.divCharts[Animation.currentYear++].style.visibility = 'visible';
+  setTimeout(Animation.playAnimation, 2000);
+};
+
+"
+
+gvisChart <- '
+
+// jsDrawChart
+function drawChart() {
+	var chart = {};
+	var options ={};
+	options["displayMode"] = "regions";
+	options["width"] =   600;
+	options["region"] = "US";
+	options["height"] =  400;
+  options["resolution"] = "provinces"
+	options["colors"] = ["red", "blue"];
+	
+	for (var i = Animation.startYear; i<=Animation.endYear; i++) {
+	   Animation.divCharts[i] = document.createElement("div");
+	   Animation.divCharts[i].className = "pop-chart";
+	   document.body.appendChild(Animation.divCharts[i]);
+	   chart[i] = new google.visualization.GeoChart(Animation.divCharts[i]);
+	   
+	   var data = gvisData[(1928+4*i)]();
+	   options["title"] = i;
+	   chart[i].draw(data,options);
+	}
+		
+	// Animation.playAnimation();
+	setTimeout(Animation.playAnimation, 5000);
+}
+
+ 
+// jsDisplayChart 
+function displayChart() {
+  google.load("visualization", "1", { packages:["geochart"] }); 
+  google.setOnLoadCallback(drawChart);
+}
+// jsChart 
+displayChart()
+
+'
+
+
+htmlHead <- '
+
+<html>
+<head>
+<title>US Presidential Election by State: 1932 - 2008</title>
+
+<script type="text/javascript" src="http://www.google.com/jsapi"></script>
+<script type="text/javascript">
+
+'
+
+htmlFoot <-'
+
+</script>
+	
+<style>
+	.pop-chart {
+		position: absolute;
+		top: 50;
+		left: 10;
+		display: block;
+		visibility: hidden;
+	}
+</style>
+</head>
+<body>
+
+<div id="chart-header"></div>
+
+</body>
+</html>
+
+'
+
+page <- structure(
+                  list(type="AnimatedGeoChart",
+                       chartid="presidentialElections",
+                       html=list(
+                         header=htmlHead,
+                         chart=c(animation, gvisData, gvisChart),
+                         caption="",
+                         footer=htmlFoot)
+                       ),
+                  class = c("gvis", "list")
+                  )
+plot(page)
+
+
+## See demo(package='googleVis') for other available demos.
diff --git a/demo/EventListener.R b/demo/EventListener.R
new file mode 100644
index 0000000..4f388be
--- /dev/null
+++ b/demo/EventListener.R
@@ -0,0 +1,34 @@
+## The parameter gvis.listener.jscode embeds code inside
+## a select event listener.
+## It is possible to add javascript code and access the build in
+## method getSelection().
+##
+## The following code shows two examples:
+
+jscode <- "window.open('http://en.wikipedia.org/wiki/'+data.getValue(chart.getSelection()[0].row,0));  "
+J1 <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+                 options=list(dataMode="regions",gvis.listener.jscode=jscode))
+
+plot(J1)
+## Similarly the code can also be used for other charts, e.g. org chart and line chart
+
+plot(gvisOrgChart(Regions,  options=list(gvis.listener.jscode=jscode)))
+
+plot(gvisLineChart(Regions[,c(1,3)],  options=list(gvis.listener.jscode=jscode)))
+
+
+jscode <- "
+       var sel = chart.getSelection();
+       var row = sel[0].row;
+       var text = data.getValue(row,1);
+       alert(text);
+"
+
+J2 <- gvisTable(Population,options=list(gvis.listener.jscode=jscode))
+
+plot(J2)
+
+## For more details see
+## http://code.google.com/apis/chart/interactive/docs/reference.html#addlistener
+
+## See demo(package='googleVis') for other available demos.
diff --git a/demo/Roles.R b/demo/Roles.R
new file mode 100644
index 0000000..6cb81f7
--- /dev/null
+++ b/demo/Roles.R
@@ -0,0 +1,152 @@
+# Add the ability to pass columns roles for further
+# processing downstream
+#
+# Thanks to Oliver Gjoneski
+#
+# Role columns must follow column they pertain to.  Proper naming
+# conventions must be be observed.  For example, roles fulfilling tooltip
+# roles and must be called "foo.blah.tooltip".
+#
+# For more details see:
+# https://developers.google.com/chart/interactive/docs/roles
+
+## ---- Tooltip ----
+df <- data.frame(year=1:11,pop=1:11,
+                 pop.html.tooltip=letters[1:11])
+plot( 
+  gvisScatterChart(df)
+)
+
+## ---- TooltipHTML ----
+levels(df$pop.html.tooltip)[1] <- 
+  '<a href="http://www.r-project.com"><img src="http://www.r-project.org/Rlogo.jpg" alt="R logo" /></a>'
+plot( 
+  gvisScatterChart(df,
+                   options=list(tooltip="{isHtml:'true'}"))
+)
+
+## ---- CertaintyScopeEmphasis ----
+df <- data.frame(year=1:11, x=1:11,
+                 x.scope=c(rep(TRUE, 8), rep(FALSE, 3)),
+                 y=11:1, y.html.tooltip=LETTERS[11:1],                 
+                 y.certainty=c(rep(TRUE, 5), rep(FALSE, 6)),
+                 y.emphasis=c(rep(FALSE, 4), rep(TRUE, 7)))
+plot(
+  gvisScatterChart(df,options=list(lineWidth=2))
+)
+
+## ---- ColumnChart ----
+dat <- data.frame(Year=2010:2013,
+                  Sales=c(600, 1500, 800, 1000),
+                  Sales.html.tooltip=c('$600K in our first year!',
+                                       'Sunspot activity made this our best year ever!',
+                                       '$800K in 2012.',
+                                       '$1M in sales last year.'),
+                  Sales.certainty=c(TRUE, FALSE, TRUE, FALSE))
+plot(
+  gvisColumnChart(dat, xvar='Year', 
+                  yvar=c('Sales', 'Sales.certainty')
+  )
+)
+
+## ---- Interval ----
+df <- data.frame(Year=2013:2014, Sales=c(120, 130), 
+                 Sales.interval.1=c(100,110), 
+                 Sales.interval.2=c(140, 150),
+                 Sales.interval.3=c(90, 100),
+                 Sales.interval.4=c(150, 170),
+                 Sales.style=c('red', 'gold'),
+                 Sales.annotation=c("North", "South"),
+                 check.names=FALSE)
+
+plot(
+  gvisBarChart(df, xvar='Year', 
+               yvar=c('Sales',                       
+                      'Sales.interval.1', 
+                      'Sales.interval.2',
+                      'Sales.style',
+                      'Sales.annotation')
+  )
+)
+
+plot(
+  gvisLineChart(df, xvar='Year', 
+               yvar=c('Sales', 
+                      'Sales.interval.1', 
+                      'Sales.interval.2'),
+               options=list(series="[{color:'purple'}]")
+  )
+)
+
+
+plot(
+  gvisLineChart(df, xvar='Year', 
+                yvar=c('Sales', 
+                       'Sales.interval.1', 
+                       'Sales.interval.2', 
+                       'Sales.interval.3', 
+                       'Sales.interval.4'),
+                options=list(series="[{color:'purple'}]",
+                             lineWidth=4,
+                             interval="{
+            'i1': { 'style':'line', 'color':'#D3362D', 'lineWidth': 0.5 },
+            'i2': { 'style':'line', 'color':'#F1CA3A', 'lineWidth': 1 },
+            'i3': { 'style':'line', 'color':'#5F9654', 'lineWidth': 2 },
+            'i4': { 'style':'line', 'color':'#5F9654', 'lineWidth': 3 }
+        }")
+  )
+)
+
+
+plot(
+  gvisLineChart(df, xvar='Year', 
+                yvar=c('Sales', 
+                       'Sales.interval.1', 
+                       'Sales.interval.2', 
+                       'Sales.interval.3', 
+                       'Sales.interval.4'),
+                options=list(series="[{color:'purple'}]",
+                             lineWidth=4,
+                             intervals="{ 'style':'area' }",
+                             interval="{
+                               'i1': { 'color': '#4374E0', 'style':'bars', 'barWidth':0, 'lineWidth':4, 'pointSize':10, 'fillOpacity':1 },
+                               'i2': { 'color': '#E49307', 'style':'bars', 'barWidth':0, 'lineWidth':4, 'pointSize':10, 'fillOpacity':1 }}"                                                          
+                             )
+  )
+)
+
+
+## ---- TwoLines ----
+df <- data.frame(country=c("US", "GB", "BR"), 
+                 val1=c(1,3,4), 
+                 val1.emphasis=c(TRUE, TRUE, FALSE),
+                 val2=c(23,12,32))
+plot(
+  gvisLineChart(df, xvar="country", 
+                yvar=c("val1", "val1.emphasis")
+  )
+)
+
+plot(
+  gvisLineChart(df, xvar="country", 
+                yvar=c("val1", "val1.emphasis", "val2")
+  )
+)
+
+## ---- VerticalReferenceLine ----
+dat <- data.frame(Year=2010:2013, 
+                  Sales=c(600, 1500, 800, 1000),
+                  Sales.annotation=c('First year', NA, NA, 'Last Year'),
+                  Sales.annotationText=c('$600K in our first year!',
+                                       NA,
+                                       NA,
+                                       '$1M in sales last year.'))      
+
+plot(
+  gvisLineChart(dat, xvar='Year', 
+                  yvar=c('Sales',
+                         'Sales.annotation',
+                         'Sales.annotationText'),
+                         options=list(annotations = "{style:'line'}")
+  )
+)
diff --git a/demo/Trendlines.R b/demo/Trendlines.R
new file mode 100644
index 0000000..5900b96
--- /dev/null
+++ b/demo/Trendlines.R
@@ -0,0 +1,52 @@
+## Trend line demo
+# A trendline is a line superimposed on a chart revealing the overall direction 
+# of the data. Google Charts can automatically generate trendlines for 
+# Scatter Charts, Bar Charts, Column Charts, and Line Charts.
+# 
+# Fore more details see:
+# https://developers.google.com/chart/interactive/docs/gallery/trendlines
+
+## Linear trend line
+
+## Add a trend line to the first series
+## ---- LinearTrend ----
+plot(
+  gvisScatterChart(women, options=list(trendlines="0"))
+)
+
+## ---- ExponentialTrend ----
+plot(
+  gvisScatterChart(women, options=list(
+    trendlines="{0: { type: 'exponential',  
+                     visibleInLegend: 'true', 
+                     color: 'green',
+                     lineWidth: 10,
+                     opacity: 0.5}}",
+    chartArea="{left:50,top:20,width:'50%',height:'75%'}"))
+)
+
+## ---- ColumnChartWithTrendline ----
+dat <- data.frame(val1=c(1,3,4,5,6,8), 
+                  val2=c(12,23,32,40,50,55))
+plot(
+  gvisColumnChart(dat,
+                  options=list(trendlines="{0: {}}"))
+)
+
+## ---- DifferentLabels ----
+dat$val3 <- c(5,6,10,12,15,20)
+plot(
+  gvisColumnChart(dat,
+                  options=list(trendlines="{
+                          0: {
+                            labelInLegend: 'Trendline 1',
+                            visibleInLegend: true,}, 
+                          1:{
+                            labelInLegend: 'Trendline 2',
+                            visibleInLegend: true}
+                          }",
+                          chartArea="{left:50,top:20,
+                                      width:'50%',height:'75%'}"
+                  ))
+)
+
diff --git a/demo/WorldBank.R b/demo/WorldBank.R
new file mode 100644
index 0000000..2e2353a
--- /dev/null
+++ b/demo/WorldBank.R
@@ -0,0 +1,44 @@
+## This demo shows how country level data can be accessed from
+## the World Bank via their API and displayed with a Motion Chart.
+## Inspired by Google's Public Data Explorer, see
+## http://www.google.com/publicdata/home
+##
+## For the World Bank Data terms of use see:
+## http://data.worldbank.org/summary-terms-of-use
+##
+## To run this demo an internet connection and Flash are required.
+## This demo is part of the googleVis R package.
+##
+## See also: http://lamages.blogspot.com/2011/09/accessing-and-plotting-world-bank-data.html
+## Markus Gesmann, 24 September 2011
+##
+## Thanks to John Maindonald for a simplified version of this
+## demo using the WDI package.
+##
+## Distributed under GPL 2 or later
+
+## This demo requires the 'WDI' package
+if( !is.element("WDI", installed.packages()[,1]) )
+  install.packages("WDI")
+
+library(WDI)
+inds <- c('SP.DYN.TFRT.IN','SP.DYN.LE00.IN', 'SP.POP.TOTL',
+          'NY.GDP.PCAP.CD', 'SE.ADT.1524.LT.FE.ZS')
+indnams <- c("fertility.rate", "life.expectancy", "population",
+             "GDP.per.capita.Current.USD", "15.to.25.yr.female.literacy")
+wdiData <- WDI(country="all", indicator=inds,
+               start=1960, end=format(Sys.Date(), "%Y"), extra=TRUE)
+colnum <- match(inds, names(wdiData))
+
+names(wdiData)[colnum] <- indnams
+## Create a motion chart
+library(googleVis)
+WorldBank <- droplevels(subset(wdiData, !region %in% "Aggregates"))
+M <- gvisMotionChart(WorldBank,
+                     idvar="country", timevar="year",
+                     xvar="life.expectancy", yvar="fertility.rate",
+                     sizevar="population", colorvar="region", 
+                     options=list(width=700, height=600),
+                     chartid="WorldBank")
+## Display the chart in the browser
+plot(M)
diff --git a/demo/googleVis.R b/demo/googleVis.R
new file mode 100644
index 0000000..2418250
--- /dev/null
+++ b/demo/googleVis.R
@@ -0,0 +1,452 @@
+## ---- googleVis demo ----
+## ---- pauseFunction ----
+pause <- function(){  
+  invisible(readline("\nPress <return> to continue: ")) 
+}
+
+## ---- testData ----
+df=data.frame(country=c("US", "GB", "BR"), 
+              val1=c(10,13,14), 
+              val2=c(23,12,32))
+
+
+## ---- LineChart ----
+Line <- gvisLineChart(df)
+plot(Line)
+
+## ---- pause ----
+pause()
+
+## ---- TwoAxis ----
+Line2 <- gvisLineChart(df, "country", c("val1","val2"),
+                       options=list(
+                         series="[{targetAxisIndex: 0},
+                                 {targetAxisIndex:1}]",
+                         vAxes="[{title:'val1'}, {title:'val2'}]"
+                       ))
+plot(Line2)
+
+## ---- pause ----
+pause()
+
+## ---- SettingOptions ----
+Line3 <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+                        options=list(
+                          title="Hello World",
+                          titleTextStyle="{color:'red', 
+                                           fontName:'Courier', 
+                                           fontSize:16}",                         
+                          backgroundColor="#D3D3D3",                          
+                          vAxis="{gridlines:{color:'red', count:3}}",
+                          hAxis="{title:'Country', titleTextStyle:{color:'blue'}}",
+                          series="[{color:'green', targetAxisIndex: 0},	
+                                   {color: 'orange',targetAxisIndex:1}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]",
+                          legend="bottom",
+                          curveType="function",
+                          width=500,
+                          height=300                         
+                        ))
+plot(Line3)
+
+## ---- pause ----
+pause()
+
+## ---- CustomizingLines ----
+Dashed <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+                        options=list(
+                          series="[{color:'green', targetAxisIndex: 0, 
+                          lineWidth: 1, lineDashStyle: [2, 2, 20, 2, 20, 2]}, 
+                          {color: 'blue',targetAxisIndex: 1, 
+                          lineWidth: 2, lineDashStyle: [4, 1]}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]"
+                        ))
+plot(Dashed)
+
+## ---- pause ----
+pause()
+
+## ---- EditButton ----
+Line4 <-  gvisLineChart(df, "country", c("val1","val2"),
+                        options=list(gvis.editor="Edit me!"))
+plot(Line4)
+
+
+
+## ---- pause ----
+pause()
+
+## ---- BarChart ----
+Bar <- gvisBarChart(df)
+plot(Bar)
+
+## ---- pause ----
+pause()
+
+## ---- ColumnChart ----
+Column <- gvisColumnChart(df)
+plot(Column)
+
+## ---- pause ----
+pause()
+
+## ---- AreaChart ----
+Area <- gvisAreaChart(df)
+plot(Area)
+
+## ---- pause ----
+pause()
+
+## ---- SteppedAreaChart ----
+SteppedArea <- gvisSteppedAreaChart(df, xvar="country", 
+                                    yvar=c("val1", "val2"),
+                                    options=list(isStacked=TRUE))
+plot(SteppedArea)
+
+## ---- pause ----
+pause()
+
+## ---- ComboChart ----
+Combo <- gvisComboChart(df, xvar="country",
+                        yvar=c("val1", "val2"),
+                        options=list(seriesType="bars",
+                                     series='{1: {type:"line"}}'))
+plot(Combo)
+
+## ---- pause ----
+pause()
+
+## ---- ScatterChart ----
+Scatter <- gvisScatterChart(women, 
+                            options=list(
+                              legend="none",
+                              lineWidth=2, pointSize=0,
+                              title="Women", vAxis="{title:'weight (lbs)'}",
+                              hAxis="{title:'height (in)'}", 
+                              width=300, height=300))
+plot(Scatter)
+
+## ---- ScatterChartPoints ----
+M <- matrix(nrow=6,ncol=6)
+M[col(M)==row(M)] <- 1:6
+dat <- data.frame(X=1:6, M)
+SC <- gvisScatterChart(dat, 
+                       options=list(
+                         title="Customizing points",
+                         legend="right",
+                         pointSize=30,
+                         series="{
+                              0: { pointShape: 'circle' },
+                              1: { pointShape: 'triangle' },
+                              2: { pointShape: 'square' },
+                              3: { pointShape: 'diamond' },
+                              4: { pointShape: 'star' },
+                              5: { pointShape: 'polygon' }
+                              }"))
+plot(SC)
+
+## ---- pause ----
+pause()
+
+## ---- BubbleChart ----
+Bubble <- gvisBubbleChart(Fruits, idvar="Fruit", 
+                          xvar="Sales", yvar="Expenses",
+                          colorvar="Year", sizevar="Profit",
+                          options=list(
+                            hAxis='{minValue:75, maxValue:125}'))
+plot(Bubble)
+
+## ---- pause ----
+pause()
+
+## ---- CandlestickChart ----
+Candle <- gvisCandlestickChart(OpenClose, 
+                               options=list(legend='none'))
+plot(Candle)
+
+## ---- pause ----
+pause()
+
+## ---- PieChart ----
+Pie <- gvisPieChart(CityPopularity)
+plot(Pie)
+
+## ---- pause ----
+pause()
+
+## ---- Gauge ----
+Gauge <-  gvisGauge(CityPopularity, 
+                    options=list(min=0, max=800, greenFrom=500,
+                                 greenTo=800, yellowFrom=300, yellowTo=500,
+                                 redFrom=0, redTo=300, width=400, height=300))
+plot(Gauge)
+
+## ---- pause ----
+pause()
+
+## ---- IntensityMap ----
+Intensity <- gvisIntensityMap(df)
+plot(Intensity)
+
+## ---- pause ----
+pause()
+
+
+## ---- GeoChart ----
+Geo=gvisGeoChart(Exports, locationvar="Country", 
+                 colorvar="Profit",
+                 options=list(projection="kavrayskiy-vii"))
+plot(Geo)
+
+## ---- pause ----
+pause()
+
+
+## ---- USStateData ----
+require(datasets)
+states <- data.frame(state.name, state.x77)
+GeoStates <- gvisGeoChart(states, "state.name", "Illiteracy",
+                          options=list(region="US", 
+                                       displayMode="regions", 
+                                       resolution="provinces",
+                                       width=600, height=400))
+plot(GeoStates)
+
+## ---- pause ----
+pause()
+
+## ---- GeoChartHurricaneAndrew ----
+GeoMarker <- gvisGeoChart(Andrew, "LatLong", 
+                          sizevar='Speed_kt',
+                          colorvar="Pressure_mb", 
+                          options=list(region="US"))
+plot(GeoMarker)
+
+## ---- pause ----
+pause()
+
+## ---- GoogleMapHurricaneAndrew ----
+AndrewMap <- gvisMap(Andrew, "LatLong" , "Tip", 
+                     options=list(showTip=TRUE, 
+                                  showLine=TRUE, 
+                                  enableScrollWheel=TRUE,
+                                  mapType='terrain', 
+                                  useMapTypeControl=TRUE))
+plot(AndrewMap)
+
+## ---- pause ----
+pause()
+
+
+## ---- Table ----
+Table <- gvisTable(Stock, 
+                   formats=list(Value="#,###"))
+plot(Table)
+
+## ---- pause ----
+pause()
+
+## ---- TableWithPages ----
+PopTable <- gvisTable(Population, 
+                      formats=list(Population="#,###",
+                                   '% of World Population'='#.#%'),
+                      options=list(page='enable'))
+plot(PopTable)
+
+## ---- pause ----
+pause()
+
+## ---- OrgChart ----
+Org <- gvisOrgChart(Regions, 
+                    options=list(width=600, height=250,
+                                 size='large', allowCollapse=TRUE))
+plot(Org)
+
+## ---- pause ----
+pause()
+
+
+## ---- TreeMap ----
+Tree <- gvisTreeMap(Regions,  
+                    "Region", "Parent", 
+                    "Val", "Fac", 
+                    options=list(fontSize=16))
+plot(Tree)
+
+## ---- pause ----
+pause()
+
+## ---- AnnotationChart ----
+Anno <- gvisAnnotationChart(Stock, 
+                            datevar="Date",
+                            numvar="Value", 
+                            idvar="Device",
+                            titlevar="Title", 
+                            annotationvar="Annotation",
+                            options=list(
+                              width=600, height=350,
+                              fill=10, displayExactValues=TRUE,
+                              colors="['#0000ff','#00ff00']")
+)
+plot(Anno)
+
+## ---- pause ----
+pause()
+
+## ---- SankeyChart ----
+datSK <- data.frame(From=c(rep("A",3), rep("B", 3)),
+                    To=c(rep(c("X", "Y", "Z"),2)),
+                    Weight=c(5,7,6,2,9,4))
+
+Sankey <- gvisSankey(datSK, from="From", to="To", weight="Weight",
+                     options=list(
+                       sankey="{link: {color: { fill: '#d799ae' } },
+                            node: { color: { fill: '#a61d4c' },
+                            label: { color: '#871b47' } }}"))
+plot(Sankey)
+
+## ---- pause ----
+pause()
+
+# ---- CalendarChart ----
+Cal <- gvisCalendar(Cairo, 
+                    datevar="Date", 
+                    numvar="Temp",
+                    options=list(
+                      title="Daily temperature in Cairo",
+                      height=320,
+                      calendar="{yearLabel: { fontName: 'Times-Roman',
+                               fontSize: 32, color: '#1A8763', bold: true},
+                               cellSize: 10,
+                               cellColor: { stroke: 'red', strokeOpacity: 0.2 },
+                               focusedCellColor: {stroke:'red'}}")
+)
+plot(Cal)
+
+## ---- pause ----
+pause()
+
+# ---- Timeline ----
+datTL <- data.frame(Position=c(rep("President", 3), rep("Vice", 3)),
+                    Name=c("Washington", "Adams", "Jefferson",
+                           "Adams", "Jefferson", "Burr"),
+                    start=as.Date(x=rep(c("1789-03-29", "1797-02-03", 
+                                          "1801-02-03"),2)),
+                    end=as.Date(x=rep(c("1797-02-03", "1801-02-03", 
+                                        "1809-02-03"),2)))
+
+Timeline <- gvisTimeline(data=datTL, 
+                         rowlabel="Name",
+                         barlabel="Position",
+                         start="start", 
+                         end="end",
+                         options=list(timeline="{groupByRowLabel:false}",
+                                      backgroundColor='#ffd', 
+                                      height=350,
+                                      colors="['#cbb69d', '#603913', '#c69c6e']"))
+plot(Timeline)
+
+## ---- pause ----
+pause()
+
+## ---- Histogram ----
+set.seed(123)
+datHist=data.frame(A=rpois(100, 20),
+                   B=rpois(100, 5),
+                   C=rpois(100, 50))
+
+Hist <- gvisHistogram(datHist, options=list(
+  legend="{ position: 'top', maxLines: 2 }",
+  colors="['#5C3292', '#1A8763', '#871B47']",
+  width=400, height=360))
+plot(Hist)
+
+## ---- pause ----
+pause()
+
+## ---- gvisMerge ----
+G <- gvisGeoChart(Exports, "Country", "Profit", 
+                  options=list(width=300, height=300))
+T <- gvisTable(Exports, 
+               options=list(width=220, height=300))
+
+GT <- gvisMerge(G,T, horizontal=TRUE) 
+plot(GT)
+
+## ---- pause ----
+pause()
+
+
+## Flash charts
+##  ---- GeoMap ----
+Geo=gvisGeoMap(Exports, locationvar="Country", numvar="Profit",
+               options=list(height=350, dataMode='regions'))
+plot(Geo)
+
+## ---- pause ----
+pause()
+
+
+## ---- GeoMap ----
+AndrewGeo <- gvisGeoMap(Andrew, 
+                        locationvar="LatLong", 
+                        numvar="Speed_kt", 
+                        hovervar="Category", 
+                        options=list(height=350, 
+                                     region="US", 
+                                     dataMode="markers"))
+plot(AndrewGeo)
+
+## ---- pause ----
+pause()
+
+## ---- AnnotatedTimeLine ----
+AnnoTimeLine  <- gvisAnnotatedTimeLine(Stock, 
+                                       datevar="Date",
+                                       numvar="Value", 
+                                       idvar="Device",
+                                       titlevar="Title", 
+                                       annotationvar="Annotation",
+                                       options=list(displayAnnotations=TRUE,
+                                                    width="600px", height="350px"))
+plot(AnnoTimeLine)
+
+## ---- pause ----
+pause()
+
+## ---- MotionChart ----
+Motion=gvisMotionChart(Fruits, 
+                       idvar="Fruit", 
+                       timevar="Year")
+plot(Motion)
+
+## ---- pause ----
+pause()
+
+
+## You can change some of displaying settings via the browser,
+## e.g. the level of opacity of non-selected items, or the chart type.
+## The state string from the 'Advanced' tab can be used to set those
+## settings via R. Just copy and past the string from the browser into
+## the argument state of the options list.
+## Here is an example of a motion chart, with an initial line chart
+## displayed.
+
+## ---- MotionChartSettings ----
+myStateSettings <-'
+{"xZoomedDataMin":1199145600000,"colorOption":"2",
+"duration":{"timeUnit":"Y","multiplier":1},"yLambda":1,
+"yAxisOption":"4","sizeOption":"_UNISIZE",
+"iconKeySettings":[],"xLambda":1,"nonSelectedAlpha":0,
+"xZoomedDataMax":1262304000000,"iconType":"LINE",
+"dimensions":{"iconDimensions":["dim0"]},
+"showTrails":false,"uniColorForNonSelected":false,
+"xAxisOption":"_TIME","orderedByX":false,"playDuration":15000,
+"xZoomedIn":false,"time":"2010","yZoomedDataMin":0,
+"yZoomedIn":false,"orderedByY":false,"yZoomedDataMax":100}
+'
+M <- gvisMotionChart(Fruits, "Fruit", "Year", options=list(state=myStateSettings))
+plot(M)
+
+
+## See demo(package='googleVis') for other available demos.
diff --git a/inst/CITATION b/inst/CITATION
new file mode 100644
index 0000000..7076bc2
--- /dev/null
+++ b/inst/CITATION
@@ -0,0 +1,17 @@
+citHeader("To cite the googleVis package in publications use:")
+
+citEntry(entry="Article",
+         title = "googleVis: Interface between R and the Google Visualisation API",
+         author = personList(as.person("Markus Gesmann"), as.person("Diego de Castillo")),
+         journal = "The R Journal",
+         year = 2011,
+	       volume	= 3,
+	       number = 2,
+ 	       pages = "40--44",
+	       month = "December",
+         url= "https://journal.r-project.org/archive/2011-2/RJournal_2011-2_Gesmann+de~Castillo.pdf",
+         textVersion = 
+         paste("Markus Gesmann and Diego de Castillo.",
+	  "Using the Google Visualisation API with R.",
+	  "The R Journal, 3(2):40-44, December 2011."))
+
diff --git a/inst/brew/Stock.html b/inst/brew/Stock.html
new file mode 100644
index 0000000..8c51911
--- /dev/null
+++ b/inst/brew/Stock.html
@@ -0,0 +1,55 @@
+<html>
+<body>
+<% setContentType("text/html") %>
+
+<h1>Apple Inc. Stock Performance</h1>
+
+<%
+ require(googleVis)
+
+d <- Sys.time() ## get current date and time
+current.year <- format(d, "%Y")
+current.month <- format(d, "%m")
+current.day <- format(Sys.time(), "%d")
+##Yahoo finance sets January to 00 hence: 
+month <- as.numeric(current.month)  - 1
+month <- ifelse(month < 10, paste("0",month, sep=""), m)
+
+## weekly stock prices from Apple Inc.
+fn <-
+sprintf('http://ichart.finance.yahoo.com/table.csv?s=AAPL&a=08&b=7&c=1984&d=%s&e=%s&f=%s&g=w&ignore=.csv',
+month, current.day, current.year)
+
+## Get Data from Yahoo Finance
+data <- read.csv(fn, colClasses=c("Date", rep("numeric",6)))
+
+AAPL <- reshape(data[,c("Date", "Close", "Volume")], idvar="Date", times=c("Close", "Volume"), 
+                  timevar="Type",
+                  varying=list(c("Close", "Volume")),
+                  v.names="Value", "Type",
+                   direction="long")
+
+## calculate date last year for zoom start time
+lyd <- as.POSIXlt(as.Date(d))
+lyd$year <- lyd$year-1
+lyd <- as.Date(lyd)
+
+aapl <- gvisAnnotatedTimeLine(AAPL, datevar="Date",
+                           numvar="Value", idvar="Type",
+                          options=list(
+                            zoomStartTime=lyd,
+                            zoomEndTime=as.Date(d),
+                            legendPosition='newRow',
+                            width=600, height=400, scaleColumns='[0,1]',
+                            scaleType='allmaximized')
+                           )
+
+%>
+<hr>
+
+<%= aapl$html$chart %>
+
+
+<hr>
+</body>
+</html>
diff --git a/inst/brew/andrew.html b/inst/brew/andrew.html
new file mode 100644
index 0000000..a493871
--- /dev/null
+++ b/inst/brew/andrew.html
@@ -0,0 +1,38 @@
+<% setContentType("text/html") %>
+
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> 
+<body>
+
+
+<h1>Hurricane Andrew</h1>
+
+<%
+ require(googleVis)
+ AndrewGeoMap <- gvisGeoMap(Andrew, locationvar="LatLong", numvar="Speed_kt",
+                          hovervar="Category",
+                          options=list(width=800,height=400, region="US"))
+
+ AndrewTable <- gvisTable(Andrew,options=list(width=800))
+
+ AndrewMap <- gvisMap(Andrew, "LatLong" , "Tip",
+                           options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE,
+                           mapType='hybrid', useMapTypeControl=TRUE,
+			   width=800,height=400))
+
+%>
+<hr>
+<%= AndrewMap$html$chart %>
+<hr>
+<%= AndrewGeoMap$html$chart %>
+<hr>
+<%= AndrewTable$html$chart %>
+<!--
+<hr>
+Original code for this page:
+<pre>
+<% print(gsub(">",">",gsub("<","<",readLines("/Library/WebServer/Documents/rapache/brew/andrew.html")))) %>
+</pre>
+-->
+</body>
+</html>
\ No newline at end of file
diff --git a/inst/doc/Using_Roles_via_googleVis.R b/inst/doc/Using_Roles_via_googleVis.R
new file mode 100644
index 0000000..3c7c154
--- /dev/null
+++ b/inst/doc/Using_Roles_via_googleVis.R
@@ -0,0 +1,146 @@
+## ----setOptions, message=FALSE, echo=FALSE-------------------------------
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('Roles', 'googleVis')
+
+## ----Tooltip, results='asis', tidy=FALSE---------------------------------
+df <- data.frame(year=1:11,pop=1:11,
+                 pop.html.tooltip=letters[1:11])
+plot( 
+  gvisScatterChart(df)
+)
+
+## ----TooltipHTML, results='asis', tidy=FALSE-----------------------------
+levels(df$pop.html.tooltip)[1] <- 
+  '<a href="http://www.r-project.com"><img src="http://www.r-project.org/Rlogo.jpg" alt="R logo" /></a>'
+plot( 
+  gvisScatterChart(df,
+                   options=list(tooltip="{isHtml:'true'}"))
+)
+
+## ----CertaintyScopeEmphasis, results='asis', tidy=FALSE------------------
+df <- data.frame(year=1:11, x=1:11,
+                 x.scope=c(rep(TRUE, 8), rep(FALSE, 3)),
+                 y=11:1, y.html.tooltip=LETTERS[11:1],                 
+                 y.certainty=c(rep(TRUE, 5), rep(FALSE, 6)),
+                 y.emphasis=c(rep(FALSE, 4), rep(TRUE, 7)))
+plot(
+  gvisScatterChart(df,options=list(lineWidth=2))
+)
+
+## ----ColumnChart, results='asis', tidy=FALSE-----------------------------
+dat <- data.frame(Year=2010:2013,
+                  Sales=c(600, 1500, 800, 1000),
+                  Sales.html.tooltip=c('$600K in our first year!',
+                                       'Sunspot activity made this our best year ever!',
+                                       '$800K in 2012.',
+                                       '$1M in sales last year.'),
+                  Sales.certainty=c(TRUE, FALSE, TRUE, FALSE))
+plot(
+  gvisColumnChart(dat, xvar='Year', 
+                  yvar=c('Sales', 'Sales.certainty')
+  )
+)
+
+## ----TwoLines, results='asis', tidy=FALSE--------------------------------
+df <- data.frame(country=c("US", "GB", "BR"), 
+                 val1=c(1,3,4), 
+                 val1.emphasis=c(TRUE, TRUE, FALSE),
+                 val2=c(23,12,32))
+plot(
+  gvisLineChart(df, xvar="country", 
+                yvar=c("val1", "val1.emphasis")
+  )
+)
+
+plot(
+  gvisLineChart(df, xvar="country", 
+                yvar=c("val1", "val1.emphasis", "val2")
+  )
+)
+
+## ----VerticalReferenceLine, results='asis', tidy=FALSE-------------------
+dat <- data.frame(Year=2010:2013, 
+                  Sales=c(600, 1500, 800, 1000),
+                  Sales.annotation=c('First year', NA, NA, 'Last Year'),
+                  Sales.annotationText=c('$600K in our first year!',
+                                       NA,
+                                       NA,
+                                       '$1M in sales last year.'))      
+
+plot(
+  gvisLineChart(dat, xvar='Year', 
+                  yvar=c('Sales',
+                         'Sales.annotation',
+                         'Sales.annotationText'),
+                         options=list(annotations = "{style:'line'}")
+  )
+)
+
+## ----Interval, results='asis', tidy=FALSE--------------------------------
+df <- data.frame(Year=2013:2014, Sales=c(120, 130), 
+                 Sales.interval.1=c(100,110), 
+                 Sales.interval.2=c(140, 150),
+                 Sales.interval.3=c(90, 100),
+                 Sales.interval.4=c(150, 170),
+                 Sales.style=c('red', 'gold'),
+                 Sales.annotation=c("North", "South"),
+                 check.names=FALSE)
+
+plot(
+  gvisBarChart(df, xvar='Year', 
+               yvar=c('Sales',                       
+                      'Sales.interval.1', 
+                      'Sales.interval.2',
+                      'Sales.style',
+                      'Sales.annotation')
+  )
+)
+
+plot(
+  gvisLineChart(df, xvar='Year', 
+               yvar=c('Sales', 
+                      'Sales.interval.1', 
+                      'Sales.interval.2'),
+               options=list(series="[{color:'purple'}]")
+  )
+)
+
+
+plot(
+  gvisLineChart(df, xvar='Year', 
+                yvar=c('Sales', 
+                       'Sales.interval.1', 
+                       'Sales.interval.2', 
+                       'Sales.interval.3', 
+                       'Sales.interval.4'),
+                options=list(series="[{color:'purple'}]",
+                             lineWidth=4,
+                             interval="{
+            'i1': { 'style':'line', 'color':'#D3362D', 'lineWidth': 0.5 },
+            'i2': { 'style':'line', 'color':'#F1CA3A', 'lineWidth': 1 },
+            'i3': { 'style':'line', 'color':'#5F9654', 'lineWidth': 2 },
+            'i4': { 'style':'line', 'color':'#5F9654', 'lineWidth': 3 }
+        }")
+  )
+)
+
+
+plot(
+  gvisLineChart(df, xvar='Year', 
+                yvar=c('Sales', 
+                       'Sales.interval.1', 
+                       'Sales.interval.2', 
+                       'Sales.interval.3', 
+                       'Sales.interval.4'),
+                options=list(series="[{color:'purple'}]",
+                             lineWidth=4,
+                             intervals="{ 'style':'area' }",
+                             interval="{
+                               'i1': { 'color': '#4374E0', 'style':'bars', 'barWidth':0, 'lineWidth':4, 'pointSize':10, 'fillOpacity':1 },
+                               'i2': { 'color': '#E49307', 'style':'bars', 'barWidth':0, 'lineWidth':4, 'pointSize':10, 'fillOpacity':1 }}"                                                          
+                             )
+  )
+)
+
diff --git a/inst/doc/Using_Roles_via_googleVis.Rmd b/inst/doc/Using_Roles_via_googleVis.Rmd
new file mode 100644
index 0000000..12a71e6
--- /dev/null
+++ b/inst/doc/Using_Roles_via_googleVis.Rmd
@@ -0,0 +1,58 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Using Roles and Intervals via googleVis}
+-->
+# Using Roles via googleVis
+
+Roles add the ability to pass columns for further processing downstream. 
+Role columns must follow column they pertain to. Proper naming
+conventions must be observed. For example, roles fulfilling tooltip
+roles and must be called "foo.blah.tooltip". For more details see the [Google documentation](https://developers.google.com/chart/interactive/docs/roles).
+
+The following examples should help to illustrate the concept. 
+
+```{r setOptions, message=FALSE, echo=FALSE}
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('Roles', 'googleVis')
+```
+The first example uses a data set that has the additional column
+`pop.html.tooltip` with the first 11 letters of the Latin alphabet.
+This column is mapped automatically as a tooltip when the user hovers 
+over the chart point.
+```{r Tooltip, results='asis', tidy=FALSE}
+```
+HTML code can be embedded into the tooltip as well, if the option 
+isHtml is set to true.
+```{r TooltipHTML, results='asis', tidy=FALSE}
+```
+Often it is helpful to highlight certain parts of the data. The Google API
+distinguishes between certainty and emphasis.
+In a similar way to above additional columns with boolean values
+have to be added to the data.
+```{r CertaintyScopeEmphasis, results='asis', tidy=FALSE}
+```
+
+Using roles with column or bar charts has some specifics.
+Instead of 'emphasize' use 'style' to change the colours.
+```{r ColumnChart, results='asis', tidy=FALSE}
+```
+
+
+```{r TwoLines, results='asis', tidy=FALSE}
+```
+
+Setting the annotations style to 'line' allows adding little reference lines
+to the plot.
+```{r VerticalReferenceLine, results='asis', tidy=FALSE}
+```
+
+Intervals help to add error bars, confidence levels, etc.
+Note that the options are set either via `interval` or `intervals`, 
+if set to all intervals. The examples below give an indication of what 
+can be achieved with intervals. 
+For more details visit the Google [documentation](https://google-developers.appspot.com/chart/interactive/docs/gallery/intervals).
+
+```{r Interval, results='asis', tidy=FALSE}
+```
diff --git a/inst/doc/Using_Roles_via_googleVis.html b/inst/doc/Using_Roles_via_googleVis.html
new file mode 100644
index 0000000..7c8ad00
--- /dev/null
+++ b/inst/doc/Using_Roles_via_googleVis.html
@@ -0,0 +1,1746 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title>Using Roles via googleVis</title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
+
+<!-- Styles for R syntax highlighter -->
+<style type="text/css">
+   pre .operator,
+   pre .paren {
+     color: rgb(104, 118, 135)
+   }
+
+   pre .literal {
+     color: #990073
+   }
+
+   pre .number {
+     color: #099;
+   }
+
+   pre .comment {
+     color: #998;
+     font-style: italic
+   }
+
+   pre .keyword {
+     color: #900;
+     font-weight: bold
+   }
+
+   pre .identifier {
+     color: rgb(0, 0, 0);
+   }
+
+   pre .string {
+     color: #d14;
+   }
+</style>
+
+<!-- R syntax highlighter -->
+<script type="text/javascript">
+var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/</gm,"<")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.chi [...]
+hljs.initHighlightingOnLoad();
+</script>
+
+
+
+<style type="text/css">
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+ at media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}
+</style>
+
+
+
+</head>
+
+<body>
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Using Roles and Intervals via googleVis}
+-->
+
+<h1>Using Roles via googleVis</h1>
+
+<p>Roles add the ability to pass columns for further processing downstream. 
+Role columns must follow column they pertain to. Proper naming
+conventions must be observed. For example, roles fulfilling tooltip
+roles and must be called “foo.blah.tooltip”. For more details see the <a href="https://developers.google.com/chart/interactive/docs/roles">Google documentation</a>.</p>
+
+<p>The following examples should help to illustrate the concept. </p>
+
+<p>The first example uses a data set that has the additional column
+<code>pop.html.tooltip</code> with the first 11 letters of the Latin alphabet.
+This column is mapped automatically as a tooltip when the user hovers 
+over the chart point.</p>
+
+<pre><code class="r">df <- data.frame(year=1:11,pop=1:11,
+                 pop.html.tooltip=letters[1:11])
+plot( 
+  gvisScatterChart(df)
+)
+</code></pre>
+
+<!-- ScatterChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataScatterChartID12e0349a2e99b () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+1,
+1,
+"a"
+],
+[
+2,
+2,
+"b"
+],
+[
+3,
+3,
+"c"
+],
+[
+4,
+4,
+"d"
+],
+[
+5,
+5,
+"e"
+],
+[
+6,
+6,
+"f"
+],
+[
+7,
+7,
+"g"
+],
+[
+8,
+8,
+"h"
+],
+[
+9,
+9,
+"i"
+],
+[
+10,
+10,
+"j"
+],
+[
+11,
+11,
+"k"
+] 
+];
+data.addColumn('number','year');
+data.addColumn('number','pop');
+data.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartScatterChartID12e0349a2e99b() {
+var data = gvisDataScatterChartID12e0349a2e99b();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.ScatterChart(
+    document.getElementById('ScatterChartID12e0349a2e99b')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartScatterChartID12e0349a2e99b);
+})();
+function displayChartScatterChartID12e0349a2e99b() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartScatterChartID12e0349a2e99b"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ScatterChartID12e0349a2e99b" 
+  style="width: 500; height: automatic;">
+</div>
+
+<p>HTML code can be embedded into the tooltip as well, if the option 
+isHtml is set to true.</p>
+
+<pre><code class="r">levels(df$pop.html.tooltip)[1] <- 
+  '<a href="http://www.r-project.com"><img src="http://www.r-project.org/Rlogo.jpg" alt="R logo" /></a>'
+plot( 
+  gvisScatterChart(df,
+                   options=list(tooltip="{isHtml:'true'}"))
+)
+</code></pre>
+
+<!-- ScatterChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataScatterChartID12e033c8ca465 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+1,
+1,
+"<a href=\"http://www.r-project.com\"><img src=\"http://www.r-project.org/Rlogo.jpg\" alt=\"R logo\" /></a>"
+],
+[
+2,
+2,
+"b"
+],
+[
+3,
+3,
+"c"
+],
+[
+4,
+4,
+"d"
+],
+[
+5,
+5,
+"e"
+],
+[
+6,
+6,
+"f"
+],
+[
+7,
+7,
+"g"
+],
+[
+8,
+8,
+"h"
+],
+[
+9,
+9,
+"i"
+],
+[
+10,
+10,
+"j"
+],
+[
+11,
+11,
+"k"
+] 
+];
+data.addColumn('number','year');
+data.addColumn('number','pop');
+data.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartScatterChartID12e033c8ca465() {
+var data = gvisDataScatterChartID12e033c8ca465();
+var options = {};
+options["allowHtml"] = true;
+options["tooltip"] = {isHtml:'true'};
+
+    var chart = new google.visualization.ScatterChart(
+    document.getElementById('ScatterChartID12e033c8ca465')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartScatterChartID12e033c8ca465);
+})();
+function displayChartScatterChartID12e033c8ca465() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartScatterChartID12e033c8ca465"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ScatterChartID12e033c8ca465" 
+  style="width: 500; height: automatic;">
+</div>
+
+<p>Often it is helpful to highlight certain parts of the data. The Google API
+distinguishes between certainty and emphasis.
+In a similar way to above additional columns with boolean values
+have to be added to the data.</p>
+
+<pre><code class="r">df <- data.frame(year=1:11, x=1:11,
+                 x.scope=c(rep(TRUE, 8), rep(FALSE, 3)),
+                 y=11:1, y.html.tooltip=LETTERS[11:1],                 
+                 y.certainty=c(rep(TRUE, 5), rep(FALSE, 6)),
+                 y.emphasis=c(rep(FALSE, 4), rep(TRUE, 7)))
+plot(
+  gvisScatterChart(df,options=list(lineWidth=2))
+)
+</code></pre>
+
+<!-- ScatterChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataScatterChartID12e03220a90a6 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+1,
+1,
+true,
+11,
+"K",
+true,
+false
+],
+[
+2,
+2,
+true,
+10,
+"J",
+true,
+false
+],
+[
+3,
+3,
+true,
+9,
+"I",
+true,
+false
+],
+[
+4,
+4,
+true,
+8,
+"H",
+true,
+false
+],
+[
+5,
+5,
+true,
+7,
+"G",
+true,
+true
+],
+[
+6,
+6,
+true,
+6,
+"F",
+false,
+true
+],
+[
+7,
+7,
+true,
+5,
+"E",
+false,
+true
+],
+[
+8,
+8,
+true,
+4,
+"D",
+false,
+true
+],
+[
+9,
+9,
+false,
+3,
+"C",
+false,
+true
+],
+[
+10,
+10,
+false,
+2,
+"B",
+false,
+true
+],
+[
+11,
+11,
+false,
+1,
+"A",
+false,
+true
+] 
+];
+data.addColumn('number','year');
+data.addColumn('number','x');
+data.addColumn({type: 'boolean', role: 'scope'});
+data.addColumn('number','y');
+data.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
+data.addColumn({type: 'boolean', role: 'certainty'});
+data.addColumn({type: 'boolean', role: 'emphasis'});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartScatterChartID12e03220a90a6() {
+var data = gvisDataScatterChartID12e03220a90a6();
+var options = {};
+options["allowHtml"] = true;
+options["lineWidth"] = 2;
+
+    var chart = new google.visualization.ScatterChart(
+    document.getElementById('ScatterChartID12e03220a90a6')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartScatterChartID12e03220a90a6);
+})();
+function displayChartScatterChartID12e03220a90a6() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartScatterChartID12e03220a90a6"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ScatterChartID12e03220a90a6" 
+  style="width: 500; height: automatic;">
+</div>
+
+<p>Using roles with column or bar charts has some specifics.
+Instead of 'emphasize' use 'style' to change the colours.</p>
+
+<pre><code class="r">dat <- data.frame(Year=2010:2013,
+                  Sales=c(600, 1500, 800, 1000),
+                  Sales.html.tooltip=c('$600K in our first year!',
+                                       'Sunspot activity made this our best year ever!',
+                                       '$800K in 2012.',
+                                       '$1M in sales last year.'),
+                  Sales.certainty=c(TRUE, FALSE, TRUE, FALSE))
+plot(
+  gvisColumnChart(dat, xvar='Year', 
+                  yvar=c('Sales', 'Sales.certainty')
+  )
+)
+</code></pre>
+
+<!-- ColumnChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataColumnChartID12e033ff613b1 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"2010",
+600,
+true
+],
+[
+"2011",
+1500,
+false
+],
+[
+"2012",
+800,
+true
+],
+[
+"2013",
+1000,
+false
+] 
+];
+data.addColumn('string','Year');
+data.addColumn('number','Sales');
+data.addColumn({type: 'boolean', role: 'certainty'});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartColumnChartID12e033ff613b1() {
+var data = gvisDataColumnChartID12e033ff613b1();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.ColumnChart(
+    document.getElementById('ColumnChartID12e033ff613b1')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartColumnChartID12e033ff613b1);
+})();
+function displayChartColumnChartID12e033ff613b1() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartColumnChartID12e033ff613b1"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ColumnChartID12e033ff613b1" 
+  style="width: 500; height: automatic;">
+</div>
+
+<pre><code class="r">df <- data.frame(country=c("US", "GB", "BR"), 
+                 val1=c(1,3,4), 
+                 val1.emphasis=c(TRUE, TRUE, FALSE),
+                 val2=c(23,12,32))
+plot(
+  gvisLineChart(df, xvar="country", 
+                yvar=c("val1", "val1.emphasis")
+  )
+)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e0357e72f4 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+1,
+true
+],
+[
+"GB",
+3,
+true
+],
+[
+"BR",
+4,
+false
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn({type: 'boolean', role: 'emphasis'});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e0357e72f4() {
+var data = gvisDataLineChartID12e0357e72f4();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e0357e72f4')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e0357e72f4);
+})();
+function displayChartLineChartID12e0357e72f4() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e0357e72f4"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e0357e72f4" 
+  style="width: 500; height: automatic;">
+</div>
+
+<pre><code class="r">plot(
+  gvisLineChart(df, xvar="country", 
+                yvar=c("val1", "val1.emphasis", "val2")
+  )
+)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e0330acf3fd () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+1,
+true,
+23
+],
+[
+"GB",
+3,
+true,
+12
+],
+[
+"BR",
+4,
+false,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn({type: 'boolean', role: 'emphasis'});
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e0330acf3fd() {
+var data = gvisDataLineChartID12e0330acf3fd();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e0330acf3fd')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e0330acf3fd);
+})();
+function displayChartLineChartID12e0330acf3fd() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e0330acf3fd"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e0330acf3fd" 
+  style="width: 500; height: automatic;">
+</div>
+
+<p>Setting the annotations style to 'line' allows adding little reference lines
+to the plot.</p>
+
+<pre><code class="r">dat <- data.frame(Year=2010:2013, 
+                  Sales=c(600, 1500, 800, 1000),
+                  Sales.annotation=c('First year', NA, NA, 'Last Year'),
+                  Sales.annotationText=c('$600K in our first year!',
+                                       NA,
+                                       NA,
+                                       '$1M in sales last year.'))      
+
+plot(
+  gvisLineChart(dat, xvar='Year', 
+                  yvar=c('Sales',
+                         'Sales.annotation',
+                         'Sales.annotationText'),
+                         options=list(annotations = "{style:'line'}")
+  )
+)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e034dfe193e () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"2010",
+600,
+"First year",
+"$600K in our first year!"
+],
+[
+"2011",
+1500,
+null,
+null
+],
+[
+"2012",
+800,
+null,
+null
+],
+[
+"2013",
+1000,
+"Last Year",
+"$1M in sales last year."
+] 
+];
+data.addColumn('string','Year');
+data.addColumn('number','Sales');
+data.addColumn({type: 'string', role: 'annotation'});
+data.addColumn({type: 'string', role: 'annotationText'});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e034dfe193e() {
+var data = gvisDataLineChartID12e034dfe193e();
+var options = {};
+options["allowHtml"] = true;
+options["annotations"] = {style:'line'};
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e034dfe193e')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e034dfe193e);
+})();
+function displayChartLineChartID12e034dfe193e() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e034dfe193e"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e034dfe193e" 
+  style="width: 500; height: automatic;">
+</div>
+
+<p>Intervals help to add error bars, confidence levels, etc.
+Note that the options are set either via <code>interval</code> or <code>intervals</code>, 
+if set to all intervals. The examples below give an indication of what 
+can be achieved with intervals. 
+For more details visit the Google <a href="https://google-developers.appspot.com/chart/interactive/docs/gallery/intervals">documentation</a>.</p>
+
+<pre><code class="r">df <- data.frame(Year=2013:2014, Sales=c(120, 130), 
+                 Sales.interval.1=c(100,110), 
+                 Sales.interval.2=c(140, 150),
+                 Sales.interval.3=c(90, 100),
+                 Sales.interval.4=c(150, 170),
+                 Sales.style=c('red', 'gold'),
+                 Sales.annotation=c("North", "South"),
+                 check.names=FALSE)
+
+plot(
+  gvisBarChart(df, xvar='Year', 
+               yvar=c('Sales',                       
+                      'Sales.interval.1', 
+                      'Sales.interval.2',
+                      'Sales.style',
+                      'Sales.annotation')
+  )
+)
+</code></pre>
+
+<!-- BarChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataBarChartID12e032041b42 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"2013",
+120,
+100,
+140,
+"red",
+"North"
+],
+[
+"2014",
+130,
+110,
+150,
+"gold",
+"South"
+] 
+];
+data.addColumn('string','Year');
+data.addColumn('number','Sales');
+data.addColumn({id:'i1', type: 'number', role: 'interval'});
+data.addColumn({id:'i2', type: 'number', role: 'interval'});
+data.addColumn({type: 'string', role: 'style'});
+data.addColumn({type: 'string', role: 'annotation'});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartBarChartID12e032041b42() {
+var data = gvisDataBarChartID12e032041b42();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.BarChart(
+    document.getElementById('BarChartID12e032041b42')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartBarChartID12e032041b42);
+})();
+function displayChartBarChartID12e032041b42() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartBarChartID12e032041b42"></script>
+ 
+
+<!-- divChart -->
+
+<div id="BarChartID12e032041b42" 
+  style="width: 500; height: automatic;">
+</div>
+
+<pre><code class="r">plot(
+  gvisLineChart(df, xvar='Year', 
+               yvar=c('Sales', 
+                      'Sales.interval.1', 
+                      'Sales.interval.2'),
+               options=list(series="[{color:'purple'}]")
+  )
+)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e035b998b16 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"2013",
+120,
+100,
+140
+],
+[
+"2014",
+130,
+110,
+150
+] 
+];
+data.addColumn('string','Year');
+data.addColumn('number','Sales');
+data.addColumn({id:'i1', type: 'number', role: 'interval'});
+data.addColumn({id:'i2', type: 'number', role: 'interval'});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e035b998b16() {
+var data = gvisDataLineChartID12e035b998b16();
+var options = {};
+options["allowHtml"] = true;
+options["series"] = [{color:'purple'}];
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e035b998b16')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e035b998b16);
+})();
+function displayChartLineChartID12e035b998b16() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e035b998b16"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e035b998b16" 
+  style="width: 500; height: automatic;">
+</div>
+
+<pre><code class="r">plot(
+  gvisLineChart(df, xvar='Year', 
+                yvar=c('Sales', 
+                       'Sales.interval.1', 
+                       'Sales.interval.2', 
+                       'Sales.interval.3', 
+                       'Sales.interval.4'),
+                options=list(series="[{color:'purple'}]",
+                             lineWidth=4,
+                             interval="{
+            'i1': { 'style':'line', 'color':'#D3362D', 'lineWidth': 0.5 },
+            'i2': { 'style':'line', 'color':'#F1CA3A', 'lineWidth': 1 },
+            'i3': { 'style':'line', 'color':'#5F9654', 'lineWidth': 2 },
+            'i4': { 'style':'line', 'color':'#5F9654', 'lineWidth': 3 }
+        }")
+  )
+)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e033d7a8055 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"2013",
+120,
+100,
+140,
+90,
+150
+],
+[
+"2014",
+130,
+110,
+150,
+100,
+170
+] 
+];
+data.addColumn('string','Year');
+data.addColumn('number','Sales');
+data.addColumn({id:'i1', type: 'number', role: 'interval'});
+data.addColumn({id:'i2', type: 'number', role: 'interval'});
+data.addColumn({id:'i3', type: 'number', role: 'interval'});
+data.addColumn({id:'i4', type: 'number', role: 'interval'});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e033d7a8055() {
+var data = gvisDataLineChartID12e033d7a8055();
+var options = {};
+options["allowHtml"] = true;
+options["series"] = [{color:'purple'}];
+options["lineWidth"] = 4;
+options["interval"] = {
+            'i1': { 'style':'line', 'color':'#D3362D', 'lineWidth': 0.5 },
+            'i2': { 'style':'line', 'color':'#F1CA3A', 'lineWidth': 1 },
+            'i3': { 'style':'line', 'color':'#5F9654', 'lineWidth': 2 },
+            'i4': { 'style':'line', 'color':'#5F9654', 'lineWidth': 3 }
+        };
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e033d7a8055')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e033d7a8055);
+})();
+function displayChartLineChartID12e033d7a8055() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e033d7a8055"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e033d7a8055" 
+  style="width: 500; height: automatic;">
+</div>
+
+<pre><code class="r">plot(
+  gvisLineChart(df, xvar='Year', 
+                yvar=c('Sales', 
+                       'Sales.interval.1', 
+                       'Sales.interval.2', 
+                       'Sales.interval.3', 
+                       'Sales.interval.4'),
+                options=list(series="[{color:'purple'}]",
+                             lineWidth=4,
+                             intervals="{ 'style':'area' }",
+                             interval="{
+                               'i1': { 'color': '#4374E0', 'style':'bars', 'barWidth':0, 'lineWidth':4, 'pointSize':10, 'fillOpacity':1 },
+                               'i2': { 'color': '#E49307', 'style':'bars', 'barWidth':0, 'lineWidth':4, 'pointSize':10, 'fillOpacity':1 }}"                                                          
+                             )
+  )
+)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:34 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e03357f6bfb () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"2013",
+120,
+100,
+140,
+90,
+150
+],
+[
+"2014",
+130,
+110,
+150,
+100,
+170
+] 
+];
+data.addColumn('string','Year');
+data.addColumn('number','Sales');
+data.addColumn({id:'i1', type: 'number', role: 'interval'});
+data.addColumn({id:'i2', type: 'number', role: 'interval'});
+data.addColumn({id:'i3', type: 'number', role: 'interval'});
+data.addColumn({id:'i4', type: 'number', role: 'interval'});
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e03357f6bfb() {
+var data = gvisDataLineChartID12e03357f6bfb();
+var options = {};
+options["allowHtml"] = true;
+options["series"] = [{color:'purple'}];
+options["lineWidth"] = 4;
+options["intervals"] = { 'style':'area' };
+options["interval"] = {
+                               'i1': { 'color': '#4374E0', 'style':'bars', 'barWidth':0, 'lineWidth':4, 'pointSize':10, 'fillOpacity':1 },
+                               'i2': { 'color': '#E49307', 'style':'bars', 'barWidth':0, 'lineWidth':4, 'pointSize':10, 'fillOpacity':1 }};
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e03357f6bfb')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e03357f6bfb);
+})();
+function displayChartLineChartID12e03357f6bfb() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e03357f6bfb"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e03357f6bfb" 
+  style="width: 500; height: automatic;">
+</div>
+
+</body>
+
+</html>
diff --git a/inst/doc/Using_Trendlines_with_googleVis.R b/inst/doc/Using_Trendlines_with_googleVis.R
new file mode 100644
index 0000000..dc951e0
--- /dev/null
+++ b/inst/doc/Using_Trendlines_with_googleVis.R
@@ -0,0 +1,47 @@
+## ----setOptions, message=FALSE, echo=FALSE-------------------------------
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('Trendlines', 'googleVis')
+
+## ----LinearTrend, results='asis', tidy=FALSE-----------------------------
+plot(
+  gvisScatterChart(women, options=list(trendlines="0"))
+)
+
+## ----ExponentialTrend, results='asis', tidy=FALSE------------------------
+plot(
+  gvisScatterChart(women, options=list(
+    trendlines="{0: { type: 'exponential',  
+                     visibleInLegend: 'true', 
+                     color: 'green',
+                     lineWidth: 10,
+                     opacity: 0.5}}",
+    chartArea="{left:50,top:20,width:'50%',height:'75%'}"))
+)
+
+## ----ColumnChartWithTrendline, results='asis', tidy=FALSE----------------
+dat <- data.frame(val1=c(1,3,4,5,6,8), 
+                  val2=c(12,23,32,40,50,55))
+plot(
+  gvisColumnChart(dat,
+                  options=list(trendlines="{0: {}}"))
+)
+
+## ----DifferentLabels, results='asis', tidy=FALSE-------------------------
+dat$val3 <- c(5,6,10,12,15,20)
+plot(
+  gvisColumnChart(dat,
+                  options=list(trendlines="{
+                          0: {
+                            labelInLegend: 'Trendline 1',
+                            visibleInLegend: true,}, 
+                          1:{
+                            labelInLegend: 'Trendline 2',
+                            visibleInLegend: true}
+                          }",
+                          chartArea="{left:50,top:20,
+                                      width:'50%',height:'75%'}"
+                  ))
+)
+
diff --git a/inst/doc/Using_Trendlines_with_googleVis.Rmd b/inst/doc/Using_Trendlines_with_googleVis.Rmd
new file mode 100644
index 0000000..7c109a3
--- /dev/null
+++ b/inst/doc/Using_Trendlines_with_googleVis.Rmd
@@ -0,0 +1,35 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Using Trendlines with googleVis}
+-->
+# Using Trendlines with googleVis
+
+A trendline is a line superimposed on a chart revealing the overall 
+direction of the data. Google Charts can automatically generate 
+trendlines for Scatter Charts, Bar Charts, Column Charts and Line Charts.
+
+For more details visit: 
+https://developers.google.com/chart/interactive/docs/gallery/trendlines
+
+```{r setOptions, message=FALSE, echo=FALSE}
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('Trendlines', 'googleVis')
+```
+
+## Linear trend line
+```{r LinearTrend, results='asis', tidy=FALSE}
+```
+
+## Exponential trend line with equation shown in legend
+```{r ExponentialTrend, results='asis', tidy=FALSE}
+```
+
+## Add trend line to column chart
+```{r ColumnChartWithTrendline, results='asis', tidy=FALSE}
+```
+
+## Changing labels in legend
+```{r DifferentLabels, results='asis', tidy=FALSE}
+```
diff --git a/inst/doc/Using_Trendlines_with_googleVis.html b/inst/doc/Using_Trendlines_with_googleVis.html
new file mode 100644
index 0000000..5202990
--- /dev/null
+++ b/inst/doc/Using_Trendlines_with_googleVis.html
@@ -0,0 +1,814 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title>Using Trendlines with googleVis</title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
+
+<!-- Styles for R syntax highlighter -->
+<style type="text/css">
+   pre .operator,
+   pre .paren {
+     color: rgb(104, 118, 135)
+   }
+
+   pre .literal {
+     color: #990073
+   }
+
+   pre .number {
+     color: #099;
+   }
+
+   pre .comment {
+     color: #998;
+     font-style: italic
+   }
+
+   pre .keyword {
+     color: #900;
+     font-weight: bold
+   }
+
+   pre .identifier {
+     color: rgb(0, 0, 0);
+   }
+
+   pre .string {
+     color: #d14;
+   }
+</style>
+
+<!-- R syntax highlighter -->
+<script type="text/javascript">
+var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/</gm,"<")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.chi [...]
+hljs.initHighlightingOnLoad();
+</script>
+
+
+
+<style type="text/css">
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+ at media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}
+</style>
+
+
+
+</head>
+
+<body>
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Using Trendlines with googleVis}
+-->
+
+<h1>Using Trendlines with googleVis</h1>
+
+<p>A trendline is a line superimposed on a chart revealing the overall 
+direction of the data. Google Charts can automatically generate 
+trendlines for Scatter Charts, Bar Charts, Column Charts and Line Charts.</p>
+
+<p>For more details visit: 
+<a href="https://developers.google.com/chart/interactive/docs/gallery/trendlines">https://developers.google.com/chart/interactive/docs/gallery/trendlines</a></p>
+
+<h2>Linear trend line</h2>
+
+<pre><code class="r">plot(
+  gvisScatterChart(women, options=list(trendlines="0"))
+)
+</code></pre>
+
+<!-- ScatterChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataScatterChartID12e03ef7e360 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+58,
+115
+],
+[
+59,
+117
+],
+[
+60,
+120
+],
+[
+61,
+123
+],
+[
+62,
+126
+],
+[
+63,
+129
+],
+[
+64,
+132
+],
+[
+65,
+135
+],
+[
+66,
+139
+],
+[
+67,
+142
+],
+[
+68,
+146
+],
+[
+69,
+150
+],
+[
+70,
+154
+],
+[
+71,
+159
+],
+[
+72,
+164
+] 
+];
+data.addColumn('number','height');
+data.addColumn('number','weight');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartScatterChartID12e03ef7e360() {
+var data = gvisDataScatterChartID12e03ef7e360();
+var options = {};
+options["allowHtml"] = true;
+options["trendlines"] = "0";
+
+    var chart = new google.visualization.ScatterChart(
+    document.getElementById('ScatterChartID12e03ef7e360')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartScatterChartID12e03ef7e360);
+})();
+function displayChartScatterChartID12e03ef7e360() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartScatterChartID12e03ef7e360"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ScatterChartID12e03ef7e360" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Exponential trend line with equation shown in legend</h2>
+
+<pre><code class="r">plot(
+  gvisScatterChart(women, options=list(
+    trendlines="{0: { type: 'exponential',  
+                     visibleInLegend: 'true', 
+                     color: 'green',
+                     lineWidth: 10,
+                     opacity: 0.5}}",
+    chartArea="{left:50,top:20,width:'50%',height:'75%'}"))
+)
+</code></pre>
+
+<!-- ScatterChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataScatterChartID12e035518d720 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+58,
+115
+],
+[
+59,
+117
+],
+[
+60,
+120
+],
+[
+61,
+123
+],
+[
+62,
+126
+],
+[
+63,
+129
+],
+[
+64,
+132
+],
+[
+65,
+135
+],
+[
+66,
+139
+],
+[
+67,
+142
+],
+[
+68,
+146
+],
+[
+69,
+150
+],
+[
+70,
+154
+],
+[
+71,
+159
+],
+[
+72,
+164
+] 
+];
+data.addColumn('number','height');
+data.addColumn('number','weight');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartScatterChartID12e035518d720() {
+var data = gvisDataScatterChartID12e035518d720();
+var options = {};
+options["allowHtml"] = true;
+options["trendlines"] = {0: { type: 'exponential',  
+                     visibleInLegend: 'true', 
+                     color: 'green',
+                     lineWidth: 10,
+                     opacity: 0.5}};
+options["chartArea"] = {left:50,top:20,width:'50%',height:'75%'};
+
+    var chart = new google.visualization.ScatterChart(
+    document.getElementById('ScatterChartID12e035518d720')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartScatterChartID12e035518d720);
+})();
+function displayChartScatterChartID12e035518d720() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartScatterChartID12e035518d720"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ScatterChartID12e035518d720" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Add trend line to column chart</h2>
+
+<pre><code class="r">dat <- data.frame(val1=c(1,3,4,5,6,8), 
+                  val2=c(12,23,32,40,50,55))
+plot(
+  gvisColumnChart(dat,
+                  options=list(trendlines="{0: {}}"))
+)
+</code></pre>
+
+<!-- ColumnChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataColumnChartID12e031d114cbb () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+1,
+12
+],
+[
+3,
+23
+],
+[
+4,
+32
+],
+[
+5,
+40
+],
+[
+6,
+50
+],
+[
+8,
+55
+] 
+];
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartColumnChartID12e031d114cbb() {
+var data = gvisDataColumnChartID12e031d114cbb();
+var options = {};
+options["allowHtml"] = true;
+options["trendlines"] = {0: {}};
+
+    var chart = new google.visualization.ColumnChart(
+    document.getElementById('ColumnChartID12e031d114cbb')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartColumnChartID12e031d114cbb);
+})();
+function displayChartColumnChartID12e031d114cbb() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartColumnChartID12e031d114cbb"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ColumnChartID12e031d114cbb" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Changing labels in legend</h2>
+
+<pre><code class="r">dat$val3 <- c(5,6,10,12,15,20)
+plot(
+  gvisColumnChart(dat,
+                  options=list(trendlines="{
+                          0: {
+                            labelInLegend: 'Trendline 1',
+                            visibleInLegend: true,}, 
+                          1:{
+                            labelInLegend: 'Trendline 2',
+                            visibleInLegend: true}
+                          }",
+                          chartArea="{left:50,top:20,
+                                      width:'50%',height:'75%'}"
+                  ))
+)
+</code></pre>
+
+<!-- ColumnChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataColumnChartID12e0320d069f1 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+1,
+12,
+5
+],
+[
+3,
+23,
+6
+],
+[
+4,
+32,
+10
+],
+[
+5,
+40,
+12
+],
+[
+6,
+50,
+15
+],
+[
+8,
+55,
+20
+] 
+];
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addColumn('number','val3');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartColumnChartID12e0320d069f1() {
+var data = gvisDataColumnChartID12e0320d069f1();
+var options = {};
+options["allowHtml"] = true;
+options["trendlines"] = {
+                          0: {
+                            labelInLegend: 'Trendline 1',
+                            visibleInLegend: true,}, 
+                          1:{
+                            labelInLegend: 'Trendline 2',
+                            visibleInLegend: true}
+                          };
+options["chartArea"] = {left:50,top:20,
+                                      width:'50%',height:'75%'};
+
+    var chart = new google.visualization.ColumnChart(
+    document.getElementById('ColumnChartID12e0320d069f1')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartColumnChartID12e0320d069f1);
+})();
+function displayChartColumnChartID12e0320d069f1() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartColumnChartID12e0320d069f1"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ColumnChartID12e0320d069f1" 
+  style="width: 500; height: automatic;">
+</div>
+
+</body>
+
+</html>
diff --git a/inst/doc/Using_googleVis_with_knitr.R b/inst/doc/Using_googleVis_with_knitr.R
new file mode 100644
index 0000000..9a7daff
--- /dev/null
+++ b/inst/doc/Using_googleVis_with_knitr.R
@@ -0,0 +1,30 @@
+## ----setOptions, message=FALSE-------------------------------------------
+library(googleVis)
+op <- options(gvis.plot.tag='chart')
+
+## ----ComboExample, results='asis', tidy=FALSE----------------------------
+## Add the mean
+CityPopularity$Mean=mean(CityPopularity$Popularity)
+CC <- gvisComboChart(CityPopularity, xvar='City',
+          yvar=c('Mean', 'Popularity'),
+          options=list(seriesType='bars',
+                       width=450, height=300,
+                       title='City Popularity',
+                       series='{0: {type:\"line\"}}'))
+plot(CC)
+
+## ----gvisMergeExample, results='asis', echo=FALSE------------------------
+Geo <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit', 
+                    options=list(height=300, width=350)) 
+Tbl <- gvisTable(Exports, options=list(height=300, width=200))
+plot(gvisMerge(Geo, Tbl, horizontal=TRUE))
+
+## ----MotionChartExample, results='asis', tidy=FALSE----------------------
+M <- gvisMotionChart(Fruits, 'Fruit', 'Year',
+         options=list(width=400, height=350))
+plot(M)
+
+## ----resetOptions--------------------------------------------------------
+## Set options back to original options
+options(op)
+
diff --git a/inst/doc/Using_googleVis_with_knitr.Rmd b/inst/doc/Using_googleVis_with_knitr.Rmd
new file mode 100644
index 0000000..4808462
--- /dev/null
+++ b/inst/doc/Using_googleVis_with_knitr.Rmd
@@ -0,0 +1,56 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Markdown example with knitr and googleVis}
+-->
+# Markdown example with knitr and googleVis
+===========================================
+This is a little Markdown example output. The Markdown source file is hosted on [GitHub](https://github.com/mages/googleVis/blob/master/vignettes/Using_googleVis_with_knitr.Rmd).
+
+Set the googleVis options first to change the behaviour of plot.gvis, so that only the chart component of the HTML file is written into the output file.
+
+```{r setOptions, message=FALSE}
+library(googleVis)
+op <- options(gvis.plot.tag='chart')
+```
+The following plot statements will automatically return  the HTML
+required for the 'knitted' output. 
+
+## Combo chart
+```{r ComboExample, results='asis', tidy=FALSE}
+## Add the mean
+CityPopularity$Mean=mean(CityPopularity$Popularity)
+CC <- gvisComboChart(CityPopularity, xvar='City',
+          yvar=c('Mean', 'Popularity'),
+          options=list(seriesType='bars',
+                       width=450, height=300,
+                       title='City Popularity',
+                       series='{0: {type:\"line\"}}'))
+plot(CC)
+```
+Example of gvisComboChart with R code shown above.
+
+## Place two charts next to each other
+```{r gvisMergeExample, results='asis', echo=FALSE}
+Geo <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit', 
+                    options=list(height=300, width=350)) 
+Tbl <- gvisTable(Exports, options=list(height=300, width=200))
+plot(gvisMerge(Geo, Tbl, horizontal=TRUE))
+``````
+Example of a gvisGeoChart with gvisTable and R code hidden.
+
+## Motion Chart
+```{r MotionChartExample, results='asis', tidy=FALSE}
+M <- gvisMotionChart(Fruits, 'Fruit', 'Year',
+         options=list(width=400, height=350))
+plot(M)
+```
+Please note that the Motion Chart is only displayed when hosted on a
+web server, or if placed in a directory which has been added to the 
+trusted sources in the [security settings of Macromedia]
+(http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html). 
+See the googleVis package vignette for more details. 
+
+```{r resetOptions}
+## Set options back to original options
+options(op)
+```
diff --git a/inst/doc/Using_googleVis_with_knitr.html b/inst/doc/Using_googleVis_with_knitr.html
new file mode 100644
index 0000000..2d953d8
--- /dev/null
+++ b/inst/doc/Using_googleVis_with_knitr.html
@@ -0,0 +1,832 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title>Markdown example with knitr and googleVis</title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
+
+<!-- Styles for R syntax highlighter -->
+<style type="text/css">
+   pre .operator,
+   pre .paren {
+     color: rgb(104, 118, 135)
+   }
+
+   pre .literal {
+     color: #990073
+   }
+
+   pre .number {
+     color: #099;
+   }
+
+   pre .comment {
+     color: #998;
+     font-style: italic
+   }
+
+   pre .keyword {
+     color: #900;
+     font-weight: bold
+   }
+
+   pre .identifier {
+     color: rgb(0, 0, 0);
+   }
+
+   pre .string {
+     color: #d14;
+   }
+</style>
+
+<!-- R syntax highlighter -->
+<script type="text/javascript">
+var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/</gm,"<")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.chi [...]
+hljs.initHighlightingOnLoad();
+</script>
+
+
+
+<style type="text/css">
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+ at media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}
+</style>
+
+
+
+</head>
+
+<body>
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Markdown example with knitr and googleVis}
+-->
+
+<h1>Markdown example with knitr and googleVis</h1>
+
+<h1></h1>
+
+<p>This is a little Markdown example output. The Markdown source file is hosted on <a href="https://github.com/mages/googleVis/blob/master/vignettes/Using_googleVis_with_knitr.Rmd">GitHub</a>.</p>
+
+<p>Set the googleVis options first to change the behaviour of plot.gvis, so that only the chart component of the HTML file is written into the output file.</p>
+
+<pre><code class="r">library(googleVis)
+op <- options(gvis.plot.tag='chart')
+</code></pre>
+
+<p>The following plot statements will automatically return  the HTML
+required for the 'knitted' output. </p>
+
+<h2>Combo chart</h2>
+
+<pre><code class="r">## Add the mean
+CityPopularity$Mean=mean(CityPopularity$Popularity)
+CC <- gvisComboChart(CityPopularity, xvar='City',
+          yvar=c('Mean', 'Popularity'),
+          options=list(seriesType='bars',
+                       width=450, height=300,
+                       title='City Popularity',
+                       series='{0: {type:\"line\"}}'))
+plot(CC)
+</code></pre>
+
+<!-- ComboChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataComboChartID12e03379a875f () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"New York",
+450,
+200
+],
+[
+"Boston",
+450,
+300
+],
+[
+"Miami",
+450,
+400
+],
+[
+"Chicago",
+450,
+500
+],
+[
+"Los Angeles",
+450,
+600
+],
+[
+"Houston",
+450,
+700
+] 
+];
+data.addColumn('string','City');
+data.addColumn('number','Mean');
+data.addColumn('number','Popularity');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartComboChartID12e03379a875f() {
+var data = gvisDataComboChartID12e03379a875f();
+var options = {};
+options["allowHtml"] = true;
+options["seriesType"] = "bars";
+options["width"] = 450;
+options["height"] = 300;
+options["title"] = "City Popularity";
+options["series"] = {0: {type:"line"}};
+
+    var chart = new google.visualization.ComboChart(
+    document.getElementById('ComboChartID12e03379a875f')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartComboChartID12e03379a875f);
+})();
+function displayChartComboChartID12e03379a875f() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartComboChartID12e03379a875f"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ComboChartID12e03379a875f" 
+  style="width: 450; height: 300;">
+</div>
+
+<p>Example of gvisComboChart with R code shown above.</p>
+
+<h2>Place two charts next to each other</h2>
+
+<!-- GeoChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataGeoChartID12e037bdf574f () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Germany",
+3
+],
+[
+"Brazil",
+4
+],
+[
+"United States",
+5
+],
+[
+"France",
+4
+],
+[
+"Hungary",
+3
+],
+[
+"India",
+2
+],
+[
+"Iceland",
+1
+],
+[
+"Norway",
+4
+],
+[
+"Spain",
+5
+],
+[
+"Turkey",
+1
+] 
+];
+data.addColumn('string','Country');
+data.addColumn('number','Profit');
+data.addRows(datajson);
+return(data);
+}
+
+
+// jsData 
+function gvisDataTableID12e033dd4312 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Germany",
+3,
+true
+],
+[
+"Brazil",
+4,
+false
+],
+[
+"United States",
+5,
+true
+],
+[
+"France",
+4,
+true
+],
+[
+"Hungary",
+3,
+false
+],
+[
+"India",
+2,
+true
+],
+[
+"Iceland",
+1,
+false
+],
+[
+"Norway",
+4,
+true
+],
+[
+"Spain",
+5,
+true
+],
+[
+"Turkey",
+1,
+false
+] 
+];
+data.addColumn('string','Country');
+data.addColumn('number','Profit');
+data.addColumn('boolean','Online');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartGeoChartID12e037bdf574f() {
+var data = gvisDataGeoChartID12e037bdf574f();
+var options = {};
+options["width"] = 350;
+options["height"] = 300;
+
+    var chart = new google.visualization.GeoChart(
+    document.getElementById('GeoChartID12e037bdf574f')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+
+
+// jsDrawChart
+function drawChartTableID12e033dd4312() {
+var data = gvisDataTableID12e033dd4312();
+var options = {};
+options["allowHtml"] = true;
+options["height"] = 300;
+options["width"] = 200;
+
+    var chart = new google.visualization.Table(
+    document.getElementById('TableID12e033dd4312')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "geochart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartGeoChartID12e037bdf574f);
+})();
+function displayChartGeoChartID12e037bdf574f() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+
+
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "table";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartTableID12e033dd4312);
+})();
+function displayChartTableID12e033dd4312() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartGeoChartID12e037bdf574f"></script>
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartTableID12e033dd4312"></script>
+ 
+
+<table border="0">
+<tr>
+<td>
+
+<!-- divChart -->
+  
+<div id="GeoChartID12e037bdf574f" 
+  style="width: 350; height: 300;">
+</div>
+
+</td>
+<td>
+
+<!-- divChart -->
+  
+<div id="TableID12e033dd4312" 
+  style="width: 200; height: 300;">
+</div>
+
+</td>
+</tr>
+</table>
+
+<p>Example of a gvisGeoChart with gvisTable and R code hidden.</p>
+
+<h2>Motion Chart</h2>
+
+<pre><code class="r">M <- gvisMotionChart(Fruits, 'Fruit', 'Year',
+         options=list(width=400, height=350))
+plot(M)
+</code></pre>
+
+<!-- MotionChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataMotionChartID12e032467701d () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Apples",
+2008,
+"West",
+98,
+78,
+20,
+"2008-12-31"
+],
+[
+"Apples",
+2009,
+"West",
+111,
+79,
+32,
+"2009-12-31"
+],
+[
+"Apples",
+2010,
+"West",
+89,
+76,
+13,
+"2010-12-31"
+],
+[
+"Oranges",
+2008,
+"East",
+96,
+81,
+15,
+"2008-12-31"
+],
+[
+"Bananas",
+2008,
+"East",
+85,
+76,
+9,
+"2008-12-31"
+],
+[
+"Oranges",
+2009,
+"East",
+93,
+80,
+13,
+"2009-12-31"
+],
+[
+"Bananas",
+2009,
+"East",
+94,
+78,
+16,
+"2009-12-31"
+],
+[
+"Oranges",
+2010,
+"East",
+98,
+91,
+7,
+"2010-12-31"
+],
+[
+"Bananas",
+2010,
+"East",
+81,
+71,
+10,
+"2010-12-31"
+] 
+];
+data.addColumn('string','Fruit');
+data.addColumn('number','Year');
+data.addColumn('string','Location');
+data.addColumn('number','Sales');
+data.addColumn('number','Expenses');
+data.addColumn('number','Profit');
+data.addColumn('string','Date');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartMotionChartID12e032467701d() {
+var data = gvisDataMotionChartID12e032467701d();
+var options = {};
+options["width"] = 400;
+options["height"] = 350;
+options["state"] = "";
+
+    var chart = new google.visualization.MotionChart(
+    document.getElementById('MotionChartID12e032467701d')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "motionchart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartMotionChartID12e032467701d);
+})();
+function displayChartMotionChartID12e032467701d() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartMotionChartID12e032467701d"></script>
+ 
+
+<!-- divChart -->
+
+<div id="MotionChartID12e032467701d" 
+  style="width: 400; height: 350;">
+</div>
+
+<p>Please note that the Motion Chart is only displayed when hosted on a
+web server, or if placed in a directory which has been added to the 
+trusted sources in the <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html">security settings of Macromedia</a>. 
+See the googleVis package vignette for more details. </p>
+
+<pre><code class="r">## Set options back to original options
+options(op)
+</code></pre>
+
+</body>
+
+</html>
diff --git a/inst/doc/googleVis.R b/inst/doc/googleVis.R
new file mode 100644
index 0000000..9b07197
--- /dev/null
+++ b/inst/doc/googleVis.R
@@ -0,0 +1,459 @@
+### R code from vignette source 'googleVis.Rnw'
+
+###################################################
+### code chunk number 1: options
+###################################################
+options(prompt = "R> ", digits = 4, show.signif.stars = FALSE)
+
+
+###################################################
+### code chunk number 2: googleVis.Rnw:233-268 (eval = FALSE)
+###################################################
+## ## Code for screen shot
+## MC <- gvisMotionChart(Fruits, "Fruit", "Year", options=list(width=500, height=300))
+## ATL <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+##                            numvar="Value", idvar="Device",
+##                            titlevar="Title", annotationvar="Annotation",
+##                            options=list(
+##                              width=300, height=300,
+##                              fill=10, displayExactValues=TRUE,
+##                              colors="['#0000ff','#00ff00']")
+##                            )
+##                           
+## Map <- gvisMap(Andrew, "LatLong" , "Tip",
+##               options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE,
+##                            mapType='terrain', useMapTypeControl=TRUE,
+##                            width=400, height=200))
+## Geo <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+##                  options=list(dataMode="regions", width=400,height=200)) 
+## 
+## ## Table with enabled paging
+## Table <- gvisTable(Population, options=list(page='enable', height=200, width=500))
+## 
+## Tree <- gvisTreeMap(Regions,  "Region", "Parent", "Val", "Fac",
+##                     options=list(width=300, height=200,
+##                                  fontSize=16,
+##                                  minColor='#EDF8FB',
+##                                  midColor='#66C2A4',
+##                                  maxColor='#006D2C',
+##                                  headerHeight=20,
+##                                  fontColor='black',
+##                                  showScale=TRUE))
+## 
+## M <- gvisMerge(gvisMerge(gvisMerge(MC, ATL, TRUE, tableOptions="cellspacing=10"), 
+##                          gvisMerge(Map, Geo, TRUE, tableOptions="cellspacing=10")), 
+##                          gvisMerge(Table, Tree, TRUE, tableOptions="cellspacing=10"))
+## plot(M)
+
+
+###################################################
+### code chunk number 3: googleVis.Rnw:284-285 (eval = FALSE)
+###################################################
+## install.packages('googleVis') 
+
+
+###################################################
+### code chunk number 4: googleVis.Rnw:289-290
+###################################################
+library(googleVis)
+
+
+###################################################
+### code chunk number 5: googleVis.Rnw:292-293 (eval = FALSE)
+###################################################
+## library(googleVis)
+
+
+###################################################
+### code chunk number 6: googleVis.Rnw:295-296
+###################################################
+cat(googleVis:::gvisWelcomeMessage())
+
+
+###################################################
+### code chunk number 7: googleVis.Rnw:325-326 (eval = FALSE)
+###################################################
+## help('gvisMotionChart')
+
+
+###################################################
+### code chunk number 8: googleVis.Rnw:371-373
+###################################################
+data(Fruits)
+Fruits
+
+
+###################################################
+### code chunk number 9: googleVis.Rnw:380-381
+###################################################
+ M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
+
+
+###################################################
+### code chunk number 10: googleVis.Rnw:385-386 (eval = FALSE)
+###################################################
+##  str(M)
+
+
+###################################################
+### code chunk number 11: googleVis.Rnw:388-390
+###################################################
+## This statement avoids truncation
+cat(paste(substring( capture.output( str(M) ) , 0, 66), sep="\n", collapse="\n"))
+
+
+###################################################
+### code chunk number 12: googleVis.Rnw:395-397
+###################################################
+M$type
+M$chartid
+
+
+###################################################
+### code chunk number 13: googleVis.Rnw:404-405
+###################################################
+print(M, tag='header')
+
+
+###################################################
+### code chunk number 14: googleVis.Rnw:420-421
+###################################################
+names(M$html$chart)
+
+
+###################################################
+### code chunk number 15: googleVis.Rnw:424-425
+###################################################
+print(M, tag='chart')  ## or cat(M$html$chart)
+
+
+###################################################
+### code chunk number 16: googleVis.Rnw:428-429 (eval = FALSE)
+###################################################
+## cat(M$html$chart['jsChart']) # or print(M, 'jsChart')
+
+
+###################################################
+### code chunk number 17: googleVis.Rnw:431-432
+###################################################
+cat(paste(substring( capture.output( cat(M$html$chart['jsChart']) ) , 0, 66), sep="\n", collapse="\n"))
+
+
+###################################################
+### code chunk number 18: googleVis.Rnw:437-438 (eval = FALSE)
+###################################################
+## print(M, tag='caption')
+
+
+###################################################
+### code chunk number 19: googleVis.Rnw:440-441
+###################################################
+cat(paste(substring( capture.output( cat(M$html$caption) ) , 0, 66), sep="\n", collapse="\n"))
+
+
+###################################################
+### code chunk number 20: googleVis.Rnw:444-445 (eval = FALSE)
+###################################################
+## print(M, tag='footer')
+
+
+###################################################
+### code chunk number 21: googleVis.Rnw:447-448
+###################################################
+cat(paste(substring( capture.output( cat(M$html$footer) ) , 0, 66), sep="\n", collapse="\n"))
+
+
+###################################################
+### code chunk number 22: googleVis.Rnw:455-456 (eval = FALSE)
+###################################################
+## plot(M)  # returns invisibly the file name
+
+
+###################################################
+### code chunk number 23: googleVis.Rnw:471-472 (eval = FALSE)
+###################################################
+## print(M, file="myGoogleVisChart.html")
+
+
+###################################################
+### code chunk number 24: googleVis.Rnw:501-502 (eval = FALSE)
+###################################################
+## plot.gvis("/Users/JoeBloggs/myGoogleVisChart.html")
+
+
+###################################################
+### code chunk number 25: googleVis.Rnw:558-567
+###################################################
+G <- gvisGeoChart(Exports, "Country", "Profit", 
+                  options=list(width=200, height=100))
+T <- gvisTable(Exports, 
+                  options=list(width=200, height=270))
+M <- gvisMotionChart(Fruits, "Fruit", "Year",
+                     options=list(width=400, height=370))
+GT <- gvisMerge(G,T, horizontal=FALSE) 
+GTM <- gvisMerge(GT, M, horizontal=TRUE, 
+                 tableOptions="bgcolor=\"#CCCCCC\" cellspacing=10")
+
+
+###################################################
+### code chunk number 26: googleVis.Rnw:569-570 (eval = FALSE)
+###################################################
+## plot(GTM)
+
+
+###################################################
+### code chunk number 27: googleVis.Rnw:590-611 (eval = FALSE)
+###################################################
+## df <- data.frame(country=c("US", "GB", "BR"), 
+##                         val1=c(1,3,4), val2=c(23,12,32))
+## 
+## Line <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+##                         options=list(
+##                           title="Hello World",
+##                           titleTextStyle="{color:'red', 
+##                                            fontName:'Courier', 
+##                                            fontSize:16}",                         
+##                           backgroundColor="#D3D3D3",                          
+##                           vAxis="{gridlines:{color:'red', count:3}}",
+##                           hAxis="{title:'Country', titleTextStyle:{color:'blue'}}",
+## 		          series="[{color:'green', targetAxisIndex: 0},	
+##                                    {color: 'orange',targetAxisIndex:1}]",
+##                           vAxes="[{title:'val1'}, {title:'val2'}]",
+##                           legend="bottom",
+##                           curveType="function",
+##                           width=500,
+##                           height=300                         
+##                           ))
+## plot(Line)
+
+
+###################################################
+### code chunk number 28: googleVis.Rnw:659-667 (eval = FALSE)
+###################################################
+## Geo <- gvisGeoChart(CityPopularity, locationvar='City', 
+##                     colorvar='Popularity',
+##                      options=list(region='US', height=350, 
+##                       displayMode='markers',
+##             	      colorAxis="{values:[200,400,600,800],
+##                        colors:[\'red', \'pink\', \'orange',\'green']}")
+##                       ) 
+## plot(Geo)
+
+
+###################################################
+### code chunk number 29: googleVis.Rnw:685-687 (eval = FALSE)
+###################################################
+## Editor <- gvisLineChart(df, options=list(gvis.editor='Edit me!'))
+## plot(Editor)
+
+
+###################################################
+### code chunk number 30: googleVis.Rnw:709-716
+###################################################
+df <- data.frame("Year"=c(2009,2010), "Lloyd\\'s"=c(86.1, 93.3), 
+                 "Munich Re\\'s R/I"=c(95.3, 100.5),
+                 check.names=FALSE) 
+df
+CR <- gvisColumnChart(df, options=list(vAxis='{baseline:0}', 
+                            title="Combined Ratio %",
+                            legend="{position:'bottom'}"))
+
+
+###################################################
+### code chunk number 31: googleVis.Rnw:718-719 (eval = FALSE)
+###################################################
+## plot(CR)
+
+
+###################################################
+### code chunk number 32: googleVis.Rnw:737-738 (eval = FALSE)
+###################################################
+## print(M, 'chart')  ## or cat(M$html$chart) 
+
+
+###################################################
+### code chunk number 33: googleVis.Rnw:741-742 (eval = FALSE)
+###################################################
+## print(M, 'chart', file='myfilename')
+
+
+###################################################
+### code chunk number 34: googleVis.Rnw:763-765 (eval = FALSE)
+###################################################
+## M <- gvisMotionChart(Fruits, "Fruit", "Year",
+## 		     options=list(width=400, height=370))
+
+
+###################################################
+### code chunk number 35: googleVis.Rnw:768-769 (eval = FALSE)
+###################################################
+## print(M, 'chart')
+
+
+###################################################
+### code chunk number 36: googleVis.Rnw:806-808
+###################################################
+M <- gvisMotionChart(Fruits, "Fruit", "Year")
+G <- createGoogleGadget(M)
+
+
+###################################################
+### code chunk number 37: googleVis.Rnw:810-811 (eval = FALSE)
+###################################################
+## cat(G, file="myGadget.xml")
+
+
+###################################################
+### code chunk number 38: googleVis.Rnw:943-944 (eval = FALSE)
+###################################################
+## install.packages('brew')
+
+
+###################################################
+### code chunk number 39: googleVis.Rnw:978-979 (eval = FALSE)
+###################################################
+## system.file("brew", package = "googleVis")
+
+
+###################################################
+### code chunk number 40: googleVis.Rnw:1003-1043 (eval = FALSE)
+###################################################
+## require(Rook)
+## require(googleVis)
+## s <- Rhttpd$new()
+## s$start(listen='127.0.0.1')
+## 
+## my.app <- function(env){
+##  ## Start with a table and allow the user to upload a CSV-file
+##   req <- Request$new(env)
+##   res <- Response$new()
+## 
+##   ## Provide some data to start with
+##   ## Exports is a sample data set of googleVis
+##   data <- Exports[,1:2] 
+##   ## Add functionality to upload CSV-file
+##   if (!is.null(req$POST())) {
+##     ## Read data from uploaded CSV-file
+##    data <- req$POST()[["data"]]
+##    data <- read.csv(data$tempfile)
+##   }
+##   ## Create table with googleVis
+##   tbl <- gvisTable(data, 
+##                    options=list(gvis.editor="Edit me!",
+##                                 height=350),
+##                                 chartid="myInitialView")
+##   ## Write the HTML output and
+##   ## make use of the googleVis HTML output.
+##   ## See vignette('googleVis') for more details
+##   res$write(tbl$html$header) 
+##   res$write("<h1>My first Rook app with googleVis</h1>")
+##   res$write(tbl$html$chart)
+##   res$write('
+## Read CSV file:<form method="POST" enctype="multipart/form-data">
+## <input type="file" name="data">
+## <input type="submit" name="Go">\n</form>')            
+##   res$write(tbl$html$footer)
+##   res$finish()
+## }
+## s$add(app=my.app, name='googleVisTable')
+## ## Open a browser window and display the web app
+## s$browse('googleVisTable')
+
+
+###################################################
+### code chunk number 41: googleVis.Rnw:1062-1089 (eval = FALSE)
+###################################################
+## # server.R
+## library(googleVis)
+## 
+## shinyServer(function(input, output) {
+##   datasetInput <- reactive({
+##     switch(input$dataset,
+##            "rock" = rock,
+##            "pressure" = pressure,
+##            "cars" = cars)
+##   })
+##   
+##   output$view <- renderGvis({
+##     gvisScatterChart(datasetInput())
+##   })
+## })
+## 
+## # ui.R
+## shinyUI(pageWithSidebar(
+##   headerPanel("googleVis on Shiny"),
+##   sidebarPanel(
+##     selectInput("dataset", "Choose a dataset:", 
+##                 choices = c("rock", "pressure", "cars"))
+##   ),
+##   mainPanel(
+##     htmlOutput("view")
+##   )
+## ))
+
+
+###################################################
+### code chunk number 42: googleVis.Rnw:1100-1102 (eval = FALSE)
+###################################################
+## library(shiny) ## Version >= 0.4.0 required
+## runApp(system.file("shiny/", package="googleVis"))
+
+
+###################################################
+### code chunk number 43: googleVis.Rnw:1301-1307 (eval = FALSE)
+###################################################
+## jscode <- "window.open('http://en.wikipedia.org/wiki/' 
+##                   + data.getValue(chart.getSelection()[0].row,0)); "
+## 
+## J1 <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+##                  options=list(dataMode="regions", gvis.listener.jscode=jscode))
+## plot(J1)
+
+
+###################################################
+### code chunk number 44: googleVis.Rnw:1310-1312 (eval = FALSE)
+###################################################
+## plot(gvisOrgChart(Regions,  options=list(gvis.listener.jscode=jscode)))
+## plot(gvisLineChart(Regions[,c(1,3)], options=list(gvis.listener.jscode=jscode)))
+
+
+###################################################
+### code chunk number 45: googleVis.Rnw:1316-1324 (eval = FALSE)
+###################################################
+## jscode <- "
+##        var sel = chart.getSelection();
+##        var row = sel[0].row;
+##        var text = data.getValue(row,1);
+##        alert(text);
+## "
+## J2 <- gvisTable(Population, options=list(gvis.listener.jscode=jscode))
+## plot(J2)
+
+
+###################################################
+### code chunk number 46: googleVis.Rnw:1385-1395 (eval = FALSE)
+###################################################
+## library(googleVis)
+## dat <- data.frame(x=LETTERS[1:10], 
+##                   y=c(0, 4, -2, 2, 4, 3, 8, 15, 10, 4))
+## area1 <- gvisAreaChart(xvar="x", yvar="y", data=dat,
+##     	options=list(vAxes="[{viewWindowMode:'explicit',
+## 			viewWindow:{min:0, max:10}}]",
+##                         width=500, height=400, 
+##                         title="y-limits set from 0 to 10"),
+## 			chartid="area1ylim")
+## plot(area1)
+
+
+###################################################
+### code chunk number 47: googleVis.Rnw:1425-1426 (eval = FALSE)
+###################################################
+## citation("googleVis")
+
+
+###################################################
+### code chunk number 48: googleVis.Rnw:1429-1430 (eval = FALSE)
+###################################################
+## citation()
+
+
diff --git a/inst/doc/googleVis.Rnw b/inst/doc/googleVis.Rnw
new file mode 100644
index 0000000..8ab85b8
--- /dev/null
+++ b/inst/doc/googleVis.Rnw
@@ -0,0 +1,1440 @@
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage{Sweave}
+\usepackage{thumbpdf}
+\usepackage{url}
+%\usepackage{wrapfig}
+\usepackage{hyperref}
+
+\hypersetup{
+  pdftitle={Introduction to googleVis},%
+  pdfauthor={Markus Gesmann},%
+}
+
+%\VignetteEngine(Sweave)
+%!\VignetteEncoding{UTF-8}
+%\VignetteIndexEntry{Introduction to googleVis}
+%\VignetteDepends{googleVis}
+%\VignetteKeywords{google, visualisation, api}
+%\VignettePackage{googleVis}
+
+
+\SweaveOpts{engine=R, eps=FALSE, keep.source = TRUE}
+<<options, echo=FALSE>>=
+options(prompt = "R> ", digits = 4, show.signif.stars = FALSE)
+@
+
+
+%\keywords{google, visualisation, api, \proglang{R}}
+
+\setlength{\parindent}{0.0in}
+\setlength{\parskip}{2mm}
+
+\newcommand{\googleVis}{\textbf{\texttt{googleVis}} }
+\newcommand{\knitr}{\textbf{\texttt{knitr}} }
+\newcommand{\rsp}{\textbf{\texttt{R.rsp }}}
+\newcommand{\brew}{\textbf{\texttt{brew }}}
+\newcommand{\rapache}{\emph{{RApache }}}
+\newcommand{\Rook}{\emph{{Rook }}}
+\newcommand{\shiny}{\textbf{\texttt{shiny }}}
+
+\renewcommand{\familydefault}{\sfdefault}
+
+\begin{document}
+\SweaveOpts{concordance=TRUE}
+
+\author{Markus Gesmann\footnote{markus.gesmann at gmail.com},
+  Diego de Castillo\footnote{decastillo at gmail.com}}
+\title{Introduction to googleVis \Sexpr{packageDescription("googleVis")[['Version']]}
+}
+\maketitle
+\begin{abstract}
+  The \googleVis package provides an interface between R and the
+  Google Charts API. Google Charts offer interactive
+  charts which can be embedded into web pages. The best 
+  known of these charts is probably the Motion Chart, popularised 
+  by Hans Rosling in his TED talks. 
+ 
+  The functions of the \googleVis package allow the user to visualise
+  data stored in R data frames with Google Charts
+  without uploading the data to Google. The output of a \googleVis
+  function is HTML code that contains the data and references to
+  JavaScript functions hosted by Google.
+  
+  googleVis makes use of the internal R HTTP server to display the
+  output locally. A modern browser with an Internet connection is
+  required and for some charts a Flash player.
+	     
+\end{abstract}
+
+\clearpage
+\tableofcontents
+\clearpage
+
+\section{Introduction}\label{sec:Intro}
+
+\subsection{Motivation}\label{sec:Motivation}
+More and more data is becoming available, and yet
+stories and insights are still often missed: we are lost in the data
+jungle and struggle to see the wood for the trees. 
+
+Hence, new tools are required to bring data to life, to engage with
+users, to enable them to slice and dice the data, to view it from
+various angles and to find stories worth telling: outliers, trends or
+even the obvious. 
+
+In 2006 Hans Rosling gave an inspiring talk at
+TED~\cite{HansRoslingTedTalk} about social and economic developments
+in the world over the past 50 years, which challenged the views and
+perceptions of many listeners. Rosling had used extensive data analysis
+to reach his conclusions.  To visualise his talk, he and his team at
+Gapminder~\cite{Gapminder} had developed animated bubble charts, aka
+motion charts, see Figure~\ref{MotionChartGUI}. 
+
+Rosling's presentation popularised the idea and use of interactive
+charts. One year later the software behind
+Gapminder was bought by Google and integrated as motion charts into
+their Google Charts API~\cite{GoogleVisApi}, formerly known as Google
+Visualisation API.  
+
+In 2010 Sebasti\'{a}n P\'{e}rez Saaibi~\cite{Saaibi2010} presented at the 
+R/Rmetrics Workshop on  Computational Finance and Financial
+Engineering, the idea to use Google motion charts to visualise R
+output with the \rsp package~\cite{Rsp}. 
+
+Inspired by those talks and the desire to use interactive data
+visualisation tools to foster the dialogue between data analysts and
+others the authors of this vignette started the development of the
+\googleVis package~\cite{googleVis},
+\cite{RJournal:2011-2:GesmannCastillo} in August 2010. 
+
+\begin{figure}[t]
+\begin{center}
+\includegraphics[width=\textwidth]{./figures/MotionChart.pdf}
+\caption{
+  Overview of a Google Motion Chart.  Screenshot of the output of
+  \texttt{plot(gvisMotionChart(Fruits, idvar='Fruit', timevar='Year'))}
+}\label{MotionChartGUI}
+\end{center}
+\end{figure}
+%\clearpage
+
+\subsection{Google Chart Tools}\label{sec:GoogleChartTools}
+
+The Google Charts API~\cite{GoogleVisApi}
+allows users to create interactive charts as part of Google
+documents, spreadsheets and web pages. In this text, we will focus 
+on the usage of the API as part of web pages.
+
+The Google Public Data Explorer~\cite{GooglePublicData} provides a
+good example, demonstrating the use of interactive charts and how they can
+help to analyse data. Please note, that all of those charts are
+rendered by the browser.
+
+The charting data can either be embedded into the HTML file or read
+dynamically. The key to the Google Charts is that the data is
+structured in a DataTable~\cite{DataTable}, and this is where the \googleVis
+package helps, as it transforms R data frames into JSON~\cite{json}
+objects, using the \texttt{\textbf{jsonlite}} package~\cite{jsonlite}, as
+the basis for a DataTable. 
+
+As an example we shall look at the html-code of a motion chart from
+Google's visualisation gallery~\cite{GoogleMotionChart}, which
+generates output similar to Figure~\ref{MotionChartGUI}:
+
+\begin{small}\label{motionchartcodeexample}
+\begin{verbatim}
+ 1 <html>
+ 2  <head>
+ 3   <script type="text/javascript" 
+ 4     src="http://www.google.com/jsapi">
+ 5   </script>
+ 6   <script type="text/javascript">
+ 7     google.load('visualization', '1', 
+ 8      {'packages':['motionchart']});
+ 9    google.setOnLoadCallback(drawChart);
+10    function drawChart() {
+11    var data=new google.visualization.DataTable();
+12    data.addColumn('string', 'Fruit');
+13    data.addColumn('date', 'Date');
+14    data.addColumn('number', 'Sales');
+15    data.addColumn('number', 'Expenses');
+16    data.addColumn('string', 'Location');
+17    data.addRows([
+18    ['Apples',new Date(1988,0,1),1000,300,'East'],
+19    ['Oranges',new Date(1988,0,1),1150,200,'West'],
+20    ['Bananas',new Date(1988,0,1),300,250,'West'],
+21    ['Apples',new Date(1989,6,1),1200,400,'East'],
+22    ['Oranges',new Date(1989,6,1),750,150,'West'],
+23    ['Bananas',new Date(1989,6,1),788,617,'West']
+24    ]);
+25    var chart=new google.visualization.MotionChart(
+26      document.getElementById('chart_div'));
+27    chart.draw(data, {width: 600, height:300});
+28   }
+29   </script>
+30  </head>
+31  <body>
+32   <div id="chart_div" 
+33        style="width:600px; height:300px;">
+34   </div>
+35  </body>
+36 </html>
+\end{verbatim}
+\end{small}
+The code and data are processed and rendered by the browser and is
+not submitted to any server\footnote{\url{https://google-developers.appspot.com/chart/interactive/docs/gallery/motionchart.html\#Data\_Policy}}. 
+
+You will notice that the above HTML code has five generic
+parts\footnote{For more details see
+\url{https://google-developers.appspot.com/chart/interactive/docs/index}}:
+\begin{itemize}
+\item references to Google's AJAX (l. 4) and Visualisation
+  API (ll. 7 -- 8),
+%%shown here as \verb=jsapi= and \verb='motionchart'=,
+
+\item data to visualise as a \verb=DataTable= (ll. 11 -- 24),
+
+\item an instance call to create the chart (ll. 25 -- 26),
+
+\item a method call to draw the chart including options, shown
+  here as width and height (l. 27),
+ 
+\item an HTML \verb=<div>= element to add the chart to the page (ll.
+  32 -- 34).
+\end{itemize}
+These principles hold true for most of the interactive charts of the
+Google Chart Tools, see the examples in Figure~\ref{demos}.
+
+However, before you use the API you should read the \href{https://developers.google.com/terms/}{Google
+  Terms of Service}~\cite{GoogleTerms}. 
+
+\section{The \googleVis package}\label{sec:googleVisPackage}
+
+
+The \googleVis package provides an interface between R and the Google
+Chart Tools.  The functions of the package allow the user to
+visualise data stored in R data frames with Google Charts.
+
+Version (\Sexpr{packageDescription("googleVis")[['Version']]}) of the package
+provides interfaces to  Motion Charts, Annotated Time Lines, 
+Maps, Geo Maps, Geo Charts, Intensity Maps, Tables, Gauges, 
+Tree Maps, further Line, Bar, Bubble, Column, Area, Stepped Area, 
+Combo, Scatter, Candlestick, Pie, Sankey, Annotation, 
+Histogram, Timeline, Calendar and Org Charts; see 
+Figure~\ref{demos} for some examples. 
+
+The output of a \googleVis function is HTML code that contains the
+data and references to JavaScript functions hosted by Google. A
+browser with an Internet connection is required to view
+the output, and for Motion Charts, Geo Maps, and Annotated Time Lines
+also Flash. For Geo Maps and Annotated Time Lines HTML5 alternatives are available with Geo Charts and Annotation Charts. 
+
+<<eval=FALSE, echo=FALSE>>=
+## Code for screen shot
+MC <- gvisMotionChart(Fruits, "Fruit", "Year", options=list(width=500, height=300))
+ATL <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(
+                             width=300, height=300,
+                             fill=10, displayExactValues=TRUE,
+                             colors="['#0000ff','#00ff00']")
+                           )
+                          
+Map <- gvisMap(Andrew, "LatLong" , "Tip",
+              options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE,
+                           mapType='terrain', useMapTypeControl=TRUE,
+                           width=400, height=200))
+Geo <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+                 options=list(dataMode="regions", width=400,height=200)) 
+
+## Table with enabled paging
+Table <- gvisTable(Population, options=list(page='enable', height=200, width=500))
+
+Tree <- gvisTreeMap(Regions,  "Region", "Parent", "Val", "Fac",
+                    options=list(width=300, height=200,
+                                 fontSize=16,
+                                 minColor='#EDF8FB',
+                                 midColor='#66C2A4',
+                                 maxColor='#006D2C',
+                                 headerHeight=20,
+                                 fontColor='black',
+                                 showScale=TRUE))
+
+M <- gvisMerge(gvisMerge(gvisMerge(MC, ATL, TRUE, tableOptions="cellspacing=10"), 
+                         gvisMerge(Map, Geo, TRUE, tableOptions="cellspacing=10")), 
+                         gvisMerge(Table, Tree, TRUE, tableOptions="cellspacing=10"))
+plot(M)
+@ 
+\begin{figure}[t]
+\begin{center}
+\includegraphics[width=\textwidth]{./figures/googleVisDemoPlots.pdf}
+\caption{
+  Screenshot of some of the outputs of \texttt{demo(googleVis)}.
+  Clockwise from top left:
+  \texttt{gvisMotionChart}, \texttt{gvisAnnotatedTimeLine}, 
+  \texttt{gvisGeoMap}, \texttt{gvisTreeMap}, \texttt{gvisTable}, and \texttt{gvisMap}.
+}\label{demos}
+\end{center}
+\end{figure}
+
+\subsection{Installation}\label{sec:Installation}
+You can install \googleVis in the usual way from CRAN, e.g.:
+<<eval=FALSE>>=
+install.packages('googleVis') 
+@
+The installation was successful if the
+command \texttt{library(googleVis)} gives you the following message:
+<<echo=FALSE, quite=TRUE>>=
+library(googleVis)
+@ 
+<<eval=FALSE>>=
+library(googleVis)
+@ 
+<<echo=FALSE>>=
+cat(googleVis:::gvisWelcomeMessage())
+@ 
+
+\subsection{Using the  \googleVis package}\label{sec:UsingGoogleVis}
+
+The individual functions of the \googleVis package are documented in
+the help pages. Here we will cover only the principles of
+the package.
+
+As an example, we will show how to generate a motion chart as displayed in   
+Figure~\ref{MotionChartGUI}. It works similarly for the other
+APIs. Further examples are covered in the demos\footnote{See
+  \texttt{demo(package="googleVis")} for a list of the available demos.} of the \googleVis
+package.
+
+The design of the visualisation functions is fairly generic. The name
+of the visualisation function is \texttt{'gvis' + ChartType}. So for
+the Motion Chart we have: 
+\begin{verbatim}
+gvisMotionChart(data, idvar='id', timevar='date', 
+                options=list(), chartid)
+\end{verbatim}
+Here \texttt{data} is the input \texttt{data.frame} and \texttt{idvar}
+and \texttt{timevar} specify the column names of the id variable and
+time variable for the plot, while display options are set in an
+optional list, which we discuss in more detail on
+page~\pageref{settingoptions}. The options and data requirements
+follow those of the Google Charts API  and are documented in the
+help pages, see 
+<<eval=FALSE>>=
+help('gvisMotionChart')
+@ 
+
+\begin{figure}%{r}{0.35\textwidth}
+\begin{center}
+\includegraphics[width=0.34\textwidth]{./figures/gvisObject.pdf}
+\caption{Schematic structure of a gvis list object.
+}\label{gvisObject}
+\end{center}
+\end{figure}
+
+The argument \texttt{chartid}  allows the user to set a chart id of the
+output chart manually. If the argument is missing a random id using 
+\texttt{tempfile(pattern=\textquotesingle\textquotesingle)}  
+will be generated. Unique chart ids are required to place more than
+one chart on a web page. 
+
+The output of a \googleVis function is a list of lists (a nested list)
+containing information about the chart type, chart id and the HTML
+code in a  sub-list with header, chart, caption and footer, see Figure~\ref{gvisObject}.
+
+The idea behind this concept is that users can get a
+complete web page, while at the same time offer a facility to extract 
+specific parts, such as the chart itself. 
+This is particularly helpful if the package functions
+are used in solutions where the user wants to feed the visualisation
+output into other sites, or would like to embed them into rsp-pages
+(see page~\pageref{rspexample}),  use \rapache (see
+page~\pageref{rapacheexample}) or Google Gadgets.  
+
+The output of a \googleVis function will be of class \texttt{'gvis'}
+and \texttt{'list'}. Generic print (\texttt{print.gvis})  and plot
+(\texttt{plot.gvis}) functions exist to ease the handling of such objects. 
+
+To illustrate the concept we shall create a motion chart using the
+\texttt{Fruits} data set. 
+
+\subsection{Motion Chart Example}\label{sec:MotionChartExample}
+
+Following the documentation of the Google Motion Chart API we need a
+data set which has at least four columns: one identifying the
+variable we would like to plot, one time variable and at least two
+numerical variables, further numerical and character columns are allowed.
+
+As an example we use the \texttt{Fruits} data set:
+<<>>=
+data(Fruits)
+Fruits
+@
+
+Here we will use the columns \texttt{'Fruit'} and
+\texttt{'Year'} as id and time variable respectively. However we could
+have used \texttt{'Date'} instead of \texttt{'Year'} as well. 
+
+<<>>=
+ M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
+@
+The structural output of \texttt{gvisMotionChart} is a list of lists as
+described above 
+<<eval=FALSE>>=
+ str(M)
+@ 
+<<echo=FALSE>>=
+## This statement avoids truncation
+cat(paste(substring( capture.output( str(M) ) , 0, 66), sep="\n", collapse="\n"))
+@ 
+The first two items of the list contain information about the chart type
+used and the individual chart id: %generated at run time from the chart
+%type and \texttt{tempfile(pattern=\textquotesingle\textquotesingle)}:
+<<>>=
+M$type
+M$chartid
+@ 
+The html output is a list with header, chart, caption and
+footer. This allows the user to extract only certain parts
+of the page, or to create a complete html page. 
+
+The header part of the html page has only basic html and formatting tags: 
+<<>>=
+print(M, tag='header')
+@ 
+Here we used the \texttt{print} statement with the tag
+\texttt{'header'} instead of \texttt{M\$html\$header} to achieve
+a formatted screen output. This is the same output as
+\texttt{cat(M\$html\$chart)}. 
+
+The actual Google visualisation code is stored with the data
+as a named character vector in the \texttt{chart} item of the HTML
+list. The chart is made up of several JavaScript and  HTML
+statements. Please notice that the JavaScript functions are  
+uniquely named with the information of the chart id.
+This concept allows the user get all the chart code directly or only
+specific parts; see the examples in the help page of \texttt{print.gvis}
+for more details.
+<<>>=
+names(M$html$chart)
+@ 
+The complete chart can be displayed via:
+<<>>=
+print(M, tag='chart')  ## or cat(M$html$chart)
+@
+Similarly you can also access specific components of the chart, e.g. (output  truncated)
+<<eval=FALSE>>=
+cat(M$html$chart['jsChart']) # or print(M, 'jsChart')
+@ 
+<<echo=FALSE>>=
+cat(paste(substring( capture.output( cat(M$html$chart['jsChart']) ) , 0, 66), sep="\n", collapse="\n"))
+@ 
+A basic chart caption and html footer are the final items of the html
+list (output  truncated):
+
+<<eval=FALSE>>=
+print(M, tag='caption')
+@ 
+<<echo=FALSE>>=
+cat(paste(substring( capture.output( cat(M$html$caption) ) , 0, 66), sep="\n", collapse="\n"))
+@ 
+
+<<eval=FALSE>>=
+print(M, tag='footer')
+@ 
+<<echo=FALSE>>=
+cat(paste(substring( capture.output( cat(M$html$footer) ) , 0, 66), sep="\n", collapse="\n"))
+@ 
+
+\subsection{Displaying \texttt{gvis} objects
+  locally}\label{sec:DisplayLocally} 
+
+To display the page locally, type:
+<<eval=FALSE>>=
+plot(M)  # returns invisibly the file name
+@
+
+The plot method for \texttt{gvis}-objects creates HTML files in a temporary folder using
+the type and chart id information of the object and it will display
+the output using the R HTTP help web server locally, usually under
+http://127.0.0.1.   
+
+Note that the chart caption provides a link to the chart code via
+the chart id for copy and paste. 
+
+The R command \texttt{tempdir()}  will show you the path of the
+per-session temporary directory, in which the files were written.  
+You can write the chart into a local html file via the \texttt{print}
+command with the file argument, e.g.
+<<eval=FALSE>>=
+print(M, file="myGoogleVisChart.html")
+@ 
+
+Please note that Flash charts\footnote{Currently the following charts
+  require Flash: motion chart, geo map and
+  annotated time line} may not work when loaded as a local file
+due to security settings, and therefore require to be displayed via a
+web server.  However, you can overcome this issue by changing your Flash security
+settings. Tony Breyal posted the following solution on
+\href{http://stackoverflow.com/questions/8009825/cannot-view-gvismotionchart-from-printed-html-file 
+}{stackoverflow.com}: 
+
+\begin{enumerate}\label{breyal}
+\item Go to \url{http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html}
+\item Click on the dropbox which says 'Edit location' and choose 'add location'
+\item Click 'browse for folder'
+\item Choose the folder in which you saved your HTML file
+\item Click OK
+\end{enumerate}
+
+Now open your \googleVis HTML file and it should display
+successfully. 
+
+Alternatively use the function \texttt{plot.gvis} explicitly,
+e.g. suppose your html file is stored in
+\texttt{/Users/JoeBloggs/myGoogleVisChart.html}. Using the
+\texttt{plot.gvis} the file will be copied into a temporary directory
+and displayed via the R HTTP help server with, in the same way as a
+gvis-object: 
+<<eval=FALSE>>=
+plot.gvis("/Users/JoeBloggs/myGoogleVisChart.html")
+@ 
+
+Please note that this feature of \texttt{plot.gvis} was introduced
+to \googleVis  with version 0.3.2.
+
+\subsection{Setting default behaviour of \texttt{print.gvis} and
+  \texttt{plot.gvis}}\label{sec:Options} 
+
+In \googleVis version 0.3.2 the function \texttt{plot.gvis} gained the
+same argument as \texttt{print.gvis}: \texttt{tag}. By default the
+\texttt{tag} argument is set to \texttt{NULL} in \texttt{plot.gvis}
+and the plot function will display its output in a browser
+window. However, if \texttt{tag} is not \texttt{NULL} the function
+\texttt{plot.gvis} will behave exactly like \texttt{print.gvis}.
+
+The default \texttt{tag} can be set for both functions globally via
+the \texttt{options()} function. On package load \googleVis sets
+\texttt{options(gvis.print.tag='html')} and
+\texttt{options(gvis.plot.tag=NULL)}. 
+
+Suppose you would set \texttt{options(gvis.plot.tag='chart')} then all
+following plot statements would print the chart part of the
+gvis-object only, without opening a browser window. This might
+seem a bit odd at first, yet it becomes helpful when you write R
+Markdown files for \knitr or files for other packages such as
+\textbf{\texttt{R.rsp}}. 
+
+While you draft your file you may want to see the output of \googleVis
+in an interactive way, so you set \texttt{options(gvis.plot.tag=NULL)}
+at the top of the file and you change the setting to \texttt{'chart'}
+before you parse the file, say with \textbf{\texttt{knitr}}. This will
+ensure that all plot statements return the HTML code of the chart,
+rather than opening browser windows. Section~\ref{sec:knitr} on
+page~\pageref{sec:knitr} provides more details and a little \knitr
+example.   
+
+\subsection{Combining charts with \texttt{gvisMerge}}\label{gvisMerge}
+
+The function \texttt{gvisMerge} takes two \texttt{gvis}-objects 
+and merges the underlying components into one page. The charts are
+aligned either horizontally or vertically next to each other in an HTML table. 
+
+\begin{figure}[ht]
+\begin{center}
+\includegraphics[width=0.8\textwidth]{./figures/gvisMerge.pdf}
+\caption{
+  Three charts combined with \texttt{gvisMerge}.
+}\label{gvisMerge}
+\end{center}
+\end{figure}
+
+The output of \texttt{gvisMerge} is a \texttt{gvis}-object again.
+This allows us to apply the same function iteratively to create more complex
+chart layouts.  The following example, see Figure~\ref{gvisMerge}, aligns a geo chart
+and table below each other, and combines the output with a motion chart to the right:
+<<>>=
+G <- gvisGeoChart(Exports, "Country", "Profit", 
+                  options=list(width=200, height=100))
+T <- gvisTable(Exports, 
+                  options=list(width=200, height=270))
+M <- gvisMotionChart(Fruits, "Fruit", "Year",
+                     options=list(width=400, height=370))
+GT <- gvisMerge(G,T, horizontal=FALSE) 
+GTM <- gvisMerge(GT, M, horizontal=TRUE, 
+                 tableOptions="bgcolor=\"#CCCCCC\" cellspacing=10")
+@ 
+<<eval=FALSE>>=
+plot(GTM)
+@ 
+
+\subsection{Setting options}\label{settingoptions}
+
+Setting the various options of a \googleVis objects can be a bit
+cumbersome at first. The options follow those of the Google
+Charts API and can be set via a named list using the argument \texttt{options}.
+In the following example, we create a line chart and set various
+options\footnote{Please refer to the help file of the individual
+  \googleVis functions, as the options can vary from chart to chart.},
+see the output in Figure~\ref{Options}.  
+\begin{figure}[ht]
+\begin{center}
+\includegraphics[width=0.8\textwidth]{./figures/Options.pdf}
+\caption{
+  A line chart with various options set.
+}\label{Options}
+\end{center}
+\end{figure}
+<<eval=FALSE>>=
+df <- data.frame(country=c("US", "GB", "BR"), 
+                        val1=c(1,3,4), val2=c(23,12,32))
+
+Line <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+                        options=list(
+                          title="Hello World",
+                          titleTextStyle="{color:'red', 
+                                           fontName:'Courier', 
+                                           fontSize:16}",                         
+                          backgroundColor="#D3D3D3",                          
+                          vAxis="{gridlines:{color:'red', count:3}}",
+                          hAxis="{title:'Country', titleTextStyle:{color:'blue'}}",
+		          series="[{color:'green', targetAxisIndex: 0},	
+                                   {color: 'orange',targetAxisIndex:1}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]",
+                          legend="bottom",
+                          curveType="function",
+                          width=500,
+                          height=300                         
+                          ))
+plot(Line)
+@
+As you can see from the example above, the simpler options can be set by name=value,
+e.g. width=500, while the more complex options with sub-components are
+listed in curly brackets \{\}, and arrays, e.g. to define the two
+axes, use square brackets [ ].
+
+Generally, the following rules apply:
+
+\begin{itemize}
+
+\item parameters with names that do not include a "." are set with a single 
+value, e.g. width and height. Those are set like one would do in R, that is
+\texttt{options=list(}\texttt{width=200,} \texttt{height=300)}. 
+Boolean arguments are set to 
+either \texttt{TRUE} or \texttt{FALSE}, using the R syntax.
+
+\item parameters with names that do not include a "." and are set with 
+multiple values, e.g. \texttt{color}, and are wrapped in "[ ]", e.g. 
+\texttt{options=list(} \texttt{colors="['\#cbb69d',} \texttt{'\#603913',}
+\texttt{'\#c69c6e']")}
+
+\item parameters with names that do include a "." present parameters with 
+several sub-options and have to be set as a string wrapped in "\{ \}".
+The values of those sub-options are set via parameter:value. Boolean values
+have to be stated as \texttt{'true'} or \texttt{'false'}. 
+For example the Google documentaion states the formating options for the 
+vertical axis and states the parameter as \texttt{vAxis.format}. 
+Then this paramter can be set in R as:
+\texttt{options=list(} \texttt{vAxis="\{format:'\#,\#\#\#\%'\}")}. 
+
+\item If several sub-options have to be set, e.g. 
+\texttt{titleTextStyle.color,} \texttt{title\-Text\-Style.\-fontName} and 
+\texttt{titleTextStyle.fontSize}, then those can be combined in one list item 
+such as:
+\texttt{options=list(} \texttt{titleTextStyle="\{color:'red',} 
+\texttt{fontName:'Courier',} \texttt{fontSize:16\}")}
+
+\item paramters that can have more than one value per sub-options are 
+wrapped in "[ ]". For example to set the labels for left and right axes use:
+\texttt{options=list(} \texttt{vAxes="[\{title:'val1'\},} 
+\texttt{\{title:'val2'\}]")}
+
+\end{itemize}
+
+
+The following example set the colour axis of a geo chart, 
+see Figure~\ref{geochart}:
+<<eval=FALSE>>=
+Geo <- gvisGeoChart(CityPopularity, locationvar='City', 
+                    colorvar='Popularity',
+                     options=list(region='US', height=350, 
+                      displayMode='markers',
+            	      colorAxis="{values:[200,400,600,800],
+                       colors:[\'red', \'pink\', \'orange',\'green']}")
+                      ) 
+plot(Geo)
+@ 
+\begin{figure}[ht]
+\begin{center}
+\includegraphics[width=0.8\textwidth]{./figures/gvisGeoChart.pdf}
+\caption{
+A geo chart with options set for a colour axis.}
+\label{geochart}
+\end{center}
+\end{figure}
+
+\subsubsection{Chart Editor}
+A special option for all charts is \texttt{gvis.editor}, which adds an
+edit  button to the page, allowing the user to edit, change and
+customise the chart on the fly, see the following example and
+Figure~\ref{Editor}. The content of the list item \texttt{gvis.editor}
+describes the label of the browser button\footnote{See also
+  \url{https://google-developers.appspot.com/chart/interactive/docs/drawing\_charts\#charteditor}}. 
+<<eval=FALSE>>=
+Editor <- gvisLineChart(df, options=list(gvis.editor='Edit me!'))
+plot(Editor)
+@ 
+\begin{figure}[ht]
+\begin{center}
+\includegraphics[width=0.8\textwidth]{./figures/Editor.pdf}
+\caption{
+Example of \googleVis chart with \texttt{options = list (gvis.editor =
+  'Edit me!')}.
+}\label{Editor}
+\end{center}
+\end{figure}
+
+\subsubsection{Dealing with apostrophes in column names}
+The \googleVis package converts data frames into JSON objects.
+The column names of the resulting JSON tables are encapsulated with
+single speech marks, see lines 12 -- 16 of the code example on
+page~\pageref{motionchartcodeexample}. 
+
+Hence apostrophes in column names of your input data frame have
+to be encapsulated by a double backslash.
+
+Here is a little example, see the output in Figure~\ref{fig:apostrophes}.
+<<>>=
+df <- data.frame("Year"=c(2009,2010), "Lloyd\\'s"=c(86.1, 93.3), 
+                 "Munich Re\\'s R/I"=c(95.3, 100.5),
+                 check.names=FALSE) 
+df
+CR <- gvisColumnChart(df, options=list(vAxis='{baseline:0}', 
+                            title="Combined Ratio %",
+                            legend="{position:'bottom'}"))
+@ 
+<<eval=FALSE>>=
+plot(CR)
+@ 
+\begin{figure}[t]
+  \centering
+  \includegraphics[width=0.5\textwidth]{./figures/Apostrophe.pdf}
+  \caption{Visualising data with apostrophes in column names.}
+  \label{fig:apostrophes}
+\end{figure}
+
+\section{Embedding \googleVis in web sites}
+
+\subsection{Integrating \texttt{gvis} objects in existing sites}
+
+Suppose you have an existing web page and would like to integrate the
+output of a \googleVis function, such as \texttt{gvisMotionChart}. 
+In this case you only need the chart output from
+\texttt{gvisMotionChart}.  So you can either copy and paste the output
+from the R console
+<<eval=FALSE>>=
+print(M, 'chart')  ## or cat(M$html$chart) 
+@ or the browser, see previous section, 
+into your existing html page, or write the content directly into a file
+<<eval=FALSE>>=
+print(M, 'chart', file='myfilename')
+@
+and process it from there.
+
+\subsection{Using \googleVis output with WordPress}
+
+\href{http://wordpress.org/}{WordPress} is a popular web software for
+creating websites and blogs. Here we give some tips about the
+usage with \googleVis output.  
+
+By default WordPress does not allow JavaScript code (and hence \googleVis
+output) to be inserted into a page. However, additional plugins
+allow you to extend the functions of WordPress.
+
+One option of embedding JavaScript code inside a WordPress post is to use
+the ``custom fields shortcode''
+plugin\footnote{\url{http://wordpress.org/extend/plugins/custom-fields-shortcode}}. 
+The plugin allows you to create a custom field for the \googleVis
+code, which can be referred to in your article.
+
+Suppose you created a motion chart in R:
+<<eval=FALSE>>=
+M <- gvisMotionChart(Fruits, "Fruit", "Year",
+		     options=list(width=400, height=370))
+@
+Copy the chart code, e.g. from
+<<eval=FALSE>>=
+print(M, 'chart')
+@ 
+and paste it into the value text area of a custom field in WordPress, e.g.
+with instance name \texttt{Fruits}.  To include the motion chart into your article add
+\texttt{[cf]Fruits[/cf]} into the post, see Figure~\ref{wordpress} for
+an illustration.
+
+\begin{figure}[t]
+  \centering
+  \includegraphics[width=0.8\textwidth]{./figures/CreatePost.pdf}
+  \caption{Including \googleVis output in a WordPress blog entry.}
+  \label{wordpress}
+\end{figure}
+
+
+\subsection{Using \googleVis output with Google Sites, Blogger, etc.}
+
+Google Charts can be used with other Google products such as Google
+Sites, Blogger or Google Code wiki pages. 
+However, in most cases, the chart has to be embedded as a Google Gadget.
+Google Gadgets are written in XML and can have HTML and Javascript components.
+Here is an example of a 'Hello World' program written using Google
+Gadget technology from \href{http://en.wikipedia.org/wiki/Google_Gadgets}{Wikipedia}.
+\begin{verbatim}
+<?xml version="1.0" encoding="UTF-8" ?> 
+<Module>  
+<ModulePrefs title="simple hello world example" />   
+<Content type="html">     
+     <![CDATA[ 
+       Hello, world!
+     ]]>
+</Content> 
+</Module>
+\end{verbatim}
+The \googleVis package comes with the function
+\texttt{createGoogleGadget}, which takes a gvis-object and
+wraps it into an XML gadget file. Here is an example with a motion chart:
+<<>>=
+M <- gvisMotionChart(Fruits, "Fruit", "Year")
+G <- createGoogleGadget(M)
+@ 
+<<eval=FALSE>>=
+cat(G, file="myGadget.xml")
+@ 
+In order to use the gadget, the file \texttt{myGadget.xml} has to be
+hosted online, e.g. using Google Docs. 
+Suppose the URL to the gadget is
+\texttt{http://example.com/myGadget.xml}, than you can embed  the gadget
+
+\begin{itemize}
+
+\item in a Google Site via the menu:
+  
+  "Insert" -> "More gadgets ..." -> "Add gadget URL",
+  
+\item in a Google Code wiki via the \texttt{wiki:gadget} tag, e.g.: 
+  
+  \texttt{<wiki:gadget url="http://example.com/gadget.xml" />},
+
+ \item in Blogger via the design tab, see site gadgets.
+\end{itemize}
+
+However, the situation is different again, if you would like to include the \googleVis
+output into a blogger post.  In this case, a gadget does not
+work. You can either copy and paste the chart directly into your
+post, but then it does not seem to work with MS Internet Explorer, or
+you use an indirect approach. This means that the \googleVis
+chart has to be hosted on a separate page (e.g. in a public web
+folder) and is embedded into the blog post by using the
+\texttt{<iframe>} tag, e.g.: 
+\begin{verbatim}
+<iframe width="100%" height="400px" frameborder="0" 
+src="http://example.com/myGoogleVisChart.html">
+</iframe>
+\end{verbatim}
+For an example see the following blog entry:
+\href{http://www.magesblog.com/2011/09/including-googlevis-output-into-blogger.html}
+{http://www.magesblog.com/2011/09/including-googlevis-output-into-blogger.html}.
+
+
+
+\subsection{Embedding \googleVis in web sites dynamically}
+
+In this section, we provide examples how the \googleVis functions can be
+embedded into web pages dynamically. 
+
+The R packages \rsp~\cite{Rsp} and \brew~\cite{brew2010} are two
+options to integrate R snippets into HTML code. While the \rsp package
+comes with its own internal web server, \brew requires the Apache HTTP
+server~\cite{Apache2.0} with the \rapache~\cite{Rapache} module
+installed. Please note that currently the \rapache module only runs on
+UNIX/Linux and Mac OS X.   
+
+Since version 2.11.0 R ships with its own internal web server and with
+\Rook~\cite{Rook} and \shiny~\cite{shiny} there are also two 
+alternatives that use this facility. Both packages allow users to
+deploy web application locally with very little overhead. The \shiny
+framework is the newest and certainly easiest option to 
+get started with web apps using R and \googleVis.
+
+\subsubsection{Using \googleVis with \rsp}\label{rspexample}
+The \rsp package allows the user to integrate R code into html code.
+The R code is parsed by the \rsp web server and executed
+at run time. 
+
+As an example, we embed a motion chart into a rsp-page: 
+\begin{verbatim}
+<html>
+<body>
+<% library(googleVis)
+   M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year") %>
+<%= M$html$chart %>
+</body>
+</html>
+\end{verbatim}
+The R code included in \texttt{<\%$\dots$\%>} is executed when read by
+the R.rsp HTTP server, but no R output will be displayed. To embed the
+R output into the html code we have to add an equal sign,
+\texttt{<\%=$\dots$\%>}, which acts as a \texttt{cat} statement.
+
+\subsubsection{Using \googleVis with \rapache and \brew}\label{rapacheexample}
+
+\rapache supports web application development using
+R and the Apache HTTP server. The  \rapache module
+embeds the R interpreter into the Apache web server.  However, as we
+would like to mix R and HTML code we also need a parser and
+this is where the R package \brew comes into place. 
+
+Files sitting in a dedicated \brew folder of the HTTP repository are
+parsed by \brew when opened in the browser. The R code is 
+executed with \rapache and the output is embedded into the site.
+Hence the approach is similar to \rsp with the difference that the
+two tasks are split. This has the advantage that R does not have to
+run in a separate window.
+
+Detailed installation instructions for \rapache are available on the
+project site: 
+\href{http://rapache.net/manual.html}{http://\-rapache.\-net/\-manual\-.html},
+for specific comments on Mac OS X see: 
+\href{http://worldofrcraft.blogspot.com/2010/08/installing-rapache-on-mac-os-x-snow.html}{http://\-worldofrcraft\-.blog\-spot\-.com/\-2010/\-08/\-installing\--rapache\--on\--mac\--os\--x\--snow\-.html}  
+
+Following the installation of \rapache you will have to configure Apache.
+Most likely you have to add something along the following lines to your
+\path{apache2.conf} or \path{httpd.conf} file (often found in
+\path{/etc/httpd} or \path{/private/etc/apache2/httpd.conf} on Mac OS X):
+\begin{verbatim}
+LoadModule R_module /usr/lib/apache2/modules/mod_R.so
+## On Mac OS X more likely to be:
+## LoadModule R_module libexec/apache2/mod_R.so
+ROutputErrors
+RSourceOnStartup "/var/www/rapache/R/startup.R"
+## On Mac OS X the www folder is often equivalent to:
+## /Library/WebServer/Documents/
+\end{verbatim}
+The first line loads the R module when the Apache web server is
+started, the second line deals with error handling, while
+the \path{startup.R} file is suitable for initial
+set ups, e.g. libraries and global variables:
+\begin{verbatim}
+## Ensure the packages are installed so that mod_R 
+## has access to them, e.g. not in your home folder
+library{googleVis} 
+library{lattice}
+library{Cairo}
+MyGlobalVar <- 42
+\end{verbatim}
+
+To test that \rapache is working open
+\href{http://localhost/RApacheInfo}{http://\-localhost/\-RApacheInfo} and
+you should find details about your system, an example can be found on
+the \rapache site:
+\href{http://biostat.mc.vanderbilt.edu/rapache/files/RApacheInfo.html}{http://\-biostat.\-mc.\-vanderbilt.\-edu/\-rapache/\-files/\-RApacheInfo\-.html} 
+
+The next step is to install the \brew R package in the usual way:
+<<eval=FALSE>>=
+install.packages('brew')
+@
+Following this we have to tell Apache that files in a specific folder
+should be parsed by \textbf{\texttt{brew}}. Again we edit the \path{apache2.conf} or
+\path{httpd.conf}  and add the connection of the RHandler with the function \path{brew}:
+\begin{verbatim}
+<Directory /var/www/rapache/brew>
+## On Mac OS more likely to be something like:
+## <Directory /Library/WebServer/Documents/rapache/brew>
+      SetHandler r-script
+      RHandler brew::brew
+</Directory>
+\end{verbatim}
+
+That's all. Restart the HTTP daemon and you can start placing files in
+the \brew directory and access them via
+\path{http://localhost/rapache/brew/filename}, e.g. a file containing:  
+\begin{verbatim}
+<html>
+<body>
+<h1>Fruits</h1>
+<% library(googleVis)
+   M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year") %>
+<%= M$html$chart %>
+</body>
+</html>
+\end{verbatim}
+
+You will notice that the  \brew syntax is very similar to \texttt{rsp}.
+For more information read the documentation of the \rapache
+module and \brew package. 
+You find two simple examples of brew files in the \googleVis
+package. Again the following R command shows you the 
+folder path:
+<<eval=FALSE>>=
+system.file("brew", package = "googleVis")
+@ 
+
+\subsubsection{Using \googleVis with \Rook}
+
+\Rook~\cite{Rook} is a web server interface for R, written by Jeffrey Horner, the author 
+of rApache and brew. Compared to other web frameworks \Rook appears incredibly lightweight.
+\Rook doesn't need any configuration. It is an R package, which works out of the box with the R HTTP 
+server. That means no configuration files are needed. No files have to be placed 
+in particular folders. Instead, \Rook web applications can be run on a local desktop. 
+However, \Rook requires some knowledge of the HTTP protocol. 
+
+Here is a \Rook app example with \texttt{googleVis}. It displays a little R data frame in a 
+\googleVis table by default. 
+The user can change the visualisation by clicking on the \emph{Edit me!} button 
+and upload her/his own CSV-file, see Figure~\ref{fig:Rook}. 
+
+\begin{figure}[ht]
+  \centering
+  \includegraphics[width=0.8\textwidth]{./figures/Rook.pdf}
+  \caption{Screen shot of a Rook app with \googleVis output.}
+  \label{fig:Rook}
+\end{figure}
+
+<<eval=FALSE>>=
+require(Rook)
+require(googleVis)
+s <- Rhttpd$new()
+s$start(listen='127.0.0.1')
+
+my.app <- function(env){
+ ## Start with a table and allow the user to upload a CSV-file
+  req <- Request$new(env)
+  res <- Response$new()
+
+  ## Provide some data to start with
+  ## Exports is a sample data set of googleVis
+  data <- Exports[,1:2] 
+  ## Add functionality to upload CSV-file
+  if (!is.null(req$POST())) {
+    ## Read data from uploaded CSV-file
+   data <- req$POST()[["data"]]
+   data <- read.csv(data$tempfile)
+  }
+  ## Create table with googleVis
+  tbl <- gvisTable(data, 
+                   options=list(gvis.editor="Edit me!",
+                                height=350),
+                                chartid="myInitialView")
+  ## Write the HTML output and
+  ## make use of the googleVis HTML output.
+  ## See vignette('googleVis') for more details
+  res$write(tbl$html$header) 
+  res$write("<h1>My first Rook app with googleVis</h1>")
+  res$write(tbl$html$chart)
+  res$write('
+Read CSV file:<form method="POST" enctype="multipart/form-data">
+<input type="file" name="data">
+<input type="submit" name="Go">\n</form>')            
+  res$write(tbl$html$footer)
+  res$finish()
+}
+s$add(app=my.app, name='googleVisTable')
+## Open a browser window and display the web app
+s$browse('googleVisTable')
+@
+
+\subsubsection{Using \googleVis with \shiny}
+Shiny\footnote{\url{http://www.rstudio.com/shiny/}} is a package by
+RStudio. Shiny makes it incredibly easy to build interactive web
+applications with R.  
+
+With version 0.4.0 of \googleVis the support for \shiny ~\cite{shiny}
+apps has been added. Joe Cheng contributed the \texttt{renderGvis}
+function which allows users to use \googleVis output in \shiny in a
+similar way to other plotting functions. Note that \shiny version
+$\ge$ 0.4.0 is required.
+
+The following example has been taken from the help file of
+\texttt{renderGvis}. It displays a scatter chart where the user can
+select the data set to be displayed, see also the screen shot in
+Figure~\ref{fig:shiny}. 
+
+<<eval=FALSE>>=
+# server.R
+library(googleVis)
+
+shinyServer(function(input, output) {
+  datasetInput <- reactive({
+    switch(input$dataset,
+           "rock" = rock,
+           "pressure" = pressure,
+           "cars" = cars)
+  })
+  
+  output$view <- renderGvis({
+    gvisScatterChart(datasetInput())
+  })
+})
+
+# ui.R
+shinyUI(pageWithSidebar(
+  headerPanel("googleVis on Shiny"),
+  sidebarPanel(
+    selectInput("dataset", "Choose a dataset:", 
+                choices = c("rock", "pressure", "cars"))
+  ),
+  mainPanel(
+    htmlOutput("view")
+  )
+))
+@ 
+
+\begin{figure}[ht]
+  \centering
+  \includegraphics[width=0.8\textwidth]{./figures/shiny.pdf}
+  \caption{Screen shot a \shiny app with \googleVis output.}
+  \label{fig:shiny}
+\end{figure}
+
+You can run the example locally with the following statement.
+<<eval=FALSE>>=
+library(shiny) ## Version >= 0.4.0 required
+runApp(system.file("shiny/", package="googleVis"))
+@ 
+
+Further examples have been published on Markus' blog:
+\url{http://www.magesblog.co.uk/search/label/shiny} 
+
+\section{Using \googleVis with \knitr}\label{sec:knitr}
+Using \googleVis with
+\knitr\footnote{\url{http://yihui.name/knitr/}}~\cite{knitr} is a
+convenient way of creating interactive reproducible reports. The
+approach taken by \knitr is similar to Sweave, you can combine R
+code with text and formatting tags. However, \knitr can also export to
+HTML, which is required to  embed \googleVis charts.
+
+To include \googleVis output into a \knitr document you have 
+to set the chunk option \texttt{results} to \texttt{'asis'} and print the chart 
+element only, as demonstrated in the following example:
+\begin{verbatim}
+```{r results='asis'}
+M <- gvisMotionChart(Fruits, "Fruit", "Year",
+                     options=list(width=550, height=450))
+print(M, 'chart')
+```
+\end{verbatim}
+A little example was published in a blog post: 
+\url{http://www.magesblog.co.uk/2012/05/interactive-reports-in-r-with-knitr-and.html}
+
+Version 0.3.2 of \googleVis introduced \texttt{'tag'} as a new argument to
+the plot function \texttt{plot.gvis}, see also
+page~\pageref{sec:Options}. This argument is by default set to
+\texttt{NULL} and can be set globally outside the plot function via
+\texttt{options()}.  
+
+The argument \texttt{tag} influences the behaviour of the plot
+function. The \texttt{tag} parameter can be the same as for the print
+function \texttt{print.gvis}. Indeed, setting
+\texttt{options(gvis.plot.tag = 'chart')} will change the behaviour of
+plot to print, so \texttt{plot(x)} will no longer open a browser
+window, but produce the same output as \texttt{print(x, tag='chart')},
+if \texttt{x} is a gvis-object. 
+
+Hence, setting the option \texttt{gvis.plot.tag} in a \knitr markdown
+Rmd-file to \texttt{'chart'} will automatically turn all following
+plot statements into html output, see the example below and Figure~\ref{fig:markdown}. 
+
+\begin{figure}[ht]
+  \centering
+  \includegraphics[width=0.7\textwidth]{./figures/MarkdownExample.pdf}
+  \caption{Screen shot of the markdown  example output} 
+  \label{fig:markdown}
+\end{figure}
+
+\begin{verbatim}
+# Markdown example with knitr and googleVis
+===========================================
+This is a little Markdown example file.
+Set the googleVis options first.
+In this case change the behaviour of plot.gvis
+```{r setOptions, message=FALSE}
+library(googleVis)
+op <- options(gvis.plot.tag='chart')
+```
+The following plot statements will automatically return  the HTML
+required for the 'knitted' output. 
+
+## Combo chart
+```{r ComboExample, results='asis', tidy=FALSE}
+## Add the mean
+CityPopularity$Mean=mean(CityPopularity$Popularity)
+CC <-  (CityPopularity, xvar='City',
+          yvar=c('Mean', 'Popularity'),
+          options=list(seriesType='bars',
+                       width=450, height=300,
+                       title='City Popularity',
+                       series='{0: {type:\"line\"}}'))
+plot(CC)
+```
+Example of gvisComboChart with R code shown above.
+
+## Place two charts next to each other
+```{r gvisMergeExample, results='asis', echo=FALSE}
+Geo <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit', 
+                    options=list(height=300, width=350)) 
+Tbl <- gvisTable(Exports, options=list(height=300, width=200))
+plot(gvisMerge(Geo, Tbl, horizontal=TRUE))
+``````
+Example of a gvisGeoChart with gvisTable and R code hidden.
+
+## Motion Chart
+```{r MotionChartExample, results='asis', tidy=FALSE}
+M <- gvisMotionChart(Fruits, 'Fruit', 'Year',
+         options=list(width=400, height=350))
+plot(M)
+```
+Please note that the Motion Chart is only displayed when hosted on a
+web server, or is placed in a directory which has been added to the 
+trusted sources in the [security settings of Macromedia]
+(http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html). 
+See the googleVis package vignette for more details. 
+
+```{r resetOptions}
+## Set options back to original options
+options(op)
+```
+\end{verbatim}
+
+Note that you can use the \texttt{options()} command in your \knitr
+file to switch between an interactive mode, where you are likely to
+experiment, via copying and pasting R code into the console and
+running \texttt{knit} on the whole file.
+
+A more comprehensive example is given in the help file to \texttt{?plot.gvis}.
+
+\section{Using \googleVis in presentations}\label{sec:presentations}
+
+The Google Chart Tools are designed for web pages, so it should
+be no surprise that it can be difficult or impossible to embed \googleVis 
+output in traditional presentation software like MS PowerPoint\footnote{For 
+MS PowerPoint on MS Windows the plug-in
+\href{http://skp.mvps.org/liveweb.htm}{liveweb} provides the
+  functionality to insert web pages into a PowerPoint slide and
+  refresh the pages real-time during slide show.}, Google Docs,
+OpenOffice Impress or Apple Keynote. 
+
+The easiest way is to include screen shots into the slide with links to
+the live web pages. But this approach requires the presenter to switch
+between applications during her talk. This can be fun, but quite often
+it is not. 
+
+An alternative would be to build the presentation as a web page itself.  
+
+A popular approach here is the \texttt{slidify} package by Ramnath Vaidyanathan, 
+\cite{slidify} that builds on the knitr Markdown approach of the previous 
+section. An example of a \texttt{slidify} presentation is the \googleVis 
+tutorial given at the useR! conference in 2013, \cite{googleVisTutorial}.
+
+\begin{figure}[h]
+  \centering
+  \includegraphics[width=0.5\textwidth]{./figures/googleVisTutorial2013.png}
+  \caption{\googleVis tutorial at the useR! 2013 conference: \url{http://decastillo.github.io/googleVis_Tutorial}} 
+  \label{fig:slidify}
+\end{figure}
+
+Slidify provides a choice of different layout frameworks and syntax highlighting options. Additionally, slidify slides can be published from R online, e.g. 
+on GitHub.
+% 
+% \section{Using \googleVis with RStudio}
+% 
+% RStudio is popular a free and open source integrated development environment 
+% for R. With verion 0.98.441 RStudio introduced a viewer pane that allows users 
+% to display HTML files within RStudio's IDE.
+% 
+% \googleVis will use the Viewer pane in RStudio (version >= 0.98.441) 
+% to display non-Flash charts by default. Flash charts and merged gvis-objects are
+% displayed in the default browser. The setting is controlled
+% via the option \texttt{googleVis.viewer}. By default it will have
+% the value of \texttt{getOption("viewer")}.
+% 
+% Set \texttt{options("googleVis.viewer"=NULL)} and the googleVis
+% plot function will open all output in the standard browser.
+% 
+
+\section{Beyond R}
+In this section we present ideas which go beyond the usual coding in
+R and are somewhat experimental.
+
+\subsection{Registering to catch events}
+
+Google visualisations can fire and receive
+events~\footnote{\url{http://code.google.com/apis/chart/interactive/docs/reference.html\#addlistener}}. 
+It exposes the following two JavaScript methods: 
+\begin{itemize}
+\item \texttt{google.visualization.events.trigger()} fires an event,
+\item \texttt{google.visualization.events.addListener()} listens for events.
+\end{itemize}
+
+Here is an example of registering to receive the selection event from
+the Google documentation:
+\begin{verbatim}
+var table = new google.visualization.Table(document.getElementById('table_div'));
+table.draw(data, options);
+google.visualization.events.addListener(table, 'select', selectHandler);
+
+function selectHandler() {
+  alert('A table row was selected');
+}
+\end{verbatim}
+
+We will only deal with this special case of a 'select' event of the
+'addListner' method. This event is available for most visualisations
+and acts on user interactions, e.g. user selection clicks.
+
+The 'addListener' method expects JavaScript code, which can be embedded
+into a gvis-object via \texttt{options} as (undocumented) parameter
+\texttt{gvis.listener.jscode}. 
+
+Here are some examples:
+
+Look up the selected item in Wikipedia:
+<<eval=FALSE>>=
+jscode <- "window.open('http://en.wikipedia.org/wiki/' 
+                  + data.getValue(chart.getSelection()[0].row,0)); "
+
+J1 <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+                 options=list(dataMode="regions", gvis.listener.jscode=jscode))
+plot(J1)
+@ 
+In the same way we can use the code in other charts, e.g. org- or line chart:                 
+<<eval=FALSE>>=
+plot(gvisOrgChart(Regions,  options=list(gvis.listener.jscode=jscode)))
+plot(gvisLineChart(Regions[,c(1,3)], options=list(gvis.listener.jscode=jscode)))
+@
+In the following more advanced example the selected value of a table is
+displayed in a message box:
+<<eval=FALSE>>=
+jscode <- "
+       var sel = chart.getSelection();
+       var row = sel[0].row;
+       var text = data.getValue(row,1);
+       alert(text);
+"
+J2 <- gvisTable(Population, options=list(gvis.listener.jscode=jscode))
+plot(J2)
+@ 
+For more details see the \texttt{demo(EventListener)} and
+\href{https://developers.google.com/chart/interactive/docs/reference}{Google
+  Charts Reference}.
+
+\section{Frequent ask questions -- FAQ}
+\subsection{Can I use googleVis output in PDF files?}
+No, not directly. 
+
+The Google Charts API is designed for dynamic web
+output on your screen and not on paper. See also the
+section~\ref{sec:presentations}, page~\pageref{sec:presentations},
+which covers how to use \googleVis in presentations. 
+
+Note that this vignette uses screen shots to include
+examples of \googleVis charts.
+
+For further details see Google's online documentation on 
+\href{https://developers.google.com/chart/interactive/docs/printing}{printing 
+PNG charts}.
+
+\subsection{Can I change the colour of the bubbles in motion charts?}
+
+No, unfortunately not.
+
+The colours are set by the Google Charts API and cannot be changed
+by the user.
+
+\subsection{Can I change the icons in Maps?}
+
+No, not via \texttt{gvisMap}.
+
+However, you can upload your data to a Google Fusion Table and link it
+to a second table which defines the icons. See the Google Fusion Table
+support page for more details: \url{http://support.google.com/fusiontables/answer/2679986?hl=en}
+
+\subsection{Why can't I see motion charts when I open them from a local directory?}
+
+See section~\ref{sec:DisplayLocally} on page~\pageref{sec:DisplayLocally}
+
+\subsection{Why can't I see motion charts on my iPad/iPhone?}
+
+Motion charts (also geo maps and annotated time lines) are rendered in
+your browser using Flash, unlike most other charts which use
+HTML5. Unfortunately, Flash is not directly supported on iOS devices
+such as iPads and iPhones. 
+
+\subsection{How can I set axes limits with googleVis?}
+
+Unfortunately, there are no arguments such as \texttt{ylim} and \texttt{xlim}. 
+Instead, the Google Charts axes options are set via \texttt{hAxes} and 
+\texttt{vAxes}, with h and v indicating the horizontal and vertical axis. 
+More precisely, we have to set  \texttt{viewWindowMode : 'explicit'} and set 
+the \texttt{viewWindow} to the desired min and max values. 
+Additionally, we have to wrap all of this in $[\{\}]$ brackets as those 
+settings are sub-options of \texttt{h/vAxes}. 
+There are also options \texttt{minValue} and \texttt{maxValue}, 
+but they only allow you to extend the axes ranges.
+
+Here is a minimal example, setting the y-axis limits from 0 to 10:
+<<eval=FALSE>>=
+library(googleVis)
+dat <- data.frame(x=LETTERS[1:10], 
+                  y=c(0, 4, -2, 2, 4, 3, 8, 15, 10, 4))
+area1 <- gvisAreaChart(xvar="x", yvar="y", data=dat,
+    	options=list(vAxes="[{viewWindowMode:'explicit',
+			viewWindow:{min:0, max:10}}]",
+                        width=500, height=400, 
+                        title="y-limits set from 0 to 10"),
+			chartid="area1ylim")
+plot(area1)
+@
+
+\subsection{How can I change the look and feel of the charts?}
+
+The charts have a lot of options which allow you to change the look
+and feel of the output, see the help files for more details. However,
+\googleVis provides only an interface to the Google Charts API. If
+you have specific questions to the charts then please join the Google
+Visualisation API newsgroup: 
+\url{http://groups.google.com/group/google-visualization-api}.
+
+For frequent ask questions regarding the API check: 
+\url{https://developers.google.com/chart/interactive/faq}.
+
+\subsection{Is it possible to use \googleVis in corporate work?}
+Review the Google Terms of Service
+(\url{https://developers.google.com/terms/}) and get in touch with
+your colleagues in IT / Legal. If in doubt contact Google
+directly. 
+
+\subsection{Bugs and issues}
+
+Should you find any issues or bugs with googleVis, then please drop
+us a line or add them to our issues list: 
+\url{https://github.com/mages/googleVis/issues}
+
+
+\subsection{Citation}
+Please cite R and \googleVis if you use it in your work or publications. Use
+<<eval=FALSE>>=
+citation("googleVis")
+@
+and
+<<eval=FALSE>>=
+citation()
+@ 
+for  bib-entries and information on how to cite the software.
+
+%%\clearpage
+
+\bibliographystyle{alpha}
+\bibliography{googleVis}
+\addcontentsline{toc}{section}{References} 
+
+\end{document}
diff --git a/inst/doc/googleVis.pdf b/inst/doc/googleVis.pdf
new file mode 100644
index 0000000..9fcf6d6
Binary files /dev/null and b/inst/doc/googleVis.pdf differ
diff --git a/inst/doc/googleVis_examples.R b/inst/doc/googleVis_examples.R
new file mode 100644
index 0000000..b66e552
--- /dev/null
+++ b/inst/doc/googleVis_examples.R
@@ -0,0 +1,331 @@
+## ----demo, eval=FALSE----------------------------------------------------
+#  library(googleVis)
+#  demo(googleVis)
+
+## ----setOptions, message=FALSE, echo=FALSE-------------------------------
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('googleVis', 'googleVis')
+
+## ----testData, tidy=FALSE------------------------------------------------
+df=data.frame(country=c("US", "GB", "BR"), 
+              val1=c(10,13,14), 
+              val2=c(23,12,32))
+
+## ----LineChart, results='asis', tidy=FALSE-------------------------------
+Line <- gvisLineChart(df)
+plot(Line)
+
+## ----TwoAxis, results='asis', tidy=FALSE---------------------------------
+Line2 <- gvisLineChart(df, "country", c("val1","val2"),
+                       options=list(
+                         series="[{targetAxisIndex: 0},
+                                 {targetAxisIndex:1}]",
+                         vAxes="[{title:'val1'}, {title:'val2'}]"
+                       ))
+plot(Line2)
+
+## ----BarChart, results='asis', tidy=FALSE--------------------------------
+Bar <- gvisBarChart(df)
+plot(Bar)
+
+## ----ColumnChart, results='asis', tidy=FALSE-----------------------------
+Column <- gvisColumnChart(df)
+plot(Column)
+
+## ----AreaChart, results='asis', tidy=FALSE-------------------------------
+Area <- gvisAreaChart(df)
+plot(Area)
+
+## ----SteppedAreaChart, results='asis', tidy=FALSE------------------------
+SteppedArea <- gvisSteppedAreaChart(df, xvar="country", 
+                                    yvar=c("val1", "val2"),
+                                    options=list(isStacked=TRUE))
+plot(SteppedArea)
+
+## ----ComboChart, results='asis', tidy=FALSE------------------------------
+Combo <- gvisComboChart(df, xvar="country",
+                        yvar=c("val1", "val2"),
+                        options=list(seriesType="bars",
+                                     series='{1: {type:"line"}}'))
+plot(Combo)
+
+## ----ScatterChart, results='asis', tidy=FALSE----------------------------
+Scatter <- gvisScatterChart(women, 
+                            options=list(
+                              legend="none",
+                              lineWidth=2, pointSize=0,
+                              title="Women", vAxis="{title:'weight (lbs)'}",
+                              hAxis="{title:'height (in)'}", 
+                              width=300, height=300))
+plot(Scatter)
+
+## ----BubbleChart, results='asis', tidy=FALSE-----------------------------
+Bubble <- gvisBubbleChart(Fruits, idvar="Fruit", 
+                          xvar="Sales", yvar="Expenses",
+                          colorvar="Year", sizevar="Profit",
+                          options=list(
+                            hAxis='{minValue:75, maxValue:125}'))
+plot(Bubble)
+
+## ----CustomizingLines, results='asis', tidy=FALSE------------------------
+Dashed <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+                        options=list(
+                          series="[{color:'green', targetAxisIndex: 0, 
+                          lineWidth: 1, lineDashStyle: [2, 2, 20, 2, 20, 2]}, 
+                          {color: 'blue',targetAxisIndex: 1, 
+                          lineWidth: 2, lineDashStyle: [4, 1]}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]"
+                        ))
+plot(Dashed)
+
+## ----ScatterChartPoints, results='asis', tidy=FALSE----------------------
+M <- matrix(nrow=6,ncol=6)
+M[col(M)==row(M)] <- 1:6
+dat <- data.frame(X=1:6, M)
+SC <- gvisScatterChart(dat, 
+                       options=list(
+                         title="Customizing points",
+                         legend="right",
+                         pointSize=30,
+                         series="{
+                              0: { pointShape: 'circle' },
+                              1: { pointShape: 'triangle' },
+                              2: { pointShape: 'square' },
+                              3: { pointShape: 'diamond' },
+                              4: { pointShape: 'star' },
+                              5: { pointShape: 'polygon' }
+                              }"))
+plot(SC)
+
+## ----EditButton, results='asis', tidy=FALSE------------------------------
+Line4 <-  gvisLineChart(df, "country", c("val1","val2"),
+                        options=list(gvis.editor="Edit me!"))
+plot(Line4)
+
+## ----SettingOptions, results='asis', tidy=FALSE--------------------------
+Line3 <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+                        options=list(
+                          title="Hello World",
+                          titleTextStyle="{color:'red', 
+                                           fontName:'Courier', 
+                                           fontSize:16}",                         
+                          backgroundColor="#D3D3D3",                          
+                          vAxis="{gridlines:{color:'red', count:3}}",
+                          hAxis="{title:'Country', titleTextStyle:{color:'blue'}}",
+                          series="[{color:'green', targetAxisIndex: 0},	
+                                   {color: 'orange',targetAxisIndex:1}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]",
+                          legend="bottom",
+                          curveType="function",
+                          width=500,
+                          height=300                         
+                        ))
+plot(Line3)
+
+## ----CandlestickChart, results='asis', tidy=FALSE------------------------
+Candle <- gvisCandlestickChart(OpenClose, 
+                               options=list(legend='none'))
+plot(Candle)
+
+## ----PieChart, results='asis', tidy=FALSE--------------------------------
+Pie <- gvisPieChart(CityPopularity)
+plot(Pie)
+
+## ----Gauge, results='asis', tidy=FALSE-----------------------------------
+Gauge <-  gvisGauge(CityPopularity, 
+                    options=list(min=0, max=800, greenFrom=500,
+                                 greenTo=800, yellowFrom=300, yellowTo=500,
+                                 redFrom=0, redTo=300, width=400, height=300))
+plot(Gauge)
+
+## ----IntensityMap, results='asis', tidy=FALSE----------------------------
+Intensity <- gvisIntensityMap(df)
+plot(Intensity)
+
+## ----GeoChart, results='asis', tidy=FALSE--------------------------------
+Geo=gvisGeoChart(Exports, locationvar="Country", 
+                 colorvar="Profit",
+                 options=list(projection="kavrayskiy-vii"))
+plot(Geo)
+
+## ----USStateData, results='asis', tidy=FALSE-----------------------------
+require(datasets)
+states <- data.frame(state.name, state.x77)
+GeoStates <- gvisGeoChart(states, "state.name", "Illiteracy",
+                          options=list(region="US", 
+                                       displayMode="regions", 
+                                       resolution="provinces",
+                                       width=600, height=400))
+plot(GeoStates)
+
+## ----GeoChartHurricaneAndrew, results='asis', tidy=FALSE-----------------
+GeoMarker <- gvisGeoChart(Andrew, "LatLong", 
+                          sizevar='Speed_kt',
+                          colorvar="Pressure_mb", 
+                          options=list(region="US"))
+plot(GeoMarker)
+
+## ----GoogleMapHurricaneAndrew, results='asis', tidy=FALSE----------------
+AndrewMap <- gvisMap(Andrew, "LatLong" , "Tip", 
+                     options=list(showTip=TRUE, 
+                                  showLine=TRUE, 
+                                  enableScrollWheel=TRUE,
+                                  mapType='terrain', 
+                                  useMapTypeControl=TRUE))
+plot(AndrewMap)
+
+## ----Table, results='asis', tidy=FALSE-----------------------------------
+Table <- gvisTable(Stock, 
+                   formats=list(Value="#,###"))
+plot(Table)
+
+## ----TableWithPages, results='asis', tidy=FALSE--------------------------
+PopTable <- gvisTable(Population, 
+                      formats=list(Population="#,###",
+                                   '% of World Population'='#.#%'),
+                      options=list(page='enable'))
+plot(PopTable)
+
+## ----OrgChart, results='asis', tidy=FALSE--------------------------------
+Org <- gvisOrgChart(Regions, 
+                    options=list(width=600, height=250,
+                                 size='large', allowCollapse=TRUE))
+plot(Org)
+
+## ----TreeMap, results='asis', tidy=FALSE---------------------------------
+Tree <- gvisTreeMap(Regions,  
+                    "Region", "Parent", 
+                    "Val", "Fac", 
+                    options=list(fontSize=16))
+plot(Tree)
+
+## ----AnnotationChart, results='asis', tidy=FALSE-------------------------
+Anno <- gvisAnnotationChart(Stock, 
+                            datevar="Date",
+                            numvar="Value", 
+                            idvar="Device",
+                            titlevar="Title", 
+                            annotationvar="Annotation",
+                            options=list(
+                              width=600, height=350,
+                              fill=10, displayExactValues=TRUE,
+                              colors="['#0000ff','#00ff00']")
+)
+plot(Anno)
+
+## ----SankeyChart, results='asis', tidy=FALSE-----------------------------
+datSK <- data.frame(From=c(rep("A",3), rep("B", 3)),
+                    To=c(rep(c("X", "Y", "Z"),2)),
+                    Weight=c(5,7,6,2,9,4))
+
+Sankey <- gvisSankey(datSK, from="From", to="To", weight="Weight",
+                     options=list(
+                       sankey="{link: {color: { fill: '#d799ae' } },
+                            node: { color: { fill: '#a61d4c' },
+                            label: { color: '#871b47' } }}"))
+plot(Sankey)
+
+## ----Histogram, results='asis', tidy=FALSE-------------------------------
+set.seed(123)
+datHist=data.frame(A=rpois(100, 20),
+                   B=rpois(100, 5),
+                   C=rpois(100, 50))
+
+Hist <- gvisHistogram(datHist, options=list(
+  legend="{ position: 'top', maxLines: 2 }",
+  colors="['#5C3292', '#1A8763', '#871B47']",
+  width=400, height=360))
+plot(Hist)
+
+## ----CalendarChart, results='asis', tidy=FALSE---------------------------
+Cal <- gvisCalendar(Cairo, 
+                    datevar="Date", 
+                    numvar="Temp",
+                    options=list(
+                      title="Daily temperature in Cairo",
+                      height=320,
+                      calendar="{yearLabel: { fontName: 'Times-Roman',
+                               fontSize: 32, color: '#1A8763', bold: true},
+                               cellSize: 10,
+                               cellColor: { stroke: 'red', strokeOpacity: 0.2 },
+                               focusedCellColor: {stroke:'red'}}")
+)
+plot(Cal)
+
+## ----Timeline, results='asis', tidy=FALSE--------------------------------
+datTL <- data.frame(Position=c(rep("President", 3), rep("Vice", 3)),
+                    Name=c("Washington", "Adams", "Jefferson",
+                           "Adams", "Jefferson", "Burr"),
+                    start=as.Date(x=rep(c("1789-03-29", "1797-02-03", 
+                                          "1801-02-03"),2)),
+                    end=as.Date(x=rep(c("1797-02-03", "1801-02-03", 
+                                        "1809-02-03"),2)))
+
+Timeline <- gvisTimeline(data=datTL, 
+                         rowlabel="Name",
+                         barlabel="Position",
+                         start="start", 
+                         end="end",
+                         options=list(timeline="{groupByRowLabel:false}",
+                                      backgroundColor='#ffd', 
+                                      height=350,
+                                      colors="['#cbb69d', '#603913', '#c69c6e']"))
+plot(Timeline)
+
+## ----gvisMerge, results='asis', tidy=FALSE-------------------------------
+G <- gvisGeoChart(Exports, "Country", "Profit", 
+                  options=list(width=300, height=300))
+T <- gvisTable(Exports, 
+               options=list(width=220, height=300))
+
+GT <- gvisMerge(G,T, horizontal=TRUE) 
+plot(GT)
+
+## ----MotionChart, results='asis', tidy=FALSE-----------------------------
+Motion=gvisMotionChart(Fruits, 
+                       idvar="Fruit", 
+                       timevar="Year")
+plot(Motion)
+
+## ----MotionChartSettings, results='asis', tidy=FALSE---------------------
+myStateSettings <-'
+{"xZoomedDataMin":1199145600000,"colorOption":"2",
+"duration":{"timeUnit":"Y","multiplier":1},"yLambda":1,
+"yAxisOption":"4","sizeOption":"_UNISIZE",
+"iconKeySettings":[],"xLambda":1,"nonSelectedAlpha":0,
+"xZoomedDataMax":1262304000000,"iconType":"LINE",
+"dimensions":{"iconDimensions":["dim0"]},
+"showTrails":false,"uniColorForNonSelected":false,
+"xAxisOption":"_TIME","orderedByX":false,"playDuration":15000,
+"xZoomedIn":false,"time":"2010","yZoomedDataMin":0,
+"yZoomedIn":false,"orderedByY":false,"yZoomedDataMax":100}
+'
+M <- gvisMotionChart(Fruits, "Fruit", "Year", options=list(state=myStateSettings))
+plot(M)
+
+
+## See demo(package='googleVis') for other available demos.
+
+## ----GeoMap, results='asis', tidy=FALSE----------------------------------
+AndrewGeo <- gvisGeoMap(Andrew, 
+                        locationvar="LatLong", 
+                        numvar="Speed_kt", 
+                        hovervar="Category", 
+                        options=list(height=350, 
+                                     region="US", 
+                                     dataMode="markers"))
+plot(AndrewGeo)
+
+## ----AnnotatedTimeLine, results='asis', tidy=FALSE-----------------------
+AnnoTimeLine  <- gvisAnnotatedTimeLine(Stock, 
+                                       datevar="Date",
+                                       numvar="Value", 
+                                       idvar="Device",
+                                       titlevar="Title", 
+                                       annotationvar="Annotation",
+                                       options=list(displayAnnotations=TRUE,
+                                                    width="600px", height="350px"))
+plot(AnnoTimeLine)
+
diff --git a/inst/doc/googleVis_examples.Rmd b/inst/doc/googleVis_examples.Rmd
new file mode 100644
index 0000000..629af3e
--- /dev/null
+++ b/inst/doc/googleVis_examples.Rmd
@@ -0,0 +1,184 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Demonstration of googleVis}
+-->
+# googleVis examples 
+===========================================
+
+It may take a little while to load all charts. Please be patient.
+All charts require an Internet connection.
+
+These examples are taken from the googleVis demo. 
+You can execute the demo via
+```{r demo, eval=FALSE}
+library(googleVis)
+demo(googleVis)
+```
+
+For more details about the charts and further examples see the 
+helpfiles of the individual googleVis function and review the 
+[Google Charts API documentation](https://developers.google.com/chart/interactive/docs/gallery) and [Terms of Service](https://developers.google.com/terms).
+
+## Line chart
+```{r setOptions, message=FALSE, echo=FALSE}
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('googleVis', 'googleVis')
+```
+```{r testData, tidy=FALSE}
+```
+```{r LineChart, results='asis', tidy=FALSE}
+```
+
+### Line chart with two axis
+```{r TwoAxis, results='asis', tidy=FALSE}
+```
+
+## Bar chart
+```{r BarChart, results='asis', tidy=FALSE}
+```
+
+## Column chart
+```{r ColumnChart, results='asis', tidy=FALSE}
+```
+
+## Area chart
+```{r AreaChart, results='asis', tidy=FALSE}
+```
+
+## Stepped Area chart
+```{r SteppedAreaChart, results='asis', tidy=FALSE}
+```
+
+## Combo chart
+```{r ComboChart, results='asis', tidy=FALSE}
+```
+
+## Scatter chart
+```{r ScatterChart, results='asis', tidy=FALSE}
+```
+
+## Bubble chart
+```{r BubbleChart, results='asis', tidy=FALSE}
+```
+
+### Customizing Lines
+```{r CustomizingLines, results='asis', tidy=FALSE}
+```
+
+
+## Customizing points
+```{r ScatterChartPoints, results='asis', tidy=FALSE}
+```
+
+### Add edit button for on the fly customisation
+```{r EditButton, results='asis', tidy=FALSE}
+```
+The same option is available for all other charts as well.
+
+### A chart with many options set
+```{r SettingOptions, results='asis', tidy=FALSE}
+```
+
+## Candlestick chart
+```{r CandlestickChart, results='asis', tidy=FALSE}
+```
+
+## Pie chart
+```{r PieChart, results='asis', tidy=FALSE}
+```
+
+## Gauge
+```{r Gauge, results='asis', tidy=FALSE}
+```
+
+## Intensity Map
+```{r IntensityMap, results='asis', tidy=FALSE}
+```
+
+## Geo Chart
+```{r GeoChart, results='asis', tidy=FALSE}
+```
+
+### Example showing US data by state 
+```{r USStateData, results='asis', tidy=FALSE}
+```
+
+### Show Hurricane Andrew (1992) storm track with markers
+```{r GeoChartHurricaneAndrew, results='asis', tidy=FALSE}
+```
+
+## Google Maps
+```{r GoogleMapHurricaneAndrew, results='asis', tidy=FALSE}
+```
+
+## Table
+```{r Table, results='asis', tidy=FALSE}
+```
+Click on the column header to sort the rows 
+
+### Table with pages
+```{r TableWithPages, results='asis', tidy=FALSE}
+```
+
+## Org chart
+```{r OrgChart, results='asis', tidy=FALSE}
+```
+Double click on a parent to collapse all its children.
+
+## Tree Map 
+```{r TreeMap, results='asis', tidy=FALSE}
+```
+Left mouse-click to drill down, right mouse-click to move up a level.
+
+## Annotation chart 
+```{r AnnotationChart, results='asis', tidy=FALSE}
+```
+
+## Sankey chart
+```{r SankeyChart, results='asis', tidy=FALSE}
+```
+
+## Histogram
+```{r Histogram, results='asis', tidy=FALSE}
+```
+
+## Calendar chart
+```{r CalendarChart, results='asis', tidy=FALSE}
+```
+
+## Timeline chart
+```{r Timeline, results='asis', tidy=FALSE}
+```
+
+## Merging charts
+```{r gvisMerge, results='asis', tidy=FALSE}
+```
+
+# Flash charts
+All the following charts require a Flash player. 
+
+## Motion chart
+```{r MotionChart, results='asis', tidy=FALSE}
+```
+
+You can change some of displaying settings via the browser,
+e.g. the level of opacity of non-selected items, or the chart type.
+The state string from the 'Advanced' tab can be used to set those
+settings via R. Just copy and past the string from the browser into
+the argument state of the options list.
+Here is an example of a motion chart, with an initial line chart
+displayed. 
+
+```{r MotionChartSettings, results='asis', tidy=FALSE}
+```
+
+
+## Geo Map
+```{r GeoMap, results='asis', tidy=FALSE}
+```
+
+## Annotated time line chart
+```{r AnnotatedTimeLine, results='asis', tidy=FALSE}
+```
diff --git a/inst/doc/googleVis_examples.html b/inst/doc/googleVis_examples.html
new file mode 100644
index 0000000..a9fb361
--- /dev/null
+++ b/inst/doc/googleVis_examples.html
@@ -0,0 +1,12741 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title>googleVis examples</title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
+
+<!-- Styles for R syntax highlighter -->
+<style type="text/css">
+   pre .operator,
+   pre .paren {
+     color: rgb(104, 118, 135)
+   }
+
+   pre .literal {
+     color: #990073
+   }
+
+   pre .number {
+     color: #099;
+   }
+
+   pre .comment {
+     color: #998;
+     font-style: italic
+   }
+
+   pre .keyword {
+     color: #900;
+     font-weight: bold
+   }
+
+   pre .identifier {
+     color: rgb(0, 0, 0);
+   }
+
+   pre .string {
+     color: #d14;
+   }
+</style>
+
+<!-- R syntax highlighter -->
+<script type="text/javascript">
+var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/</gm,"<")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.chi [...]
+hljs.initHighlightingOnLoad();
+</script>
+
+
+
+<style type="text/css">
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+ at media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}
+</style>
+
+
+
+</head>
+
+<body>
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Demonstration of googleVis}
+-->
+
+<h1>googleVis examples</h1>
+
+<h1></h1>
+
+<p>It may take a little while to load all charts. Please be patient.
+All charts require an Internet connection.</p>
+
+<p>These examples are taken from the googleVis demo. 
+You can execute the demo via</p>
+
+<pre><code class="r">library(googleVis)
+demo(googleVis)
+</code></pre>
+
+<p>For more details about the charts and further examples see the 
+helpfiles of the individual googleVis function and review the 
+<a href="https://developers.google.com/chart/interactive/docs/gallery">Google Charts API documentation</a> and <a href="https://developers.google.com/terms">Terms of Service</a>.</p>
+
+<h2>Line chart</h2>
+
+<pre><code class="r">df=data.frame(country=c("US", "GB", "BR"), 
+              val1=c(10,13,14), 
+              val2=c(23,12,32))
+</code></pre>
+
+<pre><code class="r">Line <- gvisLineChart(df)
+plot(Line)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e0377be1c63 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e0377be1c63() {
+var data = gvisDataLineChartID12e0377be1c63();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e0377be1c63')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e0377be1c63);
+})();
+function displayChartLineChartID12e0377be1c63() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e0377be1c63"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e0377be1c63" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h3>Line chart with two axis</h3>
+
+<pre><code class="r">Line2 <- gvisLineChart(df, "country", c("val1","val2"),
+                       options=list(
+                         series="[{targetAxisIndex: 0},
+                                 {targetAxisIndex:1}]",
+                         vAxes="[{title:'val1'}, {title:'val2'}]"
+                       ))
+plot(Line2)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e0346e953ba () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e0346e953ba() {
+var data = gvisDataLineChartID12e0346e953ba();
+var options = {};
+options["allowHtml"] = true;
+options["series"] = [{targetAxisIndex: 0},
+                                 {targetAxisIndex:1}];
+options["vAxes"] = [{title:'val1'}, {title:'val2'}];
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e0346e953ba')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e0346e953ba);
+})();
+function displayChartLineChartID12e0346e953ba() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e0346e953ba"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e0346e953ba" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Bar chart</h2>
+
+<pre><code class="r">Bar <- gvisBarChart(df)
+plot(Bar)
+</code></pre>
+
+<!-- BarChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataBarChartID12e03456fcf50 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartBarChartID12e03456fcf50() {
+var data = gvisDataBarChartID12e03456fcf50();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.BarChart(
+    document.getElementById('BarChartID12e03456fcf50')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartBarChartID12e03456fcf50);
+})();
+function displayChartBarChartID12e03456fcf50() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartBarChartID12e03456fcf50"></script>
+ 
+
+<!-- divChart -->
+
+<div id="BarChartID12e03456fcf50" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Column chart</h2>
+
+<pre><code class="r">Column <- gvisColumnChart(df)
+plot(Column)
+</code></pre>
+
+<!-- ColumnChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataColumnChartID12e0393c7b22 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartColumnChartID12e0393c7b22() {
+var data = gvisDataColumnChartID12e0393c7b22();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.ColumnChart(
+    document.getElementById('ColumnChartID12e0393c7b22')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartColumnChartID12e0393c7b22);
+})();
+function displayChartColumnChartID12e0393c7b22() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartColumnChartID12e0393c7b22"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ColumnChartID12e0393c7b22" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Area chart</h2>
+
+<pre><code class="r">Area <- gvisAreaChart(df)
+plot(Area)
+</code></pre>
+
+<!-- AreaChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataAreaChartID12e037578a3c4 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartAreaChartID12e037578a3c4() {
+var data = gvisDataAreaChartID12e037578a3c4();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.AreaChart(
+    document.getElementById('AreaChartID12e037578a3c4')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartAreaChartID12e037578a3c4);
+})();
+function displayChartAreaChartID12e037578a3c4() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartAreaChartID12e037578a3c4"></script>
+ 
+
+<!-- divChart -->
+
+<div id="AreaChartID12e037578a3c4" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Stepped Area chart</h2>
+
+<pre><code class="r">SteppedArea <- gvisSteppedAreaChart(df, xvar="country", 
+                                    yvar=c("val1", "val2"),
+                                    options=list(isStacked=TRUE))
+plot(SteppedArea)
+</code></pre>
+
+<!-- SteppedAreaChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataSteppedAreaChartID12e0320f843c6 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartSteppedAreaChartID12e0320f843c6() {
+var data = gvisDataSteppedAreaChartID12e0320f843c6();
+var options = {};
+options["allowHtml"] = true;
+options["isStacked"] = true;
+
+    var chart = new google.visualization.SteppedAreaChart(
+    document.getElementById('SteppedAreaChartID12e0320f843c6')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartSteppedAreaChartID12e0320f843c6);
+})();
+function displayChartSteppedAreaChartID12e0320f843c6() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartSteppedAreaChartID12e0320f843c6"></script>
+ 
+
+<!-- divChart -->
+
+<div id="SteppedAreaChartID12e0320f843c6" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Combo chart</h2>
+
+<pre><code class="r">Combo <- gvisComboChart(df, xvar="country",
+                        yvar=c("val1", "val2"),
+                        options=list(seriesType="bars",
+                                     series='{1: {type:"line"}}'))
+plot(Combo)
+</code></pre>
+
+<!-- ComboChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataComboChartID12e0354ece01e () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartComboChartID12e0354ece01e() {
+var data = gvisDataComboChartID12e0354ece01e();
+var options = {};
+options["allowHtml"] = true;
+options["seriesType"] = "bars";
+options["series"] = {1: {type:"line"}};
+
+    var chart = new google.visualization.ComboChart(
+    document.getElementById('ComboChartID12e0354ece01e')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartComboChartID12e0354ece01e);
+})();
+function displayChartComboChartID12e0354ece01e() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartComboChartID12e0354ece01e"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ComboChartID12e0354ece01e" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Scatter chart</h2>
+
+<pre><code class="r">Scatter <- gvisScatterChart(women, 
+                            options=list(
+                              legend="none",
+                              lineWidth=2, pointSize=0,
+                              title="Women", vAxis="{title:'weight (lbs)'}",
+                              hAxis="{title:'height (in)'}", 
+                              width=300, height=300))
+plot(Scatter)
+</code></pre>
+
+<!-- ScatterChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataScatterChartID12e0362058763 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+58,
+115
+],
+[
+59,
+117
+],
+[
+60,
+120
+],
+[
+61,
+123
+],
+[
+62,
+126
+],
+[
+63,
+129
+],
+[
+64,
+132
+],
+[
+65,
+135
+],
+[
+66,
+139
+],
+[
+67,
+142
+],
+[
+68,
+146
+],
+[
+69,
+150
+],
+[
+70,
+154
+],
+[
+71,
+159
+],
+[
+72,
+164
+] 
+];
+data.addColumn('number','height');
+data.addColumn('number','weight');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartScatterChartID12e0362058763() {
+var data = gvisDataScatterChartID12e0362058763();
+var options = {};
+options["allowHtml"] = true;
+options["legend"] = "none";
+options["lineWidth"] = 2;
+options["pointSize"] = 0;
+options["title"] = "Women";
+options["vAxis"] = {title:'weight (lbs)'};
+options["hAxis"] = {title:'height (in)'};
+options["width"] = 300;
+options["height"] = 300;
+
+    var chart = new google.visualization.ScatterChart(
+    document.getElementById('ScatterChartID12e0362058763')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartScatterChartID12e0362058763);
+})();
+function displayChartScatterChartID12e0362058763() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartScatterChartID12e0362058763"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ScatterChartID12e0362058763" 
+  style="width: 300; height: 300;">
+</div>
+
+<h2>Bubble chart</h2>
+
+<pre><code class="r">Bubble <- gvisBubbleChart(Fruits, idvar="Fruit", 
+                          xvar="Sales", yvar="Expenses",
+                          colorvar="Year", sizevar="Profit",
+                          options=list(
+                            hAxis='{minValue:75, maxValue:125}'))
+plot(Bubble)
+</code></pre>
+
+<!-- BubbleChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataBubbleChartID12e037187a180 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Apples",
+98,
+78,
+"2008",
+20
+],
+[
+"Apples",
+111,
+79,
+"2009",
+32
+],
+[
+"Apples",
+89,
+76,
+"2010",
+13
+],
+[
+"Oranges",
+96,
+81,
+"2008",
+15
+],
+[
+"Bananas",
+85,
+76,
+"2008",
+9
+],
+[
+"Oranges",
+93,
+80,
+"2009",
+13
+],
+[
+"Bananas",
+94,
+78,
+"2009",
+16
+],
+[
+"Oranges",
+98,
+91,
+"2010",
+7
+],
+[
+"Bananas",
+81,
+71,
+"2010",
+10
+] 
+];
+data.addColumn('string','Fruit');
+data.addColumn('number','Sales');
+data.addColumn('number','Expenses');
+data.addColumn('string','Year');
+data.addColumn('number','Profit');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartBubbleChartID12e037187a180() {
+var data = gvisDataBubbleChartID12e037187a180();
+var options = {};
+options["hAxis"] = {minValue:75, maxValue:125};
+
+    var chart = new google.visualization.BubbleChart(
+    document.getElementById('BubbleChartID12e037187a180')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartBubbleChartID12e037187a180);
+})();
+function displayChartBubbleChartID12e037187a180() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartBubbleChartID12e037187a180"></script>
+ 
+
+<!-- divChart -->
+
+<div id="BubbleChartID12e037187a180" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h3>Customizing Lines</h3>
+
+<pre><code class="r">Dashed <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+                        options=list(
+                          series="[{color:'green', targetAxisIndex: 0, 
+                          lineWidth: 1, lineDashStyle: [2, 2, 20, 2, 20, 2]}, 
+                          {color: 'blue',targetAxisIndex: 1, 
+                          lineWidth: 2, lineDashStyle: [4, 1]}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]"
+                        ))
+plot(Dashed)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e032b3500b9 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e032b3500b9() {
+var data = gvisDataLineChartID12e032b3500b9();
+var options = {};
+options["allowHtml"] = true;
+options["series"] = [{color:'green', targetAxisIndex: 0, 
+                          lineWidth: 1, lineDashStyle: [2, 2, 20, 2, 20, 2]}, 
+                          {color: 'blue',targetAxisIndex: 1, 
+                          lineWidth: 2, lineDashStyle: [4, 1]}];
+options["vAxes"] = [{title:'val1'}, {title:'val2'}];
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e032b3500b9')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e032b3500b9);
+})();
+function displayChartLineChartID12e032b3500b9() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e032b3500b9"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e032b3500b9" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Customizing points</h2>
+
+<pre><code class="r">M <- matrix(nrow=6,ncol=6)
+M[col(M)==row(M)] <- 1:6
+dat <- data.frame(X=1:6, M)
+SC <- gvisScatterChart(dat, 
+                       options=list(
+                         title="Customizing points",
+                         legend="right",
+                         pointSize=30,
+                         series="{
+                              0: { pointShape: 'circle' },
+                              1: { pointShape: 'triangle' },
+                              2: { pointShape: 'square' },
+                              3: { pointShape: 'diamond' },
+                              4: { pointShape: 'star' },
+                              5: { pointShape: 'polygon' }
+                              }"))
+plot(SC)
+</code></pre>
+
+<!-- ScatterChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataScatterChartID12e035f6488c2 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+1,
+1,
+null,
+null,
+null,
+null,
+null
+],
+[
+2,
+null,
+2,
+null,
+null,
+null,
+null
+],
+[
+3,
+null,
+null,
+3,
+null,
+null,
+null
+],
+[
+4,
+null,
+null,
+null,
+4,
+null,
+null
+],
+[
+5,
+null,
+null,
+null,
+null,
+5,
+null
+],
+[
+6,
+null,
+null,
+null,
+null,
+null,
+6
+] 
+];
+data.addColumn('number','X');
+data.addColumn('number','X1');
+data.addColumn('number','X2');
+data.addColumn('number','X3');
+data.addColumn('number','X4');
+data.addColumn('number','X5');
+data.addColumn('number','X6');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartScatterChartID12e035f6488c2() {
+var data = gvisDataScatterChartID12e035f6488c2();
+var options = {};
+options["allowHtml"] = true;
+options["title"] = "Customizing points";
+options["legend"] = "right";
+options["pointSize"] = 30;
+options["series"] = {
+                              0: { pointShape: 'circle' },
+                              1: { pointShape: 'triangle' },
+                              2: { pointShape: 'square' },
+                              3: { pointShape: 'diamond' },
+                              4: { pointShape: 'star' },
+                              5: { pointShape: 'polygon' }
+                              };
+
+    var chart = new google.visualization.ScatterChart(
+    document.getElementById('ScatterChartID12e035f6488c2')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartScatterChartID12e035f6488c2);
+})();
+function displayChartScatterChartID12e035f6488c2() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartScatterChartID12e035f6488c2"></script>
+ 
+
+<!-- divChart -->
+
+<div id="ScatterChartID12e035f6488c2" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h3>Add edit button for on the fly customisation</h3>
+
+<pre><code class="r">Line4 <-  gvisLineChart(df, "country", c("val1","val2"),
+                        options=list(gvis.editor="Edit me!"))
+plot(Line4)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e031358ebbc () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e031358ebbc() {
+var data = gvisDataLineChartID12e031358ebbc();
+var options = {};
+options["allowHtml"] = true;
+
+    chartLineChartID12e031358ebbc = new google.visualization.ChartWrapper({
+    dataTable: data,       
+    chartType: 'LineChart',
+    containerId: 'LineChartID12e031358ebbc',
+    options: options
+    });
+    chartLineChartID12e031358ebbc.draw();
+    
+
+}
+
+  function openEditorLineChartID12e031358ebbc() {
+  var editor = new google.visualization.ChartEditor();
+  google.visualization.events.addListener(editor, 'ok',
+  function() { 
+  chartLineChartID12e031358ebbc = editor.getChartWrapper();  
+  chartLineChartID12e031358ebbc.draw(document.getElementById('LineChartID12e031358ebbc')); 
+  }); 
+  editor.openDialog(chartLineChartID12e031358ebbc);
+  }
+    
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "charteditor";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e031358ebbc);
+})();
+function displayChartLineChartID12e031358ebbc() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e031358ebbc"></script>
+ 
+
+<!-- divChart -->
+
+<p><input type='button' onclick='openEditorLineChartID12e031358ebbc()' value='Edit me!'/>  </p>
+
+<div id="LineChartID12e031358ebbc" 
+  style="width: 500; height: automatic;">
+</div>
+
+<p>The same option is available for all other charts as well.</p>
+
+<h3>A chart with many options set</h3>
+
+<pre><code class="r">Line3 <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+                        options=list(
+                          title="Hello World",
+                          titleTextStyle="{color:'red', 
+                                           fontName:'Courier', 
+                                           fontSize:16}",                         
+                          backgroundColor="#D3D3D3",                          
+                          vAxis="{gridlines:{color:'red', count:3}}",
+                          hAxis="{title:'Country', titleTextStyle:{color:'blue'}}",
+                          series="[{color:'green', targetAxisIndex: 0}, 
+                                   {color: 'orange',targetAxisIndex:1}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]",
+                          legend="bottom",
+                          curveType="function",
+                          width=500,
+                          height=300                         
+                        ))
+plot(Line3)
+</code></pre>
+
+<!-- LineChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataLineChartID12e032dd20306 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartLineChartID12e032dd20306() {
+var data = gvisDataLineChartID12e032dd20306();
+var options = {};
+options["allowHtml"] = true;
+options["title"] = "Hello World";
+options["titleTextStyle"] = {color:'red', 
+                                           fontName:'Courier', 
+                                           fontSize:16};
+options["backgroundColor"] = "#D3D3D3";
+options["vAxis"] = {gridlines:{color:'red', count:3}};
+options["hAxis"] = {title:'Country', titleTextStyle:{color:'blue'}};
+options["series"] = [{color:'green', targetAxisIndex: 0},   
+                                   {color: 'orange',targetAxisIndex:1}];
+options["vAxes"] = [{title:'val1'}, {title:'val2'}];
+options["legend"] = "bottom";
+options["curveType"] = "function";
+options["width"] = 500;
+options["height"] = 300;
+
+    var chart = new google.visualization.LineChart(
+    document.getElementById('LineChartID12e032dd20306')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartLineChartID12e032dd20306);
+})();
+function displayChartLineChartID12e032dd20306() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartLineChartID12e032dd20306"></script>
+ 
+
+<!-- divChart -->
+
+<div id="LineChartID12e032dd20306" 
+  style="width: 500; height: 300;">
+</div>
+
+<h2>Candlestick chart</h2>
+
+<pre><code class="r">Candle <- gvisCandlestickChart(OpenClose, 
+                               options=list(legend='none'))
+plot(Candle)
+</code></pre>
+
+<!-- CandlestickChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataCandlestickChartID12e03246f253d () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Mon",
+20,
+28,
+38,
+45
+],
+[
+"Tues",
+31,
+38,
+55,
+66
+],
+[
+"Wed",
+50,
+55,
+77,
+80
+],
+[
+"Thurs",
+50,
+77,
+66,
+77
+],
+[
+"Fri",
+15,
+66,
+22,
+68
+] 
+];
+data.addColumn('string','Weekday');
+data.addColumn('number','Low');
+data.addColumn('number','Open');
+data.addColumn('number','Close');
+data.addColumn('number','High');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartCandlestickChartID12e03246f253d() {
+var data = gvisDataCandlestickChartID12e03246f253d();
+var options = {};
+options["allowHtml"] = true;
+options["legend"] = "none";
+
+    var chart = new google.visualization.CandlestickChart(
+    document.getElementById('CandlestickChartID12e03246f253d')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartCandlestickChartID12e03246f253d);
+})();
+function displayChartCandlestickChartID12e03246f253d() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartCandlestickChartID12e03246f253d"></script>
+ 
+
+<!-- divChart -->
+
+<div id="CandlestickChartID12e03246f253d" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Pie chart</h2>
+
+<pre><code class="r">Pie <- gvisPieChart(CityPopularity)
+plot(Pie)
+</code></pre>
+
+<!-- PieChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataPieChartID12e0370dabfad () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"New York",
+200,
+450
+],
+[
+"Boston",
+300,
+450
+],
+[
+"Miami",
+400,
+450
+],
+[
+"Chicago",
+500,
+450
+],
+[
+"Los Angeles",
+600,
+450
+],
+[
+"Houston",
+700,
+450
+] 
+];
+data.addColumn('string','City');
+data.addColumn('number','Popularity');
+data.addColumn('number','Mean');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartPieChartID12e0370dabfad() {
+var data = gvisDataPieChartID12e0370dabfad();
+var options = {};
+options["allowHtml"] = true;
+
+    var chart = new google.visualization.PieChart(
+    document.getElementById('PieChartID12e0370dabfad')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartPieChartID12e0370dabfad);
+})();
+function displayChartPieChartID12e0370dabfad() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartPieChartID12e0370dabfad"></script>
+ 
+
+<!-- divChart -->
+
+<div id="PieChartID12e0370dabfad" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Gauge</h2>
+
+<pre><code class="r">Gauge <-  gvisGauge(CityPopularity, 
+                    options=list(min=0, max=800, greenFrom=500,
+                                 greenTo=800, yellowFrom=300, yellowTo=500,
+                                 redFrom=0, redTo=300, width=400, height=300))
+plot(Gauge)
+</code></pre>
+
+<!-- Gauge generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataGaugeID12e0366d1dd82 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"New York",
+200,
+450
+],
+[
+"Boston",
+300,
+450
+],
+[
+"Miami",
+400,
+450
+],
+[
+"Chicago",
+500,
+450
+],
+[
+"Los Angeles",
+600,
+450
+],
+[
+"Houston",
+700,
+450
+] 
+];
+data.addColumn('string','City');
+data.addColumn('number','Popularity');
+data.addColumn('number','Mean');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartGaugeID12e0366d1dd82() {
+var data = gvisDataGaugeID12e0366d1dd82();
+var options = {};
+options["allowHtml"] = true;
+options["min"] = 0;
+options["max"] = 800;
+options["greenFrom"] = 500;
+options["greenTo"] = 800;
+options["yellowFrom"] = 300;
+options["yellowTo"] = 500;
+options["redFrom"] = 0;
+options["redTo"] = 300;
+options["width"] = 400;
+options["height"] = 300;
+
+    var chart = new google.visualization.Gauge(
+    document.getElementById('GaugeID12e0366d1dd82')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "gauge";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartGaugeID12e0366d1dd82);
+})();
+function displayChartGaugeID12e0366d1dd82() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartGaugeID12e0366d1dd82"></script>
+ 
+
+<!-- divChart -->
+
+<div id="GaugeID12e0366d1dd82" 
+  style="width: 400; height: 300;">
+</div>
+
+<h2>Intensity Map</h2>
+
+<pre><code class="r">Intensity <- gvisIntensityMap(df)
+plot(Intensity)
+</code></pre>
+
+<!-- IntensityMap generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataIntensityMapID12e032ff34d49 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"US",
+10,
+23
+],
+[
+"GB",
+13,
+12
+],
+[
+"BR",
+14,
+32
+] 
+];
+data.addColumn('string','country');
+data.addColumn('number','val1');
+data.addColumn('number','val2');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartIntensityMapID12e032ff34d49() {
+var data = gvisDataIntensityMapID12e032ff34d49();
+var options = {};
+options["width"] = 600;
+
+    var chart = new google.visualization.IntensityMap(
+    document.getElementById('IntensityMapID12e032ff34d49')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "intensitymap";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartIntensityMapID12e032ff34d49);
+})();
+function displayChartIntensityMapID12e032ff34d49() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartIntensityMapID12e032ff34d49"></script>
+ 
+
+<!-- divChart -->
+
+<div id="IntensityMapID12e032ff34d49" 
+  style="width: 600; height: automatic;">
+</div>
+
+<h2>Geo Chart</h2>
+
+<pre><code class="r">Geo=gvisGeoChart(Exports, locationvar="Country", 
+                 colorvar="Profit",
+                 options=list(projection="kavrayskiy-vii"))
+plot(Geo)
+</code></pre>
+
+<!-- GeoChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataGeoChartID12e0374e2f63b () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Germany",
+3
+],
+[
+"Brazil",
+4
+],
+[
+"United States",
+5
+],
+[
+"France",
+4
+],
+[
+"Hungary",
+3
+],
+[
+"India",
+2
+],
+[
+"Iceland",
+1
+],
+[
+"Norway",
+4
+],
+[
+"Spain",
+5
+],
+[
+"Turkey",
+1
+] 
+];
+data.addColumn('string','Country');
+data.addColumn('number','Profit');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartGeoChartID12e0374e2f63b() {
+var data = gvisDataGeoChartID12e0374e2f63b();
+var options = {};
+options["width"] = 556;
+options["height"] = 347;
+options["projection"] = "kavrayskiy-vii";
+
+    var chart = new google.visualization.GeoChart(
+    document.getElementById('GeoChartID12e0374e2f63b')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "geochart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartGeoChartID12e0374e2f63b);
+})();
+function displayChartGeoChartID12e0374e2f63b() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartGeoChartID12e0374e2f63b"></script>
+ 
+
+<!-- divChart -->
+
+<div id="GeoChartID12e0374e2f63b" 
+  style="width: 556; height: 347;">
+</div>
+
+<h3>Example showing US data by state</h3>
+
+<pre><code class="r">require(datasets)
+states <- data.frame(state.name, state.x77)
+GeoStates <- gvisGeoChart(states, "state.name", "Illiteracy",
+                          options=list(region="US", 
+                                       displayMode="regions", 
+                                       resolution="provinces",
+                                       width=600, height=400))
+plot(GeoStates)
+</code></pre>
+
+<!-- GeoChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataGeoChartID12e03a252b99 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Alabama",
+2.1
+],
+[
+"Alaska",
+1.5
+],
+[
+"Arizona",
+1.8
+],
+[
+"Arkansas",
+1.9
+],
+[
+"California",
+1.1
+],
+[
+"Colorado",
+0.7
+],
+[
+"Connecticut",
+1.1
+],
+[
+"Delaware",
+0.9
+],
+[
+"Florida",
+1.3
+],
+[
+"Georgia",
+2
+],
+[
+"Hawaii",
+1.9
+],
+[
+"Idaho",
+0.6
+],
+[
+"Illinois",
+0.9
+],
+[
+"Indiana",
+0.7
+],
+[
+"Iowa",
+0.5
+],
+[
+"Kansas",
+0.6
+],
+[
+"Kentucky",
+1.6
+],
+[
+"Louisiana",
+2.8
+],
+[
+"Maine",
+0.7
+],
+[
+"Maryland",
+0.9
+],
+[
+"Massachusetts",
+1.1
+],
+[
+"Michigan",
+0.9
+],
+[
+"Minnesota",
+0.6
+],
+[
+"Mississippi",
+2.4
+],
+[
+"Missouri",
+0.8
+],
+[
+"Montana",
+0.6
+],
+[
+"Nebraska",
+0.6
+],
+[
+"Nevada",
+0.5
+],
+[
+"New Hampshire",
+0.7
+],
+[
+"New Jersey",
+1.1
+],
+[
+"New Mexico",
+2.2
+],
+[
+"New York",
+1.4
+],
+[
+"North Carolina",
+1.8
+],
+[
+"North Dakota",
+0.8
+],
+[
+"Ohio",
+0.8
+],
+[
+"Oklahoma",
+1.1
+],
+[
+"Oregon",
+0.6
+],
+[
+"Pennsylvania",
+1
+],
+[
+"Rhode Island",
+1.3
+],
+[
+"South Carolina",
+2.3
+],
+[
+"South Dakota",
+0.5
+],
+[
+"Tennessee",
+1.7
+],
+[
+"Texas",
+2.2
+],
+[
+"Utah",
+0.6
+],
+[
+"Vermont",
+0.6
+],
+[
+"Virginia",
+1.4
+],
+[
+"Washington",
+0.6
+],
+[
+"West Virginia",
+1.4
+],
+[
+"Wisconsin",
+0.7
+],
+[
+"Wyoming",
+0.6
+] 
+];
+data.addColumn('string','state.name');
+data.addColumn('number','Illiteracy');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartGeoChartID12e03a252b99() {
+var data = gvisDataGeoChartID12e03a252b99();
+var options = {};
+options["width"] = 600;
+options["height"] = 400;
+options["region"] = "US";
+options["displayMode"] = "regions";
+options["resolution"] = "provinces";
+
+    var chart = new google.visualization.GeoChart(
+    document.getElementById('GeoChartID12e03a252b99')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "geochart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartGeoChartID12e03a252b99);
+})();
+function displayChartGeoChartID12e03a252b99() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartGeoChartID12e03a252b99"></script>
+ 
+
+<!-- divChart -->
+
+<div id="GeoChartID12e03a252b99" 
+  style="width: 600; height: 400;">
+</div>
+
+<h3>Show Hurricane Andrew (1992) storm track with markers</h3>
+
+<pre><code class="r">GeoMarker <- gvisGeoChart(Andrew, "LatLong", 
+                          sizevar='Speed_kt',
+                          colorvar="Pressure_mb", 
+                          options=list(region="US"))
+plot(GeoMarker)
+</code></pre>
+
+<!-- GeoChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataGeoChartID12e037c1a554c () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+10.8,
+-35.5,
+1010,
+25
+],
+[
+11.2,
+-37.4,
+1009,
+30
+],
+[
+11.7,
+-39.6,
+1008,
+30
+],
+[
+12.3,
+-42,
+1006,
+35
+],
+[
+13.1,
+-44.2,
+1003,
+35
+],
+[
+13.6,
+-46.2,
+1002,
+40
+],
+[
+14.1,
+-48,
+1001,
+45
+],
+[
+14.6,
+-49.9,
+1000,
+45
+],
+[
+15.4,
+-51.8,
+1000,
+45
+],
+[
+16.3,
+-53.5,
+1001,
+45
+],
+[
+17.2,
+-55.3,
+1002,
+45
+],
+[
+18,
+-56.9,
+1005,
+45
+],
+[
+18.8,
+-58.3,
+1007,
+45
+],
+[
+19.8,
+-59.3,
+1011,
+40
+],
+[
+20.7,
+-60,
+1013,
+40
+],
+[
+21.7,
+-60.7,
+1015,
+40
+],
+[
+22.5,
+-61.5,
+1014,
+40
+],
+[
+23.2,
+-62.4,
+1014,
+45
+],
+[
+23.9,
+-63.3,
+1010,
+45
+],
+[
+24.4,
+-64.2,
+1007,
+50
+],
+[
+24.8,
+-64.9,
+1004,
+50
+],
+[
+25.3,
+-65.9,
+1000,
+55
+],
+[
+25.6,
+-67,
+994,
+60
+],
+[
+25.8,
+-68.3,
+981,
+70
+],
+[
+25.7,
+-69.7,
+969,
+80
+],
+[
+25.6,
+-71.1,
+961,
+90
+],
+[
+25.5,
+-72.5,
+947,
+105
+],
+[
+25.4,
+-74.2,
+933,
+120
+],
+[
+25.4,
+-75.8,
+922,
+135
+],
+[
+25.4,
+-77.5,
+930,
+125
+],
+[
+25.4,
+-79.3,
+937,
+120
+],
+[
+25.6,
+-81.2,
+951,
+110
+],
+[
+25.8,
+-83.1,
+947,
+115
+],
+[
+26.2,
+-85,
+943,
+115
+],
+[
+26.6,
+-86.7,
+948,
+115
+],
+[
+27.2,
+-88.2,
+946,
+115
+],
+[
+27.8,
+-89.6,
+941,
+120
+],
+[
+28.5,
+-90.5,
+937,
+120
+],
+[
+29.2,
+-91.3,
+955,
+115
+],
+[
+30.1,
+-91.7,
+973,
+80
+],
+[
+30.9,
+-91.6,
+991,
+50
+],
+[
+31.5,
+-91.1,
+995,
+35
+],
+[
+32.1,
+-90.5,
+997,
+30
+],
+[
+32.8,
+-89.6,
+998,
+30
+],
+[
+33.6,
+-88.4,
+999,
+25
+],
+[
+34.4,
+-86.7,
+1000,
+20
+],
+[
+35.4,
+-84,
+1000,
+20
+] 
+];
+data.addColumn('number','Latitude');
+data.addColumn('number','Longitude');
+data.addColumn('number','Pressure_mb');
+data.addColumn('number','Speed_kt');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartGeoChartID12e037c1a554c() {
+var data = gvisDataGeoChartID12e037c1a554c();
+var options = {};
+options["width"] = 556;
+options["height"] = 347;
+options["region"] = "US";
+
+    var chart = new google.visualization.GeoChart(
+    document.getElementById('GeoChartID12e037c1a554c')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "geochart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartGeoChartID12e037c1a554c);
+})();
+function displayChartGeoChartID12e037c1a554c() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartGeoChartID12e037c1a554c"></script>
+ 
+
+<!-- divChart -->
+
+<div id="GeoChartID12e037c1a554c" 
+  style="width: 556; height: 347;">
+</div>
+
+<h2>Google Maps</h2>
+
+<pre><code class="r">AndrewMap <- gvisMap(Andrew, "LatLong" , "Tip", 
+                     options=list(showTip=TRUE, 
+                                  showLine=TRUE, 
+                                  enableScrollWheel=TRUE,
+                                  mapType='terrain', 
+                                  useMapTypeControl=TRUE))
+plot(AndrewMap)
+</code></pre>
+
+<!-- Map generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataMapID12e0369f88461 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+10.8,
+-35.5,
+"Tropical Depression<BR>Pressure=1010<BR>Speed=25"
+],
+[
+11.2,
+-37.4,
+"Tropical Depression<BR>Pressure=1009<BR>Speed=30"
+],
+[
+11.7,
+-39.6,
+"Tropical Depression<BR>Pressure=1008<BR>Speed=30"
+],
+[
+12.3,
+-42,
+"Tropical Storm<BR>Pressure=1006<BR>Speed=35"
+],
+[
+13.1,
+-44.2,
+"Tropical Storm<BR>Pressure=1003<BR>Speed=35"
+],
+[
+13.6,
+-46.2,
+"Tropical Storm<BR>Pressure=1002<BR>Speed=40"
+],
+[
+14.1,
+-48,
+"Tropical Storm<BR>Pressure=1001<BR>Speed=45"
+],
+[
+14.6,
+-49.9,
+"Tropical Storm<BR>Pressure=1000<BR>Speed=45"
+],
+[
+15.4,
+-51.8,
+"Tropical Storm<BR>Pressure=1000<BR>Speed=45"
+],
+[
+16.3,
+-53.5,
+"Tropical Storm<BR>Pressure=1001<BR>Speed=45"
+],
+[
+17.2,
+-55.3,
+"Tropical Storm<BR>Pressure=1002<BR>Speed=45"
+],
+[
+18,
+-56.9,
+"Tropical Storm<BR>Pressure=1005<BR>Speed=45"
+],
+[
+18.8,
+-58.3,
+"Tropical Storm<BR>Pressure=1007<BR>Speed=45"
+],
+[
+19.8,
+-59.3,
+"Tropical Storm<BR>Pressure=1011<BR>Speed=40"
+],
+[
+20.7,
+-60,
+"Tropical Storm<BR>Pressure=1013<BR>Speed=40"
+],
+[
+21.7,
+-60.7,
+"Tropical Storm<BR>Pressure=1015<BR>Speed=40"
+],
+[
+22.5,
+-61.5,
+"Tropical Storm<BR>Pressure=1014<BR>Speed=40"
+],
+[
+23.2,
+-62.4,
+"Tropical Storm<BR>Pressure=1014<BR>Speed=45"
+],
+[
+23.9,
+-63.3,
+"Tropical Storm<BR>Pressure=1010<BR>Speed=45"
+],
+[
+24.4,
+-64.2,
+"Tropical Storm<BR>Pressure=1007<BR>Speed=50"
+],
+[
+24.8,
+-64.9,
+"Tropical Storm<BR>Pressure=1004<BR>Speed=50"
+],
+[
+25.3,
+-65.9,
+"Tropical Storm<BR>Pressure=1000<BR>Speed=55"
+],
+[
+25.6,
+-67,
+"Tropical Storm<BR>Pressure=994<BR>Speed=60"
+],
+[
+25.8,
+-68.3,
+"Hurricane<BR>Pressure=981<BR>Speed=70"
+],
+[
+25.7,
+-69.7,
+"Hurricane<BR>Pressure=969<BR>Speed=80"
+],
+[
+25.6,
+-71.1,
+"Hurricane<BR>Pressure=961<BR>Speed=90"
+],
+[
+25.5,
+-72.5,
+"Hurricane<BR>Pressure=947<BR>Speed=105"
+],
+[
+25.4,
+-74.2,
+"Hurricane<BR>Pressure=933<BR>Speed=120"
+],
+[
+25.4,
+-75.8,
+"Hurricane<BR>Pressure=922<BR>Speed=135"
+],
+[
+25.4,
+-77.5,
+"Hurricane<BR>Pressure=930<BR>Speed=125"
+],
+[
+25.4,
+-79.3,
+"Hurricane<BR>Pressure=937<BR>Speed=120"
+],
+[
+25.6,
+-81.2,
+"Hurricane<BR>Pressure=951<BR>Speed=110"
+],
+[
+25.8,
+-83.1,
+"Hurricane<BR>Pressure=947<BR>Speed=115"
+],
+[
+26.2,
+-85,
+"Hurricane<BR>Pressure=943<BR>Speed=115"
+],
+[
+26.6,
+-86.7,
+"Hurricane<BR>Pressure=948<BR>Speed=115"
+],
+[
+27.2,
+-88.2,
+"Hurricane<BR>Pressure=946<BR>Speed=115"
+],
+[
+27.8,
+-89.6,
+"Hurricane<BR>Pressure=941<BR>Speed=120"
+],
+[
+28.5,
+-90.5,
+"Hurricane<BR>Pressure=937<BR>Speed=120"
+],
+[
+29.2,
+-91.3,
+"Hurricane<BR>Pressure=955<BR>Speed=115"
+],
+[
+30.1,
+-91.7,
+"Tropical Storm<BR>Pressure=973<BR>Speed=80"
+],
+[
+30.9,
+-91.6,
+"Tropical Storm<BR>Pressure=991<BR>Speed=50"
+],
+[
+31.5,
+-91.1,
+"Tropical Depression<BR>Pressure=995<BR>Speed=35"
+],
+[
+32.1,
+-90.5,
+"Tropical Depression<BR>Pressure=997<BR>Speed=30"
+],
+[
+32.8,
+-89.6,
+"Tropical Depression<BR>Pressure=998<BR>Speed=30"
+],
+[
+33.6,
+-88.4,
+"Tropical Depression<BR>Pressure=999<BR>Speed=25"
+],
+[
+34.4,
+-86.7,
+"Tropical Depression<BR>Pressure=1000<BR>Speed=20"
+],
+[
+35.4,
+-84,
+"Tropical Depression<BR>Pressure=1000<BR>Speed=20"
+] 
+];
+data.addColumn('number','Latitude');
+data.addColumn('number','Longitude');
+data.addColumn('string','Tip');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartMapID12e0369f88461() {
+var data = gvisDataMapID12e0369f88461();
+var options = {};
+options["showTip"] = true;
+options["showLine"] = true;
+options["enableScrollWheel"] = true;
+options["mapType"] = "terrain";
+options["useMapTypeControl"] = true;
+
+    var chart = new google.visualization.Map(
+    document.getElementById('MapID12e0369f88461')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "map";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartMapID12e0369f88461);
+})();
+function displayChartMapID12e0369f88461() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartMapID12e0369f88461"></script>
+ 
+
+<!-- divChart -->
+
+<div id="MapID12e0369f88461" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Table</h2>
+
+<pre><code class="r">Table <- gvisTable(Stock, 
+                   formats=list(Value="#,###"))
+plot(Table)
+</code></pre>
+
+<!-- Table generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataTableID12e0357f90626 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+new Date(2008,0,1),
+"Pencils",
+3000,
+null,
+null
+],
+[
+new Date(2008,0,2),
+"Pencils",
+14045,
+null,
+null
+],
+[
+new Date(2008,0,3),
+"Pencils",
+5502,
+null,
+null
+],
+[
+new Date(2008,0,4),
+"Pencils",
+75284,
+null,
+null
+],
+[
+new Date(2008,0,5),
+"Pencils",
+41476,
+"Bought pencils",
+"Bought 200k pencils"
+],
+[
+new Date(2008,0,6),
+"Pencils",
+333222,
+null,
+null
+],
+[
+new Date(2008,0,1),
+"Pens",
+40645,
+null,
+null
+],
+[
+new Date(2008,0,2),
+"Pens",
+20374,
+null,
+null
+],
+[
+new Date(2008,0,3),
+"Pens",
+50766,
+null,
+null
+],
+[
+new Date(2008,0,4),
+"Pens",
+14334,
+"Out of stock",
+"Ran out of stock of pens at 4pm"
+],
+[
+new Date(2008,0,5),
+"Pens",
+66467,
+null,
+null
+],
+[
+new Date(2008,0,6),
+"Pens",
+39463,
+null,
+null
+] 
+];
+data.addColumn('date','Date');
+data.addColumn('string','Device');
+data.addColumn('number','Value');
+data.addColumn('string','Title');
+data.addColumn('string','Annotation');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartTableID12e0357f90626() {
+var data = gvisDataTableID12e0357f90626();
+var options = {};
+options["allowHtml"] = true;
+
+  var dataFormat1 = new google.visualization.NumberFormat({pattern:"#,###"});
+  dataFormat1.format(data, 2);
+
+    var chart = new google.visualization.Table(
+    document.getElementById('TableID12e0357f90626')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "table";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartTableID12e0357f90626);
+})();
+function displayChartTableID12e0357f90626() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartTableID12e0357f90626"></script>
+ 
+
+<!-- divChart -->
+
+<div id="TableID12e0357f90626" 
+  style="width: 500; height: automatic;">
+</div>
+
+<p>Click on the column header to sort the rows </p>
+
+<h3>Table with pages</h3>
+
+<pre><code class="r">PopTable <- gvisTable(Population, 
+                      formats=list(Population="#,###",
+                                   '% of World Population'='#.#%'),
+                      options=list(page='enable'))
+plot(PopTable)
+</code></pre>
+
+<!-- Table generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataTableID12e034c29c363 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"1",
+"China",
+1339940000,
+0.195,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Flag_of_the_People%27s_Republic_of_China.svg/22px-Flag_of_the_People%27s_Republic_of_China.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"2",
+"India",
+1188650000,
+0.173,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Flag_of_India.svg/22px-Flag_of_India.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"3",
+"United States",
+310438000,
+0.0452,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Flag_of_the_United_States.svg/22px-Flag_of_the_United_States.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"4",
+"Indonesia",
+237556363,
+0.0346,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Flag_of_Indonesia.svg/22px-Flag_of_Indonesia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"5",
+"Brazil",
+193626000,
+0.0282,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Flag_of_Brazil.svg/22px-Flag_of_Brazil.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"6",
+"Pakistan",
+170745000,
+0.0248,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/32/Flag_of_Pakistan.svg/22px-Flag_of_Pakistan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"7",
+"Bangladesh",
+164425000,
+0.0239,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f9/Flag_of_Bangladesh.svg/22px-Flag_of_Bangladesh.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"8",
+"Nigeria",
+158259000,
+0.023,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Flag_of_Nigeria.svg/22px-Flag_of_Nigeria.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"9",
+"Russia",
+141927297,
+0.0206,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Russia.svg/22px-Flag_of_Russia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"10",
+"Japan",
+127390000,
+0.0185,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Flag_of_Japan.svg/22px-Flag_of_Japan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"11",
+"Mexico",
+108396211,
+0.0158,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Flag_of_Mexico.svg/22px-Flag_of_Mexico.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"12",
+"Philippines",
+94013200,
+0.0137,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Flag_of_the_Philippines.svg/22px-Flag_of_the_Philippines.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"13",
+"Vietnam",
+85846997,
+0.0125,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Flag_of_Vietnam.svg/22px-Flag_of_Vietnam.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"14",
+"Ethiopia",
+84976000,
+0.0124,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/71/Flag_of_Ethiopia.svg/22px-Flag_of_Ethiopia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"15",
+"Germany",
+81802257,
+0.0119,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_Germany.svg/22px-Flag_of_Germany.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"16",
+"Egypt",
+79135000,
+0.0115,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Flag_of_Egypt.svg/22px-Flag_of_Egypt.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"17",
+"Iran",
+75078000,
+0.0109,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/Flag_of_Iran.svg/22px-Flag_of_Iran.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"18",
+"Turkey",
+72561312,
+0.0106,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Flag_of_Turkey.svg/22px-Flag_of_Turkey.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"19",
+"Dem. Rep. of Congo",
+67827000,
+0.0099,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Flag_of_the_Democratic_Republic_of_the_Congo.svg/22px-Flag_of_the_Democratic_Republic_of_the_Congo.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"20",
+"Thailand",
+67070000,
+0.01,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Flag_of_Thailand.svg/22px-Flag_of_Thailand.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"21",
+"France",
+65447374,
+0.0095,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/Flag_of_France.svg/22px-Flag_of_France.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"22",
+"United Kingdom",
+62008049,
+0.009,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Flag_of_the_United_Kingdom.svg/22px-Flag_of_the_United_Kingdom.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"23",
+"Italy",
+60402499,
+0.0088,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/03/Flag_of_Italy.svg/22px-Flag_of_Italy.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"24",
+"Myanmar",
+50496000,
+0.0073,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Flag_of_Myanmar.svg/22px-Flag_of_Myanmar.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"25",
+"South Africa",
+49991300,
+0.0073,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Flag_of_South_Africa.svg/22px-Flag_of_South_Africa.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"26",
+"South Korea",
+49773145,
+0.0072,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Flag_of_South_Korea.svg/22px-Flag_of_South_Korea.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"27",
+"Spain",
+46072834,
+0.0067,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Flag_of_Spain.svg/22px-Flag_of_Spain.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"28",
+"Ukraine",
+45871738,
+0.0067,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Flag_of_Ukraine.svg/22px-Flag_of_Ukraine.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"29",
+"Colombia",
+45655000,
+0.0066,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Flag_of_Colombia.svg/22px-Flag_of_Colombia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"30",
+"Tanzania",
+45040000,
+0.0066,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Flag_of_Tanzania.svg/22px-Flag_of_Tanzania.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"31",
+"Sudan",
+43192000,
+0.0063,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Flag_of_Sudan.svg/22px-Flag_of_Sudan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"32",
+"Argentina",
+40518951,
+0.0059,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/1a/Flag_of_Argentina.svg/22px-Flag_of_Argentina.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"33",
+"Kenya",
+38610097,
+0.0056,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Flag_of_Kenya.svg/22px-Flag_of_Kenya.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"34",
+"Poland",
+38167329,
+0.0056,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Flag_of_Poland.svg/22px-Flag_of_Poland.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"35",
+"Algeria",
+35423000,
+0.0052,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Flag_of_Algeria.svg/22px-Flag_of_Algeria.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"36",
+"Canada",
+34272000,
+0.005,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Flag_of_Canada.svg/22px-Flag_of_Canada.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"37",
+"Uganda",
+33796000,
+0.0049,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Flag_of_Uganda.svg/22px-Flag_of_Uganda.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"38",
+"Morocco",
+31944000,
+0.0046,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Flag_of_Morocco.svg/22px-Flag_of_Morocco.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"39",
+"Iraq",
+31467000,
+0.0046,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Flag_of_Iraq.svg/22px-Flag_of_Iraq.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"40",
+"Nepal",
+29853000,
+0.0043,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9b/Flag_of_Nepal.svg/16px-Flag_of_Nepal.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"41",
+"Peru",
+29461933,
+0.0043,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Flag_of_Peru.svg/22px-Flag_of_Peru.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"42",
+"Afghanistan",
+29117000,
+0.0042,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Flag_of_Afghanistan.svg/22px-Flag_of_Afghanistan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"43",
+"Venezuela",
+28958000,
+0.0042,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Flag_of_Venezuela.svg/22px-Flag_of_Venezuela.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"44",
+"Malaysia",
+28250500,
+0.0041,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Flag_of_Malaysia.svg/22px-Flag_of_Malaysia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"45",
+"Uzbekistan",
+27794000,
+0.004,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Flag_of_Uzbekistan.svg/22px-Flag_of_Uzbekistan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"46",
+"Saudi Arabia",
+27136977,
+0.0039,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Flag_of_Saudi_Arabia.svg/22px-Flag_of_Saudi_Arabia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"47",
+"Ghana",
+24333000,
+0.0035,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Flag_of_Ghana.svg/22px-Flag_of_Ghana.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"48",
+"Yemen",
+24256000,
+0.0035,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Flag_of_Yemen.svg/22px-Flag_of_Yemen.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"49",
+"North Korea",
+23991000,
+0.0035,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Flag_of_North_Korea.svg/22px-Flag_of_North_Korea.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"50",
+"Mozambique",
+23406000,
+0.0034,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Flag_of_Mozambique.svg/22px-Flag_of_Mozambique.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"52",
+"Syria",
+22505000,
+0.0033,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Flag_of_Syria.svg/22px-Flag_of_Syria.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"53",
+"Australia",
+22483305,
+0.0033,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/Flag_of_Australia.svg/22px-Flag_of_Australia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"54",
+"Cote d'Ivoire",
+21571000,
+0.0031,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/86/Flag_of_Cote_d%27Ivoire.svg/22px-Flag_of_Cote_d%27Ivoire.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"55",
+"Romania",
+21466174,
+0.0031,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Flag_of_Romania.svg/22px-Flag_of_Romania.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"56",
+"Sri Lanka",
+20410000,
+0.003,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Flag_of_Sri_Lanka.svg/22px-Flag_of_Sri_Lanka.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"57",
+"Madagascar",
+20146000,
+0.0029,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Flag_of_Madagascar.svg/22px-Flag_of_Madagascar.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"58",
+"Cameroon",
+19958000,
+0.0029,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Flag_of_Cameroon.svg/22px-Flag_of_Cameroon.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"59",
+"Angola",
+18993000,
+0.0028,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Flag_of_Angola.svg/22px-Flag_of_Angola.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"60",
+"Chile",
+17140000,
+0.0025,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Flag_of_Chile.svg/22px-Flag_of_Chile.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"61",
+"Netherlands",
+16619500,
+0.00242,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Flag_of_the_Netherlands.svg/22px-Flag_of_the_Netherlands.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"62",
+"Burkina Faso",
+16287000,
+0.0024,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Flag_of_Burkina_Faso.svg/22px-Flag_of_Burkina_Faso.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"63",
+"Kazakhstan",
+16197000,
+0.0024,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Flag_of_Kazakhstan.svg/22px-Flag_of_Kazakhstan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"64",
+"Niger",
+15891000,
+0.0023,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/Flag_of_Niger.svg/22px-Flag_of_Niger.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"65",
+"Malawi",
+15692000,
+0.0023,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Flag_of_Malawi.svg/22px-Flag_of_Malawi.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"66",
+"Mali",
+14517176,
+0.0021,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Flag_of_Mali.svg/22px-Flag_of_Mali.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"67",
+"Guatemala",
+14377000,
+0.0021,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Flag_of_Guatemala.svg/22px-Flag_of_Guatemala.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"68",
+"Ecuador",
+14259000,
+0.0021,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Flag_of_Ecuador.svg/22px-Flag_of_Ecuador.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"69",
+"Cambodia",
+13395682,
+0.0019,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Flag_of_Cambodia.svg/22px-Flag_of_Cambodia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"70",
+"Zambia",
+13257000,
+0.0019,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Flag_of_Zambia.svg/22px-Flag_of_Zambia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"71",
+"Senegal",
+12861000,
+0.0019,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/Flag_of_Senegal.svg/22px-Flag_of_Senegal.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"72",
+"Zimbabwe",
+12644000,
+0.0018,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Flag_of_Zimbabwe.svg/22px-Flag_of_Zimbabwe.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"73",
+"Chad",
+11506000,
+0.0017,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/4b/Flag_of_Chad.svg/22px-Flag_of_Chad.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"74",
+"Greece",
+11306183,
+0.0016,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Flag_of_Greece.svg/22px-Flag_of_Greece.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"75",
+"Cuba",
+11204000,
+0.0016,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Flag_of_Cuba.svg/22px-Flag_of_Cuba.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"76",
+"Belgium",
+10827519,
+0.0016,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Flag_of_Belgium_%28civil%29.svg/22px-Flag_of_Belgium_%28civil%29.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"77",
+"Portugal",
+10636888,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Flag_of_Portugal.svg/22px-Flag_of_Portugal.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"78",
+"Czech Republic",
+10512397,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Flag_of_the_Czech_Republic.svg/22px-Flag_of_the_Czech_Republic.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"79",
+"Tunisia",
+10432500,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Flag_of_Tunisia.svg/22px-Flag_of_Tunisia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"80",
+"Guinea",
+10324000,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/Flag_of_Guinea.svg/22px-Flag_of_Guinea.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"81",
+"Rwanda",
+10277000,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Flag_of_Rwanda.svg/22px-Flag_of_Rwanda.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"82",
+"Dominican Republic",
+10225000,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Flag_of_the_Dominican_Republic.svg/22px-Flag_of_the_Dominican_Republic.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"83",
+"Haiti",
+10188000,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Flag_of_Haiti.svg/22px-Flag_of_Haiti.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"84",
+"Bolivia",
+10031000,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Flag_of_Bolivia.svg/22px-Flag_of_Bolivia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"85",
+"Hungary",
+10013628,
+0.0015,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Flag_of_Hungary.svg/22px-Flag_of_Hungary.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"86",
+"Serbia",
+9856000,
+0.0014,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/ff/Flag_of_Serbia.svg/22px-Flag_of_Serbia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"87",
+"Belarus",
+9467700,
+0.0014,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Flag_of_Belarus.svg/22px-Flag_of_Belarus.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"88",
+"Sweden",
+9393648,
+0.0014,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Flag_of_Sweden.svg/22px-Flag_of_Sweden.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"89",
+"Somalia",
+9359000,
+0.0014,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Flag_of_Somalia.svg/22px-Flag_of_Somalia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"90",
+"Benin",
+9212000,
+0.0013,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Flag_of_Benin.svg/22px-Flag_of_Benin.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"91",
+"Azerbaijan",
+8997400,
+0.0013,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Flag_of_Azerbaijan.svg/22px-Flag_of_Azerbaijan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"92",
+"Burundi",
+8519000,
+0.0012,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Flag_of_Burundi.svg/22px-Flag_of_Burundi.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"93",
+"Austria",
+8372930,
+0.0012,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Flag_of_Austria.svg/22px-Flag_of_Austria.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"94",
+"Switzerland",
+7782900,
+0.0011,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Flag_of_Switzerland.svg/20px-Flag_of_Switzerland.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"95",
+"Israel",
+7640800,
+0.0011,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Flag_of_Israel.svg/22px-Flag_of_Israel.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"96",
+"Honduras",
+7616000,
+0.0011,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Flag_of_Honduras.svg/22px-Flag_of_Honduras.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"97",
+"Bulgaria",
+7576751,
+0.0011,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Flag_of_Bulgaria.svg/22px-Flag_of_Bulgaria.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"98",
+"Tajikistan",
+7075000,
+0.00103,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d0/Flag_of_Tajikistan.svg/22px-Flag_of_Tajikistan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"100",
+"Papua New Guinea",
+6888000,
+0.001,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Flag_of_Papua_New_Guinea.svg/22px-Flag_of_Papua_New_Guinea.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"101",
+"Togo",
+6780000,
+0.00099,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/68/Flag_of_Togo.svg/22px-Flag_of_Togo.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"102",
+"Libya",
+6546000,
+0.00095,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Flag_of_Libya.svg/22px-Flag_of_Libya.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"103",
+"Jordan",
+6472000,
+0.00094,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Flag_of_Jordan.svg/22px-Flag_of_Jordan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"104",
+"Paraguay",
+6460000,
+0.00094,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Flag_of_Paraguay.svg/22px-Flag_of_Paraguay.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"105",
+"Laos",
+6436000,
+0.00094,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/5/56/Flag_of_Laos.svg/22px-Flag_of_Laos.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"106",
+"El Salvador",
+6194000,
+9e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Flag_of_El_Salvador.svg/22px-Flag_of_El_Salvador.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"107",
+"Sierra Leone",
+5836000,
+0.00085,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Flag_of_Sierra_Leone.svg/22px-Flag_of_Sierra_Leone.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"108",
+"Nicaragua",
+5822000,
+0.00085,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Flag_of_Nicaragua.svg/22px-Flag_of_Nicaragua.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"109",
+"Kyrgyzstan",
+5550000,
+0.00081,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/c7/Flag_of_Kyrgyzstan.svg/22px-Flag_of_Kyrgyzstan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"110",
+"Denmark",
+5543819,
+8e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Flag_of_Denmark.svg/22px-Flag_of_Denmark.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"111",
+"Slovakia",
+5429763,
+0.00079,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Flag_of_Slovakia.svg/22px-Flag_of_Slovakia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"112",
+"Finland",
+5370000,
+0.00078,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Flag_of_Finland.svg/22px-Flag_of_Finland.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"113",
+"Eritrea",
+5224000,
+0.00076,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Flag_of_Eritrea.svg/22px-Flag_of_Eritrea.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"114",
+"Turkmenistan",
+5177000,
+0.00075,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Flag_of_Turkmenistan.svg/22px-Flag_of_Turkmenistan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"115",
+"Singapore",
+5076700,
+0.00074,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Flag_of_Singapore.svg/22px-Flag_of_Singapore.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"116",
+"Norway",
+4906500,
+0.00071,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Flag_of_Norway.svg/22px-Flag_of_Norway.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"117",
+"United Arab Emirates",
+4707000,
+0.00068,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/Flag_of_the_United_Arab_Emirates.svg/22px-Flag_of_the_United_Arab_Emirates.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"118",
+"Costa Rica",
+4640000,
+0.00068,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Flag_of_Costa_Rica.svg/22px-Flag_of_Costa_Rica.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"119",
+"Central African Republic",
+4506000,
+0.00066,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Flag_of_the_Central_African_Republic.svg/22px-Flag_of_the_Central_African_Republic.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"120",
+"Ireland",
+4470700,
+0.00064,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/45/Flag_of_Ireland.svg/22px-Flag_of_Ireland.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"121",
+"Georgia",
+4436000,
+0.00065,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Flag_of_Georgia.svg/22px-Flag_of_Georgia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"122",
+"Croatia",
+4435056,
+0.00065,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Flag_of_Croatia.svg/22px-Flag_of_Croatia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"123",
+"New Zealand",
+4393000,
+0.00064,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Flag_of_New_Zealand.svg/22px-Flag_of_New_Zealand.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"124",
+"Lebanon",
+4255000,
+0.00062,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Flag_of_Lebanon.svg/22px-Flag_of_Lebanon.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"125",
+"Liberia",
+4102000,
+6e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Flag_of_Liberia.svg/22px-Flag_of_Liberia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"127",
+"Palestinian territories",
+3935249,
+0.00055,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Flag_of_Palestine.svg/22px-Flag_of_Palestine.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"128",
+"Bosnia and Herzegovina",
+3760000,
+0.00055,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Flag_of_Bosnia_and_Herzegovina.svg/22px-Flag_of_Bosnia_and_Herzegovina.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"129",
+"Republic of the Congo",
+3759000,
+0.00055,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Flag_of_the_Republic_of_the_Congo.svg/22px-Flag_of_the_Republic_of_the_Congo.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"130",
+"Moldova",
+3563800,
+0.00052,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Flag_of_Moldova.svg/22px-Flag_of_Moldova.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"131",
+"Uruguay",
+3372000,
+0.00049,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Flag_of_Uruguay.svg/22px-Flag_of_Uruguay.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"132",
+"Mauritania",
+3366000,
+0.00049,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Flag_of_Mauritania.svg/22px-Flag_of_Mauritania.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"133",
+"Lithuania",
+3329227,
+0.00048,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Flag_of_Lithuania.svg/22px-Flag_of_Lithuania.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"134",
+"Panama",
+3322576,
+0.00048,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Flag_of_Panama.svg/22px-Flag_of_Panama.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"135",
+"Armenia",
+3238000,
+0.00047,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Flag_of_Armenia.svg/22px-Flag_of_Armenia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"136",
+"Albania",
+3195000,
+0.00046,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Flag_of_Albania.svg/22px-Flag_of_Albania.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"137",
+"Kuwait",
+3051000,
+0.00044,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Flag_of_Kuwait.svg/22px-Flag_of_Kuwait.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"138",
+"Oman",
+2905000,
+0.00042,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Flag_of_Oman.svg/22px-Flag_of_Oman.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"139",
+"Mongolia",
+2776500,
+4e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Flag_of_Mongolia.svg/22px-Flag_of_Mongolia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"140",
+"Jamaica",
+2730000,
+4e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Flag_of_Jamaica.svg/22px-Flag_of_Jamaica.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"141",
+"Latvia",
+2236300,
+0.00033,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Flag_of_Latvia.svg/22px-Flag_of_Latvia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"142",
+"Namibia",
+2212000,
+0.00032,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Flag_of_Namibia.svg/22px-Flag_of_Namibia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"143",
+"Lesotho",
+2084000,
+3e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Flag_of_Lesotho.svg/22px-Flag_of_Lesotho.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"144",
+"Slovenia",
+2065720,
+3e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Flag_of_Slovenia.svg/22px-Flag_of_Slovenia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"145",
+"Republic of Macedonia",
+2048620,
+3e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Flag_of_Macedonia.svg/22px-Flag_of_Macedonia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"146",
+"Botswana",
+1978000,
+0.00029,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Flag_of_Botswana.svg/22px-Flag_of_Botswana.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"147",
+"Gambia",
+1751000,
+0.00025,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Flag_of_The_Gambia.svg/22px-Flag_of_The_Gambia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"148",
+"Qatar",
+1696563,
+0.00025,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/65/Flag_of_Qatar.svg/22px-Flag_of_Qatar.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"149",
+"Guinea-Bissau",
+1647000,
+0.00024,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Flag_of_Guinea-Bissau.svg/22px-Flag_of_Guinea-Bissau.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"150",
+"Gabon",
+1501000,
+0.00022,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Flag_of_Gabon.svg/22px-Flag_of_Gabon.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"151",
+"Trinidad and Tobago",
+1344000,
+2e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Flag_of_Trinidad_and_Tobago.svg/22px-Flag_of_Trinidad_and_Tobago.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"152",
+"Estonia",
+1340127,
+0.00019,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/8f/Flag_of_Estonia.svg/22px-Flag_of_Estonia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"153",
+"Mauritius",
+1297000,
+0.00019,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Flag_of_Mauritius.svg/22px-Flag_of_Mauritius.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"154",
+"Swaziland",
+1202000,
+0.00017,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Flag_of_Swaziland.svg/22px-Flag_of_Swaziland.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"155",
+"East Timor",
+1171000,
+0.00017,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/26/Flag_of_East_Timor.svg/22px-Flag_of_East_Timor.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"156",
+"Djibouti",
+879000,
+0.00013,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Flag_of_Djibouti.svg/22px-Flag_of_Djibouti.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"157",
+"Fiji",
+854000,
+0.00012,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Flag_of_Fiji.svg/22px-Flag_of_Fiji.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"158",
+"Bahrain",
+807000,
+0.00012,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Flag_of_Bahrain.svg/22px-Flag_of_Bahrain.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"159",
+"Cyprus",
+801851,
+0.00012,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Flag_of_Cyprus.svg/22px-Flag_of_Cyprus.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"160",
+"Guyana",
+761000,
+0.00011,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Flag_of_Guyana.svg/22px-Flag_of_Guyana.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"161",
+"Bhutan",
+708000,
+1e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Flag_of_Bhutan.svg/22px-Flag_of_Bhutan.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"162",
+"Equatorial Guinea",
+693000,
+1e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Flag_of_Equatorial_Guinea.svg/22px-Flag_of_Equatorial_Guinea.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"163",
+"Comoros",
+691000,
+1e-04,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Flag_of_the_Comoros.svg/22px-Flag_of_the_Comoros.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"164",
+"Montenegro",
+626000,
+9e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Flag_of_Montenegro.svg/22px-Flag_of_Montenegro.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"166",
+"Solomon Islands",
+536000,
+8e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/74/Flag_of_the_Solomon_Islands.svg/22px-Flag_of_the_Solomon_Islands.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"167",
+"Western Sahara",
+530000,
+8e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/Flag_of_Western_Sahara.svg/22px-Flag_of_Western_Sahara.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"168",
+"Suriname",
+524000,
+8e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Flag_of_Suriname.svg/22px-Flag_of_Suriname.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"169",
+"Cape Verde",
+513000,
+7e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Flag_of_Cape_Verde.svg/22px-Flag_of_Cape_Verde.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"170",
+"Luxembourg",
+502207,
+7e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/da/Flag_of_Luxembourg.svg/22px-Flag_of_Luxembourg.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"171",
+"Malta",
+416333,
+6e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Flag_of_Malta.svg/22px-Flag_of_Malta.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"172",
+"Brunei",
+407000,
+6e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9c/Flag_of_Brunei.svg/22px-Flag_of_Brunei.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"173",
+"Bahamas",
+346000,
+5e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Flag_of_the_Bahamas.svg/22px-Flag_of_the_Bahamas.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"174",
+"Belize",
+322100,
+5e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Flag_of_Belize.svg/22px-Flag_of_Belize.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"175",
+"Iceland",
+318006,
+5e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Flag_of_Iceland.svg/22px-Flag_of_Iceland.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"176",
+"Maldives",
+314000,
+5e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Flag_of_Maldives.svg/22px-Flag_of_Maldives.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"177",
+"Barbados",
+257000,
+4e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Flag_of_Barbados.svg/22px-Flag_of_Barbados.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"178",
+"Vanuatu",
+246000,
+4e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Flag_of_Vanuatu.svg/22px-Flag_of_Vanuatu.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"181",
+"Samoa",
+179000,
+3e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Flag_of_Samoa.svg/22px-Flag_of_Samoa.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"182",
+"Saint Lucia",
+174000,
+3e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Flag_of_Saint_Lucia.svg/22px-Flag_of_Saint_Lucia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"183",
+"Sao Tome and Principe",
+165000,
+2e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Flag_of_Sao_Tome_and_Principe.svg/22px-Flag_of_Sao_Tome_and_Principe.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"184",
+"Federated States of Micronesia",
+111000,
+2e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Flag_of_Federated_States_of_Micronesia.svg/22px-Flag_of_Federated_States_of_Micronesia.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"186",
+"Saint Vincent and the Grenadines",
+109000,
+2e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Flag_of_Saint_Vincent_and_the_Grenadines.svg/22px-Flag_of_Saint_Vincent_and_the_Grenadines.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"188",
+"Grenada",
+104000,
+2e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Flag_of_Grenada.svg/22px-Flag_of_Grenada.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"189",
+"Tonga",
+104000,
+2e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Flag_of_Tonga.svg/22px-Flag_of_Tonga.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"190",
+"Kiribati",
+100000,
+1e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Flag_of_Kiribati.svg/22px-Flag_of_Kiribati.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"192",
+"Antigua and Barbuda",
+89000,
+1e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Flag_of_Antigua_and_Barbuda.svg/22px-Flag_of_Antigua_and_Barbuda.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"194",
+"Seychelles",
+85000,
+1e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Flag_of_the_Seychelles.svg/22px-Flag_of_the_Seychelles.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"195",
+"Andorra",
+84082,
+1e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/Flag_of_Andorra.svg/22px-Flag_of_Andorra.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"198",
+"Dominica",
+67000,
+1e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Flag_of_Dominica.svg/22px-Flag_of_Dominica.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"200",
+"Marshall Islands",
+63000,
+1e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/Flag_of_the_Marshall_Islands.svg/22px-Flag_of_the_Marshall_Islands.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"204",
+"Saint Kitts and Nevis",
+52000,
+1e-05,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Flag_of_Saint_Kitts_and_Nevis.svg/22px-Flag_of_Saint_Kitts_and_Nevis.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"206",
+"Liechtenstein",
+35904,
+5e-06,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/47/Flag_of_Liechtenstein.svg/22px-Flag_of_Liechtenstein.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"207",
+"Monaco",
+33000,
+5e-06,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Flag_of_Monaco.svg/22px-Flag_of_Monaco.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"209",
+"San Marino",
+31794,
+5e-06,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/Flag_of_San_Marino.svg/22px-Flag_of_San_Marino.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"213",
+"Palau",
+20000,
+3e-06,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Flag_of_Palau.svg/22px-Flag_of_Palau.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"215",
+"Tuvalu",
+10000,
+1e-06,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/38/Flag_of_Tuvalu.svg/22px-Flag_of_Tuvalu.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"216",
+"Nauru",
+10000,
+1e-06,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/3/30/Flag_of_Nauru.svg/22px-Flag_of_Nauru.svg.png\">",
+true,
+new Date(2010,9,9)
+],
+[
+"222",
+"Vatican City",
+800,
+2e-07,
+"<img src=\"http://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Flag_of_the_Vatican_City.svg/20px-Flag_of_the_Vatican_City.svg.png\">",
+true,
+new Date(2010,9,9)
+] 
+];
+data.addColumn('string','Rank');
+data.addColumn('string','Country');
+data.addColumn('number','Population');
+data.addColumn('number','% of World Population');
+data.addColumn('string','Flag');
+data.addColumn('boolean','Mode');
+data.addColumn('date','Date');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartTableID12e034c29c363() {
+var data = gvisDataTableID12e034c29c363();
+var options = {};
+options["allowHtml"] = true;
+options["page"] = "enable";
+
+  var dataFormat1 = new google.visualization.NumberFormat({pattern:"#,###"});
+  dataFormat1.format(data, 2);
+  var dataFormat2 = new google.visualization.NumberFormat({pattern:"#.#%"});
+  dataFormat2.format(data, 3);
+
+    var chart = new google.visualization.Table(
+    document.getElementById('TableID12e034c29c363')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "table";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartTableID12e034c29c363);
+})();
+function displayChartTableID12e034c29c363() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartTableID12e034c29c363"></script>
+ 
+
+<!-- divChart -->
+
+<div id="TableID12e034c29c363" 
+  style="width: 500; height: automatic;">
+</div>
+
+<h2>Org chart</h2>
+
+<pre><code class="r">Org <- gvisOrgChart(Regions, 
+                    options=list(width=600, height=250,
+                                 size='large', allowCollapse=TRUE))
+plot(Org)
+</code></pre>
+
+<!-- OrgChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataOrgChartID12e03385c0f84 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Global",
+null,
+"10"
+],
+[
+"America",
+"Global",
+"2"
+],
+[
+"Europe",
+"Global",
+"99"
+],
+[
+"Asia",
+"Global",
+"10"
+],
+[
+"France",
+"Europe",
+"71"
+],
+[
+"Sweden",
+"Europe",
+"89"
+],
+[
+"Germany",
+"Europe",
+"58"
+],
+[
+"Mexico",
+"America",
+"2"
+],
+[
+"USA",
+"America",
+"38"
+],
+[
+"China",
+"Asia",
+"5"
+],
+[
+"Japan",
+"Asia",
+"48"
+] 
+];
+data.addColumn('string','Region');
+data.addColumn('string','Parent');
+data.addColumn('string','Val');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartOrgChartID12e03385c0f84() {
+var data = gvisDataOrgChartID12e03385c0f84();
+var options = {};
+options["width"] = 600;
+options["height"] = 250;
+options["size"] = "large";
+options["allowCollapse"] = true;
+
+    var chart = new google.visualization.OrgChart(
+    document.getElementById('OrgChartID12e03385c0f84')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "orgchart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartOrgChartID12e03385c0f84);
+})();
+function displayChartOrgChartID12e03385c0f84() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartOrgChartID12e03385c0f84"></script>
+ 
+
+<!-- divChart -->
+
+<div id="OrgChartID12e03385c0f84" 
+  style="width: 600; height: 250;">
+</div>
+
+<p>Double click on a parent to collapse all its children.</p>
+
+<h2>Tree Map</h2>
+
+<pre><code class="r">Tree <- gvisTreeMap(Regions,  
+                    "Region", "Parent", 
+                    "Val", "Fac", 
+                    options=list(fontSize=16))
+plot(Tree)
+</code></pre>
+
+<!-- TreeMap generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataTreeMapID12e0329f05912 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Global",
+null,
+10,
+2
+],
+[
+"America",
+"Global",
+2,
+4
+],
+[
+"Europe",
+"Global",
+99,
+11
+],
+[
+"Asia",
+"Global",
+10,
+8
+],
+[
+"France",
+"Europe",
+71,
+2
+],
+[
+"Sweden",
+"Europe",
+89,
+3
+],
+[
+"Germany",
+"Europe",
+58,
+10
+],
+[
+"Mexico",
+"America",
+2,
+9
+],
+[
+"USA",
+"America",
+38,
+11
+],
+[
+"China",
+"Asia",
+5,
+1
+],
+[
+"Japan",
+"Asia",
+48,
+11
+] 
+];
+data.addColumn('string','Region');
+data.addColumn('string','Parent');
+data.addColumn('number','Val');
+data.addColumn('number','Fac');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartTreeMapID12e0329f05912() {
+var data = gvisDataTreeMapID12e0329f05912();
+var options = {};
+options["width"] = 600;
+options["height"] = 500;
+options["fontSize"] = 16;
+
+    var chart = new google.visualization.TreeMap(
+    document.getElementById('TreeMapID12e0329f05912')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "treemap";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartTreeMapID12e0329f05912);
+})();
+function displayChartTreeMapID12e0329f05912() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartTreeMapID12e0329f05912"></script>
+ 
+
+<!-- divChart -->
+
+<div id="TreeMapID12e0329f05912" 
+  style="width: 600; height: 500;">
+</div>
+
+<p>Left mouse-click to drill down, right mouse-click to move up a level.</p>
+
+<h2>Annotation chart</h2>
+
+<pre><code class="r">Anno <- gvisAnnotationChart(Stock, 
+                            datevar="Date",
+                            numvar="Value", 
+                            idvar="Device",
+                            titlevar="Title", 
+                            annotationvar="Annotation",
+                            options=list(
+                              width=600, height=350,
+                              fill=10, displayExactValues=TRUE,
+                              colors="['#0000ff','#00ff00']")
+)
+plot(Anno)
+</code></pre>
+
+<!-- AnnotationChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataAnnotationChartID12e03a022a39 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+new Date(2008,0,1),
+3000,
+null,
+null,
+40645,
+null,
+null
+],
+[
+new Date(2008,0,2),
+14045,
+null,
+null,
+20374,
+null,
+null
+],
+[
+new Date(2008,0,3),
+5502,
+null,
+null,
+50766,
+null,
+null
+],
+[
+new Date(2008,0,4),
+75284,
+null,
+null,
+14334,
+"Out of stock",
+"Ran out of stock of pens at 4pm"
+],
+[
+new Date(2008,0,5),
+41476,
+"Bought pencils",
+"Bought 200k pencils",
+66467,
+null,
+null
+],
+[
+new Date(2008,0,6),
+333222,
+null,
+null,
+39463,
+null,
+null
+] 
+];
+data.addColumn('date','Date');
+data.addColumn('number','Pencils');
+data.addColumn('string','Title.Pencils');
+data.addColumn('string','Annotation.Pencils');
+data.addColumn('number','Pens');
+data.addColumn('string','Title.Pens');
+data.addColumn('string','Annotation.Pens');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartAnnotationChartID12e03a022a39() {
+var data = gvisDataAnnotationChartID12e03a022a39();
+var options = {};
+options["width"] = 600;
+options["height"] = 350;
+options["fill"] = 10;
+options["displayExactValues"] = true;
+options["colors"] = ['#0000ff','#00ff00'];
+
+    var chart = new google.visualization.AnnotationChart(
+    document.getElementById('AnnotationChartID12e03a022a39')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "annotationchart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartAnnotationChartID12e03a022a39);
+})();
+function displayChartAnnotationChartID12e03a022a39() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartAnnotationChartID12e03a022a39"></script>
+ 
+
+<!-- divChart -->
+
+<div id="AnnotationChartID12e03a022a39" 
+  style="width: 600; height: 350;">
+</div>
+
+<h2>Sankey chart</h2>
+
+<pre><code class="r">datSK <- data.frame(From=c(rep("A",3), rep("B", 3)),
+                    To=c(rep(c("X", "Y", "Z"),2)),
+                    Weight=c(5,7,6,2,9,4))
+
+Sankey <- gvisSankey(datSK, from="From", to="To", weight="Weight",
+                     options=list(
+                       sankey="{link: {color: { fill: '#d799ae' } },
+                            node: { color: { fill: '#a61d4c' },
+                            label: { color: '#871b47' } }}"))
+plot(Sankey)
+</code></pre>
+
+<!-- Sankey generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataSankeyID12e034691af2a () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"A",
+"X",
+5
+],
+[
+"A",
+"Y",
+7
+],
+[
+"A",
+"Z",
+6
+],
+[
+"B",
+"X",
+2
+],
+[
+"B",
+"Y",
+9
+],
+[
+"B",
+"Z",
+4
+] 
+];
+data.addColumn('string','From');
+data.addColumn('string','To');
+data.addColumn('number','Weight');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartSankeyID12e034691af2a() {
+var data = gvisDataSankeyID12e034691af2a();
+var options = {};
+options["width"] = 400;
+options["height"] = 400;
+options["sankey"] = {link: {color: { fill: '#d799ae' } },
+                            node: { color: { fill: '#a61d4c' },
+                            label: { color: '#871b47' } }};
+
+    var chart = new google.visualization.Sankey(
+    document.getElementById('SankeyID12e034691af2a')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "sankey";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartSankeyID12e034691af2a);
+})();
+function displayChartSankeyID12e034691af2a() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartSankeyID12e034691af2a"></script>
+ 
+
+<!-- divChart -->
+
+<div id="SankeyID12e034691af2a" 
+  style="width: 400; height: 400;">
+</div>
+
+<h2>Histogram</h2>
+
+<pre><code class="r">set.seed(123)
+datHist=data.frame(A=rpois(100, 20),
+                   B=rpois(100, 5),
+                   C=rpois(100, 50))
+
+Hist <- gvisHistogram(datHist, options=list(
+  legend="{ position: 'top', maxLines: 2 }",
+  colors="['#5C3292', '#1A8763', '#871B47']",
+  width=400, height=360))
+plot(Hist)
+</code></pre>
+
+<!-- Histogram generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataHistogramID12e03739bc7f () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+17,
+8,
+59
+],
+[
+25,
+6,
+46
+],
+[
+12,
+4,
+46
+],
+[
+20,
+5,
+52
+],
+[
+27,
+2,
+64
+],
+[
+22,
+3,
+41
+],
+[
+14,
+4,
+49
+],
+[
+12,
+3,
+65
+],
+[
+25,
+7,
+44
+],
+[
+21,
+3,
+63
+],
+[
+21,
+7,
+43
+],
+[
+20,
+5,
+53
+],
+[
+17,
+6,
+46
+],
+[
+25,
+3,
+43
+],
+[
+23,
+6,
+47
+],
+[
+19,
+4,
+35
+],
+[
+16,
+6,
+48
+],
+[
+15,
+4,
+57
+],
+[
+18,
+10,
+50
+],
+[
+15,
+9,
+55
+],
+[
+17,
+6,
+46
+],
+[
+19,
+3,
+55
+],
+[
+14,
+3,
+55
+],
+[
+14,
+5,
+59
+],
+[
+18,
+4,
+45
+],
+[
+14,
+5,
+64
+],
+[
+24,
+7,
+54
+],
+[
+23,
+3,
+41
+],
+[
+23,
+4,
+40
+],
+[
+23,
+5,
+65
+],
+[
+22,
+8,
+59
+],
+[
+19,
+8,
+48
+],
+[
+18,
+8,
+53
+],
+[
+18,
+6,
+47
+],
+[
+16,
+9,
+56
+],
+[
+23,
+5,
+49
+],
+[
+19,
+5,
+43
+],
+[
+25,
+4,
+49
+],
+[
+15,
+4,
+50
+],
+[
+18,
+1,
+51
+],
+[
+17,
+5,
+58
+],
+[
+14,
+8,
+46
+],
+[
+21,
+0,
+57
+],
+[
+19,
+2,
+51
+],
+[
+19,
+3,
+69
+],
+[
+26,
+7,
+52
+],
+[
+18,
+6,
+49
+],
+[
+26,
+10,
+43
+],
+[
+13,
+5,
+54
+],
+[
+15,
+2,
+57
+],
+[
+20,
+6,
+55
+],
+[
+21,
+6,
+47
+],
+[
+17,
+3,
+47
+],
+[
+29,
+4,
+44
+],
+[
+14,
+3,
+54
+],
+[
+21,
+2,
+41
+],
+[
+22,
+4,
+49
+],
+[
+20,
+2,
+51
+],
+[
+24,
+3,
+44
+],
+[
+29,
+2,
+56
+],
+[
+17,
+6,
+56
+],
+[
+15,
+4,
+54
+],
+[
+16,
+2,
+49
+],
+[
+22,
+2,
+26
+],
+[
+19,
+8,
+44
+],
+[
+16,
+6,
+53
+],
+[
+20,
+7,
+41
+],
+[
+19,
+10,
+48
+],
+[
+20,
+2,
+63
+],
+[
+21,
+2,
+49
+],
+[
+18,
+7,
+40
+],
+[
+22,
+7,
+38
+],
+[
+19,
+1,
+47
+],
+[
+21,
+7,
+40
+],
+[
+24,
+6,
+50
+],
+[
+21,
+6,
+61
+],
+[
+18,
+5,
+49
+],
+[
+25,
+3,
+57
+],
+[
+24,
+1,
+54
+],
+[
+22,
+5,
+49
+],
+[
+21,
+5,
+39
+],
+[
+17,
+4,
+47
+],
+[
+25,
+5,
+50
+],
+[
+17,
+6,
+59
+],
+[
+26,
+2,
+66
+],
+[
+18,
+4,
+60
+],
+[
+15,
+7,
+49
+],
+[
+27,
+7,
+37
+],
+[
+20,
+3,
+56
+],
+[
+25,
+4,
+45
+],
+[
+17,
+7,
+56
+],
+[
+19,
+7,
+54
+],
+[
+16,
+4,
+40
+],
+[
+22,
+3,
+47
+],
+[
+18,
+6,
+51
+],
+[
+26,
+2,
+50
+],
+[
+27,
+1,
+53
+],
+[
+22,
+14,
+50
+],
+[
+18,
+1,
+38
+],
+[
+20,
+4,
+44
+] 
+];
+data.addColumn('number','A');
+data.addColumn('number','B');
+data.addColumn('number','C');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartHistogramID12e03739bc7f() {
+var data = gvisDataHistogramID12e03739bc7f();
+var options = {};
+options["allowHtml"] = true;
+options["legend"] = { position: 'top', maxLines: 2 };
+options["colors"] = ['#5C3292', '#1A8763', '#871B47'];
+options["width"] = 400;
+options["height"] = 360;
+
+    var chart = new google.visualization.Histogram(
+    document.getElementById('HistogramID12e03739bc7f')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "corechart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartHistogramID12e03739bc7f);
+})();
+function displayChartHistogramID12e03739bc7f() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartHistogramID12e03739bc7f"></script>
+ 
+
+<!-- divChart -->
+
+<div id="HistogramID12e03739bc7f" 
+  style="width: 400; height: 360;">
+</div>
+
+<h2>Calendar chart</h2>
+
+<pre><code class="r">Cal <- gvisCalendar(Cairo, 
+                    datevar="Date", 
+                    numvar="Temp",
+                    options=list(
+                      title="Daily temperature in Cairo",
+                      height=320,
+                      calendar="{yearLabel: { fontName: 'Times-Roman',
+                               fontSize: 32, color: '#1A8763', bold: true},
+                               cellSize: 10,
+                               cellColor: { stroke: 'red', strokeOpacity: 0.2 },
+                               focusedCellColor: {stroke:'red'}}")
+)
+plot(Cal)
+</code></pre>
+
+<!-- Calendar generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataCalendarID12e03652c88f9 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+new Date(2002,0,1),
+13.61111111
+],
+[
+new Date(2002,0,2),
+15.16666667
+],
+[
+new Date(2002,0,3),
+12
+],
+[
+new Date(2002,0,4),
+12
+],
+[
+new Date(2002,0,5),
+13.05555556
+],
+[
+new Date(2002,0,6),
+10.05555556
+],
+[
+new Date(2002,0,7),
+9.277777778
+],
+[
+new Date(2002,0,8),
+10.5
+],
+[
+new Date(2002,0,9),
+9.888888889
+],
+[
+new Date(2002,0,10),
+8.666666667
+],
+[
+new Date(2002,0,11),
+10.83333333
+],
+[
+new Date(2002,0,12),
+10.94444444
+],
+[
+new Date(2002,0,13),
+11.72222222
+],
+[
+new Date(2002,0,14),
+11.44444444
+],
+[
+new Date(2002,0,15),
+13.16666667
+],
+[
+new Date(2002,0,16),
+12.88888889
+],
+[
+new Date(2002,0,17),
+12.88888889
+],
+[
+new Date(2002,0,18),
+13
+],
+[
+new Date(2002,0,19),
+13.66666667
+],
+[
+new Date(2002,0,20),
+13.5
+],
+[
+new Date(2002,0,21),
+13.66666667
+],
+[
+new Date(2002,0,22),
+13.66666667
+],
+[
+new Date(2002,0,23),
+13.83333333
+],
+[
+new Date(2002,0,24),
+13
+],
+[
+new Date(2002,0,25),
+13.27777778
+],
+[
+new Date(2002,0,26),
+13.77777778
+],
+[
+new Date(2002,0,27),
+13.33333333
+],
+[
+new Date(2002,0,28),
+14.66666667
+],
+[
+new Date(2002,0,29),
+14.5
+],
+[
+new Date(2002,0,30),
+14.33333333
+],
+[
+new Date(2002,0,31),
+14.05555556
+],
+[
+new Date(2002,1,1),
+14.11111111
+],
+[
+new Date(2002,1,2),
+15.16666667
+],
+[
+new Date(2002,1,3),
+15.66666667
+],
+[
+new Date(2002,1,4),
+16.16666667
+],
+[
+new Date(2002,1,5),
+16
+],
+[
+new Date(2002,1,6),
+14.55555556
+],
+[
+new Date(2002,1,7),
+16.33333333
+],
+[
+new Date(2002,1,8),
+16.55555556
+],
+[
+new Date(2002,1,9),
+18.22222222
+],
+[
+new Date(2002,1,10),
+15.88888889
+],
+[
+new Date(2002,1,11),
+14.05555556
+],
+[
+new Date(2002,1,12),
+15.16666667
+],
+[
+new Date(2002,1,13),
+15.33333333
+],
+[
+new Date(2002,1,14),
+15.38888889
+],
+[
+new Date(2002,1,15),
+16.05555556
+],
+[
+new Date(2002,1,16),
+16
+],
+[
+new Date(2002,1,17),
+15.83333333
+],
+[
+new Date(2002,1,18),
+15.44444444
+],
+[
+new Date(2002,1,19),
+15.05555556
+],
+[
+new Date(2002,1,20),
+15.88888889
+],
+[
+new Date(2002,1,21),
+18.22222222
+],
+[
+new Date(2002,1,22),
+18.77777778
+],
+[
+new Date(2002,1,23),
+23.27777778
+],
+[
+new Date(2002,1,24),
+17.27777778
+],
+[
+new Date(2002,1,25),
+17.88888889
+],
+[
+new Date(2002,1,26),
+15.77777778
+],
+[
+new Date(2002,1,27),
+14.5
+],
+[
+new Date(2002,1,28),
+15
+],
+[
+new Date(2002,2,1),
+15.94444444
+],
+[
+new Date(2002,2,2),
+16.5
+],
+[
+new Date(2002,2,3),
+17.27777778
+],
+[
+new Date(2002,2,4),
+18.11111111
+],
+[
+new Date(2002,2,5),
+17.55555556
+],
+[
+new Date(2002,2,6),
+19.72222222
+],
+[
+new Date(2002,2,7),
+22.83333333
+],
+[
+new Date(2002,2,8),
+22.94444444
+],
+[
+new Date(2002,2,9),
+22.66666667
+],
+[
+new Date(2002,2,10),
+24
+],
+[
+new Date(2002,2,11),
+24.55555556
+],
+[
+new Date(2002,2,12),
+20.22222222
+],
+[
+new Date(2002,2,13),
+18.44444444
+],
+[
+new Date(2002,2,14),
+17.5
+],
+[
+new Date(2002,2,15),
+17.55555556
+],
+[
+new Date(2002,2,16),
+17.11111111
+],
+[
+new Date(2002,2,17),
+17.33333333
+],
+[
+new Date(2002,2,18),
+19.44444444
+],
+[
+new Date(2002,2,19),
+18.27777778
+],
+[
+new Date(2002,2,20),
+17.44444444
+],
+[
+new Date(2002,2,21),
+19.05555556
+],
+[
+new Date(2002,2,22),
+19.88888889
+],
+[
+new Date(2002,2,23),
+22.61111111
+],
+[
+new Date(2002,2,24),
+23.72222222
+],
+[
+new Date(2002,2,25),
+19.22222222
+],
+[
+new Date(2002,2,26),
+16.16666667
+],
+[
+new Date(2002,2,27),
+16.33333333
+],
+[
+new Date(2002,2,28),
+15.88888889
+],
+[
+new Date(2002,2,29),
+15.72222222
+],
+[
+new Date(2002,2,30),
+18.55555556
+],
+[
+new Date(2002,2,31),
+20.38888889
+],
+[
+new Date(2002,3,1),
+17.94444444
+],
+[
+new Date(2002,3,2),
+15.83333333
+],
+[
+new Date(2002,3,3),
+17.88888889
+],
+[
+new Date(2002,3,4),
+22.05555556
+],
+[
+new Date(2002,3,5),
+27.83333333
+],
+[
+new Date(2002,3,6),
+24.16666667
+],
+[
+new Date(2002,3,7),
+19.33333333
+],
+[
+new Date(2002,3,8),
+18.5
+],
+[
+new Date(2002,3,9),
+18.88888889
+],
+[
+new Date(2002,3,10),
+19.33333333
+],
+[
+new Date(2002,3,11),
+20.66666667
+],
+[
+new Date(2002,3,12),
+22.55555556
+],
+[
+new Date(2002,3,13),
+26.5
+],
+[
+new Date(2002,3,14),
+31.38888889
+],
+[
+new Date(2002,3,15),
+30.83333333
+],
+[
+new Date(2002,3,16),
+25.61111111
+],
+[
+new Date(2002,3,17),
+21
+],
+[
+new Date(2002,3,18),
+19.16666667
+],
+[
+new Date(2002,3,19),
+19.33333333
+],
+[
+new Date(2002,3,20),
+19.05555556
+],
+[
+new Date(2002,3,21),
+19.27777778
+],
+[
+new Date(2002,3,22),
+19.88888889
+],
+[
+new Date(2002,3,23),
+22.22222222
+],
+[
+new Date(2002,3,24),
+20.16666667
+],
+[
+new Date(2002,3,25),
+19.61111111
+],
+[
+new Date(2002,3,26),
+18.72222222
+],
+[
+new Date(2002,3,27),
+18.94444444
+],
+[
+new Date(2002,3,28),
+19.5
+],
+[
+new Date(2002,3,29),
+19.27777778
+],
+[
+new Date(2002,3,30),
+20.22222222
+],
+[
+new Date(2002,4,1),
+21.44444444
+],
+[
+new Date(2002,4,2),
+21.16666667
+],
+[
+new Date(2002,4,3),
+21.66666667
+],
+[
+new Date(2002,4,4),
+23.27777778
+],
+[
+new Date(2002,4,5),
+25.88888889
+],
+[
+new Date(2002,4,6),
+25.66666667
+],
+[
+new Date(2002,4,7),
+24.33333333
+],
+[
+new Date(2002,4,8),
+24.88888889
+],
+[
+new Date(2002,4,9),
+26
+],
+[
+new Date(2002,4,10),
+27.33333333
+],
+[
+new Date(2002,4,11),
+24.83333333
+],
+[
+new Date(2002,4,12),
+27.77777778
+],
+[
+new Date(2002,4,13),
+29.72222222
+],
+[
+new Date(2002,4,14),
+22.88888889
+],
+[
+new Date(2002,4,15),
+22.27777778
+],
+[
+new Date(2002,4,16),
+22.61111111
+],
+[
+new Date(2002,4,17),
+22.55555556
+],
+[
+new Date(2002,4,18),
+23.22222222
+],
+[
+new Date(2002,4,19),
+23.16666667
+],
+[
+new Date(2002,4,20),
+24.22222222
+],
+[
+new Date(2002,4,21),
+27.72222222
+],
+[
+new Date(2002,4,22),
+24
+],
+[
+new Date(2002,4,23),
+24.83333333
+],
+[
+new Date(2002,4,24),
+24.44444444
+],
+[
+new Date(2002,4,25),
+25.5
+],
+[
+new Date(2002,4,26),
+27.66666667
+],
+[
+new Date(2002,4,27),
+26.61111111
+],
+[
+new Date(2002,4,28),
+24.94444444
+],
+[
+new Date(2002,4,29),
+26.05555556
+],
+[
+new Date(2002,4,30),
+29.33333333
+],
+[
+new Date(2002,4,31),
+25.44444444
+],
+[
+new Date(2002,5,1),
+24.66666667
+],
+[
+new Date(2002,5,2),
+24.83333333
+],
+[
+new Date(2002,5,3),
+25.44444444
+],
+[
+new Date(2002,5,4),
+25.77777778
+],
+[
+new Date(2002,5,5),
+25.05555556
+],
+[
+new Date(2002,5,6),
+25.66666667
+],
+[
+new Date(2002,5,7),
+26.88888889
+],
+[
+new Date(2002,5,8),
+29.88888889
+],
+[
+new Date(2002,5,9),
+30.88888889
+],
+[
+new Date(2002,5,10),
+31.5
+],
+[
+new Date(2002,5,11),
+28.22222222
+],
+[
+new Date(2002,5,12),
+25.77777778
+],
+[
+new Date(2002,5,13),
+25.66666667
+],
+[
+new Date(2002,5,14),
+26.44444444
+],
+[
+new Date(2002,5,15),
+26.88888889
+],
+[
+new Date(2002,5,16),
+26.88888889
+],
+[
+new Date(2002,5,17),
+27.66666667
+],
+[
+new Date(2002,5,22),
+27.44444444
+],
+[
+new Date(2002,5,23),
+27.5
+],
+[
+new Date(2002,5,24),
+28.11111111
+],
+[
+new Date(2002,5,25),
+28.72222222
+],
+[
+new Date(2002,5,26),
+28.44444444
+],
+[
+new Date(2002,5,27),
+28.16666667
+],
+[
+new Date(2002,5,28),
+27.11111111
+],
+[
+new Date(2002,5,29),
+27.16666667
+],
+[
+new Date(2002,5,30),
+28.27777778
+],
+[
+new Date(2002,6,1),
+29
+],
+[
+new Date(2002,6,2),
+28.5
+],
+[
+new Date(2002,6,3),
+27.61111111
+],
+[
+new Date(2002,6,4),
+28.5
+],
+[
+new Date(2002,6,5),
+30.33333333
+],
+[
+new Date(2002,6,6),
+29.66666667
+],
+[
+new Date(2002,6,7),
+29.5
+],
+[
+new Date(2002,6,8),
+28.77777778
+],
+[
+new Date(2002,6,9),
+32.33333333
+],
+[
+new Date(2002,6,10),
+29.05555556
+],
+[
+new Date(2002,6,11),
+28.66666667
+],
+[
+new Date(2002,6,12),
+29.88888889
+],
+[
+new Date(2002,6,13),
+31
+],
+[
+new Date(2002,6,14),
+30.66666667
+],
+[
+new Date(2002,6,15),
+29.5
+],
+[
+new Date(2002,6,16),
+30.72222222
+],
+[
+new Date(2002,6,17),
+31.61111111
+],
+[
+new Date(2002,6,18),
+31.33333333
+],
+[
+new Date(2002,6,19),
+30.27777778
+],
+[
+new Date(2002,6,20),
+29.44444444
+],
+[
+new Date(2002,6,21),
+28.44444444
+],
+[
+new Date(2002,6,22),
+28.27777778
+],
+[
+new Date(2002,6,23),
+29.27777778
+],
+[
+new Date(2002,6,24),
+29.66666667
+],
+[
+new Date(2002,6,25),
+29.11111111
+],
+[
+new Date(2002,6,26),
+31.94444444
+],
+[
+new Date(2002,6,27),
+34
+],
+[
+new Date(2002,6,28),
+33.77777778
+],
+[
+new Date(2002,6,29),
+36.55555556
+],
+[
+new Date(2002,6,30),
+35.44444444
+],
+[
+new Date(2002,6,31),
+33.22222222
+],
+[
+new Date(2002,7,1),
+31
+],
+[
+new Date(2002,7,2),
+29
+],
+[
+new Date(2002,7,3),
+28.77777778
+],
+[
+new Date(2002,7,4),
+29.66666667
+],
+[
+new Date(2002,7,5),
+30.16666667
+],
+[
+new Date(2002,7,6),
+30.44444444
+],
+[
+new Date(2002,7,7),
+30.5
+],
+[
+new Date(2002,7,8),
+31.61111111
+],
+[
+new Date(2002,7,9),
+29.05555556
+],
+[
+new Date(2002,7,10),
+28.83333333
+],
+[
+new Date(2002,7,11),
+29.33333333
+],
+[
+new Date(2002,7,12),
+31.77777778
+],
+[
+new Date(2002,7,13),
+31.83333333
+],
+[
+new Date(2002,7,14),
+29.66666667
+],
+[
+new Date(2002,7,15),
+28.94444444
+],
+[
+new Date(2002,7,16),
+28.77777778
+],
+[
+new Date(2002,7,17),
+28.55555556
+],
+[
+new Date(2002,7,18),
+28.61111111
+],
+[
+new Date(2002,7,19),
+28.38888889
+],
+[
+new Date(2002,7,20),
+28.88888889
+],
+[
+new Date(2002,7,21),
+28.83333333
+],
+[
+new Date(2002,7,22),
+28.27777778
+],
+[
+new Date(2002,7,23),
+27.55555556
+],
+[
+new Date(2002,7,24),
+27.55555556
+],
+[
+new Date(2002,7,25),
+27.77777778
+],
+[
+new Date(2002,7,26),
+28.5
+],
+[
+new Date(2002,7,27),
+29
+],
+[
+new Date(2002,7,28),
+28.66666667
+],
+[
+new Date(2002,7,29),
+28.11111111
+],
+[
+new Date(2002,7,30),
+28.22222222
+],
+[
+new Date(2002,7,31),
+29.5
+],
+[
+new Date(2002,8,1),
+31.77777778
+],
+[
+new Date(2002,8,2),
+27.33333333
+],
+[
+new Date(2002,8,3),
+29.77777778
+],
+[
+new Date(2002,8,4),
+28.61111111
+],
+[
+new Date(2002,8,5),
+27.38888889
+],
+[
+new Date(2002,8,6),
+27.44444444
+],
+[
+new Date(2002,8,7),
+27.88888889
+],
+[
+new Date(2002,8,8),
+28.05555556
+],
+[
+new Date(2002,8,9),
+29.27777778
+],
+[
+new Date(2002,8,10),
+31.22222222
+],
+[
+new Date(2002,8,11),
+27.72222222
+],
+[
+new Date(2002,8,12),
+28.22222222
+],
+[
+new Date(2002,8,13),
+28.83333333
+],
+[
+new Date(2002,8,14),
+28.11111111
+],
+[
+new Date(2002,8,15),
+29.94444444
+],
+[
+new Date(2002,8,16),
+33.66666667
+],
+[
+new Date(2002,8,17),
+34.55555556
+],
+[
+new Date(2002,8,18),
+27.94444444
+],
+[
+new Date(2002,8,19),
+26.22222222
+],
+[
+new Date(2002,8,20),
+25.27777778
+],
+[
+new Date(2002,8,21),
+25.55555556
+],
+[
+new Date(2002,8,22),
+26.38888889
+],
+[
+new Date(2002,8,23),
+26.05555556
+],
+[
+new Date(2002,8,24),
+26.61111111
+],
+[
+new Date(2002,8,25),
+26.05555556
+],
+[
+new Date(2002,8,26),
+28
+],
+[
+new Date(2002,8,27),
+29
+],
+[
+new Date(2002,8,28),
+28.44444444
+],
+[
+new Date(2002,8,29),
+30
+],
+[
+new Date(2002,8,30),
+29.16666667
+],
+[
+new Date(2002,9,1),
+28.5
+],
+[
+new Date(2002,9,2),
+26
+],
+[
+new Date(2002,9,3),
+23.33333333
+],
+[
+new Date(2002,9,4),
+23.77777778
+],
+[
+new Date(2002,9,5),
+23.83333333
+],
+[
+new Date(2002,9,6),
+24.11111111
+],
+[
+new Date(2002,9,7),
+25.16666667
+],
+[
+new Date(2002,9,8),
+25.94444444
+],
+[
+new Date(2002,9,9),
+24.88888889
+],
+[
+new Date(2002,9,10),
+24.66666667
+],
+[
+new Date(2002,9,11),
+25
+],
+[
+new Date(2002,9,12),
+26.11111111
+],
+[
+new Date(2002,9,13),
+27.05555556
+],
+[
+new Date(2002,9,14),
+26.66666667
+],
+[
+new Date(2002,9,15),
+25
+],
+[
+new Date(2002,9,16),
+22.83333333
+],
+[
+new Date(2002,9,17),
+24.05555556
+],
+[
+new Date(2002,9,18),
+24.27777778
+],
+[
+new Date(2002,9,19),
+24.5
+],
+[
+new Date(2002,9,20),
+24.05555556
+],
+[
+new Date(2002,9,21),
+23.88888889
+],
+[
+new Date(2002,9,22),
+22.66666667
+],
+[
+new Date(2002,9,23),
+22.88888889
+],
+[
+new Date(2002,9,24),
+23.55555556
+],
+[
+new Date(2002,9,25),
+24.05555556
+],
+[
+new Date(2002,9,26),
+25.22222222
+],
+[
+new Date(2002,9,27),
+23.44444444
+],
+[
+new Date(2002,9,28),
+22.44444444
+],
+[
+new Date(2002,9,29),
+22.11111111
+],
+[
+new Date(2002,9,30),
+21.83333333
+],
+[
+new Date(2002,9,31),
+21.66666667
+],
+[
+new Date(2002,10,1),
+21.44444444
+],
+[
+new Date(2002,10,2),
+21.61111111
+],
+[
+new Date(2002,10,3),
+22.33333333
+],
+[
+new Date(2002,10,4),
+22.61111111
+],
+[
+new Date(2002,10,5),
+22.27777778
+],
+[
+new Date(2002,10,6),
+21.55555556
+],
+[
+new Date(2002,10,7),
+21.44444444
+],
+[
+new Date(2002,10,8),
+24.22222222
+],
+[
+new Date(2002,10,9),
+22.5
+],
+[
+new Date(2002,10,10),
+20.61111111
+],
+[
+new Date(2002,10,11),
+20.16666667
+],
+[
+new Date(2002,10,12),
+20.33333333
+],
+[
+new Date(2002,10,13),
+19.44444444
+],
+[
+new Date(2002,10,14),
+19.72222222
+],
+[
+new Date(2002,10,15),
+19.55555556
+],
+[
+new Date(2002,10,16),
+20.83333333
+],
+[
+new Date(2002,10,17),
+20.66666667
+],
+[
+new Date(2002,10,18),
+19.72222222
+],
+[
+new Date(2002,10,19),
+18.44444444
+],
+[
+new Date(2002,10,20),
+18.22222222
+],
+[
+new Date(2002,10,21),
+19.44444444
+],
+[
+new Date(2002,10,22),
+19.88888889
+],
+[
+new Date(2002,10,23),
+19.72222222
+],
+[
+new Date(2002,10,24),
+19.61111111
+],
+[
+new Date(2002,10,25),
+18.83333333
+],
+[
+new Date(2002,10,26),
+17.88888889
+],
+[
+new Date(2002,10,27),
+18.11111111
+],
+[
+new Date(2002,10,28),
+16.72222222
+],
+[
+new Date(2002,10,29),
+19.05555556
+],
+[
+new Date(2002,10,30),
+18.33333333
+],
+[
+new Date(2002,11,1),
+17.94444444
+],
+[
+new Date(2002,11,2),
+18.61111111
+],
+[
+new Date(2002,11,3),
+17.88888889
+],
+[
+new Date(2002,11,4),
+16.61111111
+],
+[
+new Date(2002,11,5),
+18.16666667
+],
+[
+new Date(2002,11,6),
+18.83333333
+],
+[
+new Date(2002,11,7),
+18.27777778
+],
+[
+new Date(2002,11,8),
+20.61111111
+],
+[
+new Date(2002,11,9),
+17.66666667
+],
+[
+new Date(2002,11,10),
+16.11111111
+],
+[
+new Date(2002,11,11),
+16.16666667
+],
+[
+new Date(2002,11,12),
+15.72222222
+],
+[
+new Date(2002,11,13),
+15.11111111
+],
+[
+new Date(2002,11,14),
+15.05555556
+],
+[
+new Date(2002,11,15),
+16.66666667
+],
+[
+new Date(2002,11,16),
+16.88888889
+],
+[
+new Date(2002,11,17),
+16.5
+],
+[
+new Date(2002,11,18),
+16.66666667
+],
+[
+new Date(2002,11,19),
+17.05555556
+],
+[
+new Date(2002,11,20),
+13.94444444
+],
+[
+new Date(2002,11,21),
+11.83333333
+],
+[
+new Date(2002,11,22),
+12.27777778
+],
+[
+new Date(2002,11,23),
+13.16666667
+],
+[
+new Date(2002,11,24),
+14.88888889
+],
+[
+new Date(2002,11,25),
+15.5
+],
+[
+new Date(2002,11,26),
+17.27777778
+],
+[
+new Date(2002,11,27),
+16.38888889
+],
+[
+new Date(2002,11,28),
+15.5
+],
+[
+new Date(2002,11,29),
+15.88888889
+],
+[
+new Date(2002,11,30),
+16.44444444
+],
+[
+new Date(2002,11,31),
+16.22222222
+],
+[
+new Date(2003,0,1),
+16.5
+],
+[
+new Date(2003,0,2),
+16.11111111
+],
+[
+new Date(2003,0,3),
+16.22222222
+],
+[
+new Date(2003,0,4),
+17.05555556
+],
+[
+new Date(2003,0,5),
+17.88888889
+],
+[
+new Date(2003,0,6),
+19.44444444
+],
+[
+new Date(2003,0,7),
+18.16666667
+],
+[
+new Date(2003,0,8),
+17.61111111
+],
+[
+new Date(2003,0,9),
+16.11111111
+],
+[
+new Date(2003,0,10),
+16.27777778
+],
+[
+new Date(2003,0,11),
+16.94444444
+],
+[
+new Date(2003,0,12),
+20.44444444
+],
+[
+new Date(2003,0,13),
+16.55555556
+],
+[
+new Date(2003,0,14),
+16.11111111
+],
+[
+new Date(2003,0,15),
+14.44444444
+],
+[
+new Date(2003,0,16),
+14.83333333
+],
+[
+new Date(2003,0,17),
+14.94444444
+],
+[
+new Date(2003,0,18),
+15.27777778
+],
+[
+new Date(2003,0,19),
+14.33333333
+],
+[
+new Date(2003,0,20),
+15.22222222
+],
+[
+new Date(2003,0,21),
+15.5
+],
+[
+new Date(2003,0,22),
+15.83333333
+],
+[
+new Date(2003,0,23),
+15.66666667
+],
+[
+new Date(2003,0,24),
+15.94444444
+],
+[
+new Date(2003,0,25),
+15.77777778
+],
+[
+new Date(2003,0,26),
+17.27777778
+],
+[
+new Date(2003,0,27),
+15.55555556
+],
+[
+new Date(2003,0,28),
+14.61111111
+],
+[
+new Date(2003,0,29),
+15.38888889
+],
+[
+new Date(2003,0,30),
+15.61111111
+],
+[
+new Date(2003,0,31),
+15.72222222
+],
+[
+new Date(2003,1,1),
+17.66666667
+],
+[
+new Date(2003,1,2),
+16.61111111
+],
+[
+new Date(2003,1,3),
+14.22222222
+],
+[
+new Date(2003,1,4),
+14.16666667
+],
+[
+new Date(2003,1,5),
+14.22222222
+],
+[
+new Date(2003,1,6),
+15.27777778
+],
+[
+new Date(2003,1,7),
+18.55555556
+],
+[
+new Date(2003,1,8),
+13.66666667
+],
+[
+new Date(2003,1,9),
+13.27777778
+],
+[
+new Date(2003,1,10),
+13.05555556
+],
+[
+new Date(2003,1,11),
+14
+],
+[
+new Date(2003,1,12),
+15.5
+],
+[
+new Date(2003,1,13),
+13.83333333
+],
+[
+new Date(2003,1,14),
+13.83333333
+],
+[
+new Date(2003,1,15),
+14.05555556
+],
+[
+new Date(2003,1,16),
+14.88888889
+],
+[
+new Date(2003,1,17),
+19.72222222
+],
+[
+new Date(2003,1,18),
+21.5
+],
+[
+new Date(2003,1,19),
+15.83333333
+],
+[
+new Date(2003,1,20),
+14.55555556
+],
+[
+new Date(2003,1,21),
+15.66666667
+],
+[
+new Date(2003,1,22),
+13.61111111
+],
+[
+new Date(2003,1,23),
+15.11111111
+],
+[
+new Date(2003,1,24),
+10.83333333
+],
+[
+new Date(2003,1,25),
+10.44444444
+],
+[
+new Date(2003,1,26),
+11.27777778
+],
+[
+new Date(2003,1,27),
+12.38888889
+],
+[
+new Date(2003,1,28),
+13.33333333
+],
+[
+new Date(2003,2,1),
+16.83333333
+],
+[
+new Date(2003,2,2),
+20.44444444
+],
+[
+new Date(2003,2,3),
+16.5
+],
+[
+new Date(2003,2,4),
+16.66666667
+],
+[
+new Date(2003,2,5),
+18.94444444
+],
+[
+new Date(2003,2,6),
+15.94444444
+],
+[
+new Date(2003,2,7),
+15.77777778
+],
+[
+new Date(2003,2,8),
+15.5
+],
+[
+new Date(2003,2,9),
+16.22222222
+],
+[
+new Date(2003,2,10),
+15.72222222
+],
+[
+new Date(2003,2,11),
+14.11111111
+],
+[
+new Date(2003,2,12),
+14
+],
+[
+new Date(2003,2,13),
+15.94444444
+],
+[
+new Date(2003,2,14),
+18.5
+],
+[
+new Date(2003,2,15),
+18.16666667
+],
+[
+new Date(2003,2,16),
+16.61111111
+],
+[
+new Date(2003,2,17),
+19.38888889
+],
+[
+new Date(2003,2,18),
+16.05555556
+],
+[
+new Date(2003,2,19),
+14.88888889
+],
+[
+new Date(2003,2,20),
+14.72222222
+],
+[
+new Date(2003,2,21),
+14.38888889
+],
+[
+new Date(2003,2,22),
+15.16666667
+],
+[
+new Date(2003,2,23),
+15.44444444
+],
+[
+new Date(2003,2,24),
+12.11111111
+],
+[
+new Date(2003,2,25),
+8.777777778
+],
+[
+new Date(2003,2,26),
+14.16666667
+],
+[
+new Date(2003,2,27),
+16.38888889
+],
+[
+new Date(2003,2,28),
+16.16666667
+],
+[
+new Date(2003,2,29),
+16.05555556
+],
+[
+new Date(2003,2,30),
+16.72222222
+],
+[
+new Date(2003,2,31),
+19.55555556
+],
+[
+new Date(2003,3,1),
+21.38888889
+],
+[
+new Date(2003,3,2),
+28.33333333
+],
+[
+new Date(2003,3,3),
+25.05555556
+],
+[
+new Date(2003,3,5),
+31.55555556
+],
+[
+new Date(2003,3,6),
+22.11111111
+],
+[
+new Date(2003,3,7),
+21
+],
+[
+new Date(2003,3,8),
+20.5
+],
+[
+new Date(2003,3,9),
+19.27777778
+],
+[
+new Date(2003,3,10),
+18
+],
+[
+new Date(2003,3,11),
+18.11111111
+],
+[
+new Date(2003,3,12),
+19.66666667
+],
+[
+new Date(2003,3,13),
+19.61111111
+],
+[
+new Date(2003,3,14),
+20.22222222
+],
+[
+new Date(2003,3,15),
+18.61111111
+],
+[
+new Date(2003,3,16),
+19.05555556
+],
+[
+new Date(2003,3,17),
+23.88888889
+],
+[
+new Date(2003,3,18),
+26.44444444
+],
+[
+new Date(2003,3,19),
+21.83333333
+],
+[
+new Date(2003,3,20),
+18.61111111
+],
+[
+new Date(2003,3,21),
+17.77777778
+],
+[
+new Date(2003,3,22),
+18.72222222
+],
+[
+new Date(2003,3,23),
+26.38888889
+],
+[
+new Date(2003,3,24),
+31.77777778
+],
+[
+new Date(2003,3,25),
+23.22222222
+],
+[
+new Date(2003,3,26),
+18.5
+],
+[
+new Date(2003,3,27),
+18.22222222
+],
+[
+new Date(2003,3,28),
+19.27777778
+],
+[
+new Date(2003,3,29),
+20.16666667
+],
+[
+new Date(2003,3,30),
+20.05555556
+],
+[
+new Date(2003,4,1),
+21.05555556
+],
+[
+new Date(2003,4,2),
+23.27777778
+],
+[
+new Date(2003,4,3),
+25.11111111
+],
+[
+new Date(2003,4,4),
+26.05555556
+],
+[
+new Date(2003,4,5),
+25.77777778
+],
+[
+new Date(2003,4,6),
+24.38888889
+],
+[
+new Date(2003,4,7),
+24
+],
+[
+new Date(2003,4,8),
+25.55555556
+],
+[
+new Date(2003,4,9),
+25.27777778
+],
+[
+new Date(2003,4,10),
+24.38888889
+],
+[
+new Date(2003,4,11),
+24.77777778
+],
+[
+new Date(2003,4,12),
+26.27777778
+],
+[
+new Date(2003,4,13),
+27.66666667
+],
+[
+new Date(2003,4,14),
+28.11111111
+],
+[
+new Date(2003,4,15),
+31.27777778
+],
+[
+new Date(2003,4,16),
+29.11111111
+],
+[
+new Date(2003,4,17),
+26.27777778
+],
+[
+new Date(2003,4,18),
+27.5
+],
+[
+new Date(2003,4,19),
+27.83333333
+],
+[
+new Date(2003,4,20),
+26.44444444
+],
+[
+new Date(2003,4,21),
+27.44444444
+],
+[
+new Date(2003,4,22),
+27.66666667
+],
+[
+new Date(2003,4,23),
+30.11111111
+],
+[
+new Date(2003,4,24),
+27.66666667
+],
+[
+new Date(2003,4,25),
+27
+],
+[
+new Date(2003,4,26),
+26.38888889
+],
+[
+new Date(2003,4,27),
+25.38888889
+],
+[
+new Date(2003,4,28),
+30.88888889
+],
+[
+new Date(2003,4,29),
+34.38888889
+],
+[
+new Date(2003,4,30),
+27.33333333
+],
+[
+new Date(2003,4,31),
+26.27777778
+],
+[
+new Date(2003,5,1),
+25.44444444
+],
+[
+new Date(2003,5,2),
+26.72222222
+],
+[
+new Date(2003,5,3),
+26.38888889
+],
+[
+new Date(2003,5,4),
+25.61111111
+],
+[
+new Date(2003,5,5),
+27
+],
+[
+new Date(2003,5,6),
+28.05555556
+],
+[
+new Date(2003,5,7),
+28.94444444
+],
+[
+new Date(2003,5,8),
+27.72222222
+],
+[
+new Date(2003,5,9),
+27.72222222
+],
+[
+new Date(2003,5,10),
+28
+],
+[
+new Date(2003,5,11),
+27.27777778
+],
+[
+new Date(2003,5,12),
+27.83333333
+],
+[
+new Date(2003,5,13),
+28.05555556
+],
+[
+new Date(2003,5,14),
+28.66666667
+],
+[
+new Date(2003,5,15),
+30.44444444
+],
+[
+new Date(2003,5,16),
+32.5
+],
+[
+new Date(2003,5,17),
+31.72222222
+],
+[
+new Date(2003,5,18),
+28.83333333
+],
+[
+new Date(2003,5,19),
+28.61111111
+],
+[
+new Date(2003,5,20),
+28.5
+],
+[
+new Date(2003,5,21),
+29.77777778
+],
+[
+new Date(2003,5,22),
+29.94444444
+],
+[
+new Date(2003,5,23),
+28.72222222
+],
+[
+new Date(2003,5,24),
+28.77777778
+],
+[
+new Date(2003,5,25),
+29.27777778
+],
+[
+new Date(2003,5,26),
+29.33333333
+],
+[
+new Date(2003,5,27),
+28.72222222
+],
+[
+new Date(2003,5,28),
+29.27777778
+],
+[
+new Date(2003,5,29),
+28.94444444
+],
+[
+new Date(2003,5,30),
+29.44444444
+],
+[
+new Date(2003,6,1),
+29.38888889
+],
+[
+new Date(2003,6,2),
+29.5
+],
+[
+new Date(2003,6,3),
+30.83333333
+],
+[
+new Date(2003,6,4),
+30.94444444
+],
+[
+new Date(2003,6,5),
+30.05555556
+],
+[
+new Date(2003,6,6),
+31.77777778
+],
+[
+new Date(2003,6,7),
+28.88888889
+],
+[
+new Date(2003,6,8),
+27.77777778
+],
+[
+new Date(2003,6,9),
+27.22222222
+],
+[
+new Date(2003,6,10),
+26.77777778
+],
+[
+new Date(2003,6,11),
+26.88888889
+],
+[
+new Date(2003,6,12),
+27.22222222
+],
+[
+new Date(2003,6,13),
+27.72222222
+],
+[
+new Date(2003,6,14),
+27
+],
+[
+new Date(2003,6,15),
+27.33333333
+],
+[
+new Date(2003,6,16),
+27.77777778
+],
+[
+new Date(2003,6,17),
+28.16666667
+],
+[
+new Date(2003,6,18),
+29.33333333
+],
+[
+new Date(2003,6,19),
+30.38888889
+],
+[
+new Date(2003,6,20),
+30.38888889
+],
+[
+new Date(2003,6,21),
+28.16666667
+],
+[
+new Date(2003,6,22),
+27.77777778
+],
+[
+new Date(2003,6,23),
+28.77777778
+],
+[
+new Date(2003,6,24),
+28.44444444
+],
+[
+new Date(2003,6,25),
+28.61111111
+],
+[
+new Date(2003,6,26),
+29.38888889
+],
+[
+new Date(2003,6,27),
+28.61111111
+],
+[
+new Date(2003,6,28),
+28.33333333
+],
+[
+new Date(2003,6,29),
+28.72222222
+],
+[
+new Date(2003,6,30),
+28.72222222
+],
+[
+new Date(2003,6,31),
+29.05555556
+],
+[
+new Date(2003,7,1),
+29.44444444
+],
+[
+new Date(2003,7,2),
+30.27777778
+],
+[
+new Date(2003,7,3),
+30.61111111
+],
+[
+new Date(2003,7,4),
+29.83333333
+],
+[
+new Date(2003,7,5),
+28.88888889
+],
+[
+new Date(2003,7,6),
+29
+],
+[
+new Date(2003,7,7),
+28.38888889
+],
+[
+new Date(2003,7,8),
+28.94444444
+],
+[
+new Date(2003,7,9),
+28.83333333
+],
+[
+new Date(2003,7,10),
+28.5
+],
+[
+new Date(2003,7,11),
+27.27777778
+],
+[
+new Date(2003,7,12),
+27.38888889
+],
+[
+new Date(2003,7,13),
+28.11111111
+],
+[
+new Date(2003,7,14),
+27.77777778
+],
+[
+new Date(2003,7,15),
+27.94444444
+],
+[
+new Date(2003,7,16),
+28.38888889
+],
+[
+new Date(2003,7,17),
+29.05555556
+],
+[
+new Date(2003,7,18),
+29
+],
+[
+new Date(2003,7,19),
+29.66666667
+],
+[
+new Date(2003,7,20),
+29.83333333
+],
+[
+new Date(2003,7,21),
+29.16666667
+],
+[
+new Date(2003,7,22),
+29.22222222
+],
+[
+new Date(2003,7,23),
+28.88888889
+],
+[
+new Date(2003,7,24),
+28.88888889
+],
+[
+new Date(2003,7,25),
+29.22222222
+],
+[
+new Date(2003,7,26),
+28.94444444
+],
+[
+new Date(2003,7,27),
+28.94444444
+],
+[
+new Date(2003,7,28),
+30.44444444
+],
+[
+new Date(2003,7,29),
+29.5
+],
+[
+new Date(2003,7,30),
+29.05555556
+],
+[
+new Date(2003,7,31),
+29
+],
+[
+new Date(2003,8,1),
+29.66666667
+],
+[
+new Date(2003,8,2),
+31.27777778
+],
+[
+new Date(2003,8,3),
+30.11111111
+],
+[
+new Date(2003,8,4),
+29.27777778
+],
+[
+new Date(2003,8,5),
+26.66666667
+],
+[
+new Date(2003,8,6),
+25
+],
+[
+new Date(2003,8,7),
+25.33333333
+],
+[
+new Date(2003,8,8),
+26.27777778
+],
+[
+new Date(2003,8,9),
+25.44444444
+],
+[
+new Date(2003,8,10),
+28.83333333
+],
+[
+new Date(2003,8,11),
+31.66666667
+],
+[
+new Date(2003,8,12),
+28.22222222
+],
+[
+new Date(2003,8,13),
+27.27777778
+],
+[
+new Date(2003,8,14),
+27.05555556
+],
+[
+new Date(2003,8,15),
+26.77777778
+],
+[
+new Date(2003,8,16),
+27.27777778
+],
+[
+new Date(2003,8,17),
+30.44444444
+],
+[
+new Date(2003,8,18),
+28.05555556
+],
+[
+new Date(2003,8,19),
+25.72222222
+],
+[
+new Date(2003,8,20),
+25.66666667
+],
+[
+new Date(2003,8,21),
+26.05555556
+],
+[
+new Date(2003,8,22),
+25.44444444
+],
+[
+new Date(2003,8,23),
+25.83333333
+],
+[
+new Date(2003,8,24),
+26.22222222
+],
+[
+new Date(2003,8,25),
+25.11111111
+],
+[
+new Date(2003,8,26),
+25.05555556
+],
+[
+new Date(2003,8,27),
+24.88888889
+],
+[
+new Date(2003,8,28),
+24.16666667
+],
+[
+new Date(2003,8,29),
+24.22222222
+],
+[
+new Date(2003,8,30),
+26.11111111
+],
+[
+new Date(2003,9,1),
+26.11111111
+],
+[
+new Date(2003,9,2),
+24.88888889
+],
+[
+new Date(2003,9,3),
+25.05555556
+],
+[
+new Date(2003,9,4),
+25.27777778
+],
+[
+new Date(2003,9,5),
+25.38888889
+],
+[
+new Date(2003,9,6),
+26.16666667
+],
+[
+new Date(2003,9,7),
+26
+],
+[
+new Date(2003,9,8),
+25.77777778
+],
+[
+new Date(2003,9,9),
+26
+],
+[
+new Date(2003,9,10),
+25.72222222
+],
+[
+new Date(2003,9,11),
+23.05555556
+],
+[
+new Date(2003,9,12),
+21.72222222
+],
+[
+new Date(2003,9,13),
+22.55555556
+],
+[
+new Date(2003,9,14),
+23
+],
+[
+new Date(2003,9,15),
+22.55555556
+],
+[
+new Date(2003,9,16),
+22.55555556
+],
+[
+new Date(2003,9,17),
+22.66666667
+],
+[
+new Date(2003,9,18),
+24.11111111
+],
+[
+new Date(2003,9,19),
+23.55555556
+],
+[
+new Date(2003,9,20),
+24.5
+],
+[
+new Date(2003,9,21),
+26
+],
+[
+new Date(2003,9,22),
+26.61111111
+],
+[
+new Date(2003,9,23),
+26.5
+],
+[
+new Date(2003,9,24),
+26.88888889
+],
+[
+new Date(2003,9,25),
+25.05555556
+],
+[
+new Date(2003,9,26),
+26.16666667
+],
+[
+new Date(2003,9,27),
+23.77777778
+],
+[
+new Date(2003,9,28),
+24.44444444
+],
+[
+new Date(2003,9,29),
+21.5
+],
+[
+new Date(2003,9,30),
+20.33333333
+],
+[
+new Date(2003,9,31),
+24.5
+],
+[
+new Date(2003,10,1),
+28
+],
+[
+new Date(2003,10,2),
+25.66666667
+],
+[
+new Date(2003,10,3),
+24.44444444
+],
+[
+new Date(2003,10,4),
+24.27777778
+],
+[
+new Date(2003,10,5),
+22.66666667
+],
+[
+new Date(2003,10,6),
+23.55555556
+],
+[
+new Date(2003,10,7),
+23.05555556
+],
+[
+new Date(2003,10,8),
+21.16666667
+],
+[
+new Date(2003,10,9),
+20.27777778
+],
+[
+new Date(2003,10,10),
+18.38888889
+],
+[
+new Date(2003,10,11),
+17.83333333
+],
+[
+new Date(2003,10,12),
+17.5
+],
+[
+new Date(2003,10,13),
+17.77777778
+],
+[
+new Date(2003,10,14),
+18.61111111
+],
+[
+new Date(2003,10,15),
+18.83333333
+],
+[
+new Date(2003,10,16),
+18.88888889
+],
+[
+new Date(2003,10,17),
+18.83333333
+],
+[
+new Date(2003,10,18),
+19.22222222
+],
+[
+new Date(2003,10,19),
+18.77777778
+],
+[
+new Date(2003,10,20),
+19.22222222
+],
+[
+new Date(2003,10,21),
+19.11111111
+],
+[
+new Date(2003,10,22),
+19.66666667
+],
+[
+new Date(2003,10,23),
+19.72222222
+],
+[
+new Date(2003,10,24),
+19.27777778
+],
+[
+new Date(2003,10,25),
+19.27777778
+],
+[
+new Date(2003,10,26),
+18.61111111
+],
+[
+new Date(2003,10,27),
+17.77777778
+],
+[
+new Date(2003,10,28),
+17.5
+],
+[
+new Date(2003,10,29),
+17.72222222
+],
+[
+new Date(2003,10,30),
+17.66666667
+],
+[
+new Date(2003,11,1),
+17.72222222
+],
+[
+new Date(2003,11,2),
+17.11111111
+],
+[
+new Date(2003,11,3),
+17.11111111
+],
+[
+new Date(2003,11,4),
+15.27777778
+],
+[
+new Date(2003,11,5),
+15.77777778
+],
+[
+new Date(2003,11,6),
+16.22222222
+],
+[
+new Date(2003,11,7),
+16.38888889
+],
+[
+new Date(2003,11,8),
+16.44444444
+],
+[
+new Date(2003,11,9),
+18.33333333
+],
+[
+new Date(2003,11,10),
+16.94444444
+],
+[
+new Date(2003,11,11),
+17.44444444
+],
+[
+new Date(2003,11,12),
+18.11111111
+],
+[
+new Date(2003,11,13),
+18.38888889
+],
+[
+new Date(2003,11,14),
+18.88888889
+],
+[
+new Date(2003,11,15),
+18.61111111
+],
+[
+new Date(2003,11,16),
+18
+],
+[
+new Date(2003,11,17),
+17.38888889
+],
+[
+new Date(2003,11,18),
+12.5
+],
+[
+new Date(2003,11,19),
+12.88888889
+],
+[
+new Date(2003,11,20),
+12.77777778
+],
+[
+new Date(2003,11,21),
+12.5
+],
+[
+new Date(2003,11,22),
+12.38888889
+],
+[
+new Date(2003,11,23),
+13.33333333
+],
+[
+new Date(2003,11,24),
+12.72222222
+],
+[
+new Date(2003,11,25),
+13.38888889
+],
+[
+new Date(2003,11,26),
+12
+],
+[
+new Date(2003,11,27),
+11.94444444
+],
+[
+new Date(2003,11,28),
+13.72222222
+],
+[
+new Date(2003,11,29),
+13.88888889
+],
+[
+new Date(2003,11,30),
+13.27777778
+],
+[
+new Date(2003,11,31),
+13.88888889
+],
+[
+new Date(2004,0,1),
+14.94444444
+],
+[
+new Date(2004,0,2),
+15.94444444
+],
+[
+new Date(2004,0,3),
+13.83333333
+],
+[
+new Date(2004,0,4),
+15.94444444
+],
+[
+new Date(2004,0,5),
+15.77777778
+],
+[
+new Date(2004,0,6),
+14.66666667
+],
+[
+new Date(2004,0,7),
+13.27777778
+],
+[
+new Date(2004,0,8),
+11.77777778
+],
+[
+new Date(2004,0,9),
+13.22222222
+],
+[
+new Date(2004,0,10),
+13.83333333
+],
+[
+new Date(2004,0,11),
+15.72222222
+],
+[
+new Date(2004,0,12),
+12.16666667
+],
+[
+new Date(2004,0,13),
+14.05555556
+],
+[
+new Date(2004,0,14),
+15
+],
+[
+new Date(2004,0,15),
+16.72222222
+],
+[
+new Date(2004,0,16),
+17
+],
+[
+new Date(2004,0,17),
+15.38888889
+],
+[
+new Date(2004,0,18),
+13.94444444
+],
+[
+new Date(2004,0,19),
+13.38888889
+],
+[
+new Date(2004,0,20),
+15
+],
+[
+new Date(2004,0,21),
+16.94444444
+],
+[
+new Date(2004,0,22),
+17.44444444
+],
+[
+new Date(2004,0,23),
+12.61111111
+],
+[
+new Date(2004,0,24),
+12.05555556
+],
+[
+new Date(2004,0,25),
+14.22222222
+],
+[
+new Date(2004,0,26),
+12.72222222
+],
+[
+new Date(2004,0,27),
+14.55555556
+],
+[
+new Date(2004,0,28),
+14.33333333
+],
+[
+new Date(2004,0,29),
+16
+],
+[
+new Date(2004,0,30),
+17.16666667
+],
+[
+new Date(2004,0,31),
+14.55555556
+],
+[
+new Date(2004,1,1),
+13.61111111
+],
+[
+new Date(2004,1,2),
+14.05555556
+],
+[
+new Date(2004,1,3),
+13.66666667
+],
+[
+new Date(2004,1,4),
+12.38888889
+],
+[
+new Date(2004,1,5),
+13
+],
+[
+new Date(2004,1,6),
+13.72222222
+],
+[
+new Date(2004,1,7),
+15.16666667
+],
+[
+new Date(2004,1,8),
+15.88888889
+],
+[
+new Date(2004,1,9),
+15.05555556
+],
+[
+new Date(2004,1,10),
+15.44444444
+],
+[
+new Date(2004,1,11),
+14.77777778
+],
+[
+new Date(2004,1,12),
+16.38888889
+],
+[
+new Date(2004,1,13),
+15.94444444
+],
+[
+new Date(2004,1,14),
+10.05555556
+],
+[
+new Date(2004,1,15),
+11.5
+],
+[
+new Date(2004,1,16),
+13.94444444
+],
+[
+new Date(2004,1,17),
+15.16666667
+],
+[
+new Date(2004,1,18),
+15.61111111
+],
+[
+new Date(2004,1,19),
+13.16666667
+],
+[
+new Date(2004,1,20),
+13.33333333
+],
+[
+new Date(2004,1,21),
+14.33333333
+],
+[
+new Date(2004,1,22),
+13.05555556
+],
+[
+new Date(2004,1,23),
+14.16666667
+],
+[
+new Date(2004,1,24),
+20.83333333
+],
+[
+new Date(2004,1,25),
+19.38888889
+],
+[
+new Date(2004,1,26),
+21
+],
+[
+new Date(2004,1,27),
+22.66666667
+],
+[
+new Date(2004,1,28),
+24.88888889
+],
+[
+new Date(2004,1,29),
+26.44444444
+],
+[
+new Date(2004,2,1),
+21.22222222
+],
+[
+new Date(2004,2,2),
+20.61111111
+],
+[
+new Date(2004,2,3),
+25.38888889
+],
+[
+new Date(2004,2,4),
+31.44444444
+],
+[
+new Date(2004,2,5),
+20.77777778
+],
+[
+new Date(2004,2,6),
+15.88888889
+],
+[
+new Date(2004,2,7),
+13.22222222
+],
+[
+new Date(2004,2,8),
+13.27777778
+],
+[
+new Date(2004,2,9),
+14.61111111
+],
+[
+new Date(2004,2,10),
+17.88888889
+],
+[
+new Date(2004,2,11),
+18.05555556
+],
+[
+new Date(2004,2,12),
+16.83333333
+],
+[
+new Date(2004,2,13),
+16.16666667
+],
+[
+new Date(2004,2,14),
+15.55555556
+],
+[
+new Date(2004,2,15),
+15.05555556
+],
+[
+new Date(2004,2,16),
+14.83333333
+],
+[
+new Date(2004,2,17),
+15
+],
+[
+new Date(2004,2,18),
+16
+],
+[
+new Date(2004,2,19),
+16.61111111
+],
+[
+new Date(2004,2,20),
+16.33333333
+],
+[
+new Date(2004,2,21),
+16.55555556
+],
+[
+new Date(2004,2,22),
+18
+],
+[
+new Date(2004,2,23),
+19.05555556
+],
+[
+new Date(2004,2,24),
+19
+],
+[
+new Date(2004,2,25),
+18.94444444
+],
+[
+new Date(2004,2,26),
+17.61111111
+],
+[
+new Date(2004,2,27),
+18.11111111
+],
+[
+new Date(2004,2,28),
+20.33333333
+],
+[
+new Date(2004,2,29),
+23.77777778
+],
+[
+new Date(2004,2,30),
+23.66666667
+],
+[
+new Date(2004,2,31),
+23.05555556
+],
+[
+new Date(2004,3,1),
+27.33333333
+],
+[
+new Date(2004,3,2),
+21.72222222
+],
+[
+new Date(2004,3,3),
+18.11111111
+],
+[
+new Date(2004,3,4),
+18.44444444
+],
+[
+new Date(2004,3,5),
+17.77777778
+],
+[
+new Date(2004,3,6),
+16.77777778
+],
+[
+new Date(2004,3,7),
+17.22222222
+],
+[
+new Date(2004,3,8),
+17.61111111
+],
+[
+new Date(2004,3,9),
+18
+],
+[
+new Date(2004,3,10),
+19.94444444
+],
+[
+new Date(2004,3,11),
+22.27777778
+],
+[
+new Date(2004,3,12),
+23.27777778
+],
+[
+new Date(2004,3,13),
+24.44444444
+],
+[
+new Date(2004,3,14),
+25.05555556
+],
+[
+new Date(2004,3,15),
+20.61111111
+],
+[
+new Date(2004,3,16),
+18.16666667
+],
+[
+new Date(2004,3,17),
+19.94444444
+],
+[
+new Date(2004,3,18),
+25.05555556
+],
+[
+new Date(2004,3,19),
+22.05555556
+],
+[
+new Date(2004,3,20),
+25.11111111
+],
+[
+new Date(2004,3,21),
+21.61111111
+],
+[
+new Date(2004,3,22),
+20.55555556
+],
+[
+new Date(2004,3,23),
+19.22222222
+],
+[
+new Date(2004,3,24),
+19.94444444
+],
+[
+new Date(2004,3,25),
+21.88888889
+],
+[
+new Date(2004,3,26),
+25.88888889
+],
+[
+new Date(2004,3,27),
+25.66666667
+],
+[
+new Date(2004,3,28),
+26
+],
+[
+new Date(2004,3,29),
+21.22222222
+],
+[
+new Date(2004,3,30),
+21.38888889
+],
+[
+new Date(2004,4,1),
+24.38888889
+],
+[
+new Date(2004,4,2),
+23.83333333
+],
+[
+new Date(2004,4,3),
+21.66666667
+],
+[
+new Date(2004,4,4),
+22.05555556
+],
+[
+new Date(2004,4,5),
+26
+],
+[
+new Date(2004,4,6),
+30.83333333
+],
+[
+new Date(2004,4,7),
+27.55555556
+],
+[
+new Date(2004,4,8),
+27.11111111
+],
+[
+new Date(2004,4,9),
+30.33333333
+],
+[
+new Date(2004,4,10),
+30.38888889
+],
+[
+new Date(2004,4,11),
+23.27777778
+],
+[
+new Date(2004,4,12),
+22.33333333
+],
+[
+new Date(2004,4,13),
+26.61111111
+],
+[
+new Date(2004,4,14),
+29.16666667
+],
+[
+new Date(2004,4,15),
+22.55555556
+],
+[
+new Date(2004,4,16),
+22.27777778
+],
+[
+new Date(2004,4,17),
+24.5
+],
+[
+new Date(2004,4,18),
+26.77777778
+],
+[
+new Date(2004,4,19),
+26.11111111
+],
+[
+new Date(2004,4,20),
+22.38888889
+],
+[
+new Date(2004,4,21),
+22
+],
+[
+new Date(2004,4,22),
+23.11111111
+],
+[
+new Date(2004,4,23),
+22.83333333
+],
+[
+new Date(2004,4,24),
+23.44444444
+],
+[
+new Date(2004,4,25),
+24.22222222
+],
+[
+new Date(2004,4,26),
+24.94444444
+],
+[
+new Date(2004,4,27),
+26.72222222
+],
+[
+new Date(2004,4,28),
+25.33333333
+],
+[
+new Date(2004,4,29),
+28.5
+],
+[
+new Date(2004,4,30),
+30.11111111
+],
+[
+new Date(2004,4,31),
+24.77777778
+],
+[
+new Date(2004,5,1),
+23.5
+],
+[
+new Date(2004,5,2),
+23.72222222
+],
+[
+new Date(2004,5,3),
+24.05555556
+],
+[
+new Date(2004,5,4),
+24.66666667
+],
+[
+new Date(2004,5,5),
+25.55555556
+],
+[
+new Date(2004,5,6),
+28.55555556
+],
+[
+new Date(2004,5,7),
+31.27777778
+],
+[
+new Date(2004,5,8),
+26.72222222
+],
+[
+new Date(2004,5,9),
+24.61111111
+],
+[
+new Date(2004,5,10),
+25.05555556
+],
+[
+new Date(2004,5,11),
+26.33333333
+],
+[
+new Date(2004,5,12),
+27.27777778
+],
+[
+new Date(2004,5,13),
+27.72222222
+],
+[
+new Date(2004,5,14),
+27.5
+],
+[
+new Date(2004,5,15),
+28.72222222
+],
+[
+new Date(2004,5,16),
+28.27777778
+],
+[
+new Date(2004,5,17),
+28.5
+],
+[
+new Date(2004,5,18),
+30.55555556
+],
+[
+new Date(2004,5,19),
+32.05555556
+],
+[
+new Date(2004,5,20),
+27.05555556
+],
+[
+new Date(2004,5,21),
+27.05555556
+],
+[
+new Date(2004,5,22),
+27.38888889
+],
+[
+new Date(2004,5,23),
+27.66666667
+],
+[
+new Date(2004,5,24),
+27.22222222
+],
+[
+new Date(2004,5,25),
+26.66666667
+],
+[
+new Date(2004,5,26),
+27.5
+],
+[
+new Date(2004,5,27),
+28.38888889
+],
+[
+new Date(2004,5,28),
+28
+],
+[
+new Date(2004,5,29),
+28
+],
+[
+new Date(2004,5,30),
+29.22222222
+],
+[
+new Date(2004,6,1),
+29.11111111
+],
+[
+new Date(2004,6,2),
+27.16666667
+],
+[
+new Date(2004,6,3),
+27.5
+],
+[
+new Date(2004,6,4),
+28.11111111
+],
+[
+new Date(2004,6,5),
+29.5
+],
+[
+new Date(2004,6,6),
+29.88888889
+],
+[
+new Date(2004,6,7),
+29.55555556
+],
+[
+new Date(2004,6,8),
+28.77777778
+],
+[
+new Date(2004,6,9),
+28.61111111
+],
+[
+new Date(2004,6,10),
+29.5
+],
+[
+new Date(2004,6,11),
+29.44444444
+],
+[
+new Date(2004,6,12),
+30.11111111
+],
+[
+new Date(2004,6,13),
+31.38888889
+],
+[
+new Date(2004,6,14),
+33.27777778
+],
+[
+new Date(2004,6,15),
+30.44444444
+],
+[
+new Date(2004,6,16),
+28.55555556
+],
+[
+new Date(2004,6,17),
+27.05555556
+],
+[
+new Date(2004,6,18),
+26.94444444
+],
+[
+new Date(2004,6,19),
+27.66666667
+],
+[
+new Date(2004,6,20),
+27.27777778
+],
+[
+new Date(2004,6,21),
+27.44444444
+],
+[
+new Date(2004,6,22),
+28.16666667
+],
+[
+new Date(2004,6,23),
+28.44444444
+],
+[
+new Date(2004,6,24),
+28.66666667
+],
+[
+new Date(2004,6,25),
+29.22222222
+],
+[
+new Date(2004,6,26),
+30.5
+],
+[
+new Date(2004,6,27),
+30.83333333
+],
+[
+new Date(2004,6,28),
+30.61111111
+],
+[
+new Date(2004,6,29),
+31.33333333
+],
+[
+new Date(2004,6,30),
+31.11111111
+],
+[
+new Date(2004,6,31),
+29.05555556
+],
+[
+new Date(2004,7,1),
+27.61111111
+],
+[
+new Date(2004,7,2),
+27.44444444
+],
+[
+new Date(2004,7,3),
+28.11111111
+],
+[
+new Date(2004,7,4),
+28.33333333
+],
+[
+new Date(2004,7,5),
+28.22222222
+],
+[
+new Date(2004,7,6),
+29.22222222
+],
+[
+new Date(2004,7,7),
+29.22222222
+],
+[
+new Date(2004,7,8),
+30.94444444
+],
+[
+new Date(2004,7,9),
+29.94444444
+],
+[
+new Date(2004,7,10),
+28.66666667
+],
+[
+new Date(2004,7,11),
+29.55555556
+],
+[
+new Date(2004,7,12),
+28.22222222
+],
+[
+new Date(2004,7,13),
+28.72222222
+],
+[
+new Date(2004,7,14),
+29.22222222
+],
+[
+new Date(2004,7,15),
+29.66666667
+],
+[
+new Date(2004,7,16),
+30.94444444
+],
+[
+new Date(2004,7,17),
+30.22222222
+],
+[
+new Date(2004,7,18),
+27.94444444
+],
+[
+new Date(2004,7,19),
+26.83333333
+],
+[
+new Date(2004,7,20),
+27.5
+],
+[
+new Date(2004,7,21),
+29.22222222
+],
+[
+new Date(2004,7,22),
+29.94444444
+],
+[
+new Date(2004,7,23),
+29.44444444
+],
+[
+new Date(2004,7,24),
+28.88888889
+],
+[
+new Date(2004,7,25),
+28.05555556
+],
+[
+new Date(2004,7,26),
+27.33333333
+],
+[
+new Date(2004,7,27),
+28.05555556
+],
+[
+new Date(2004,7,28),
+29.77777778
+],
+[
+new Date(2004,7,29),
+28
+],
+[
+new Date(2004,7,30),
+26.61111111
+],
+[
+new Date(2004,7,31),
+26.83333333
+],
+[
+new Date(2004,8,1),
+26.94444444
+],
+[
+new Date(2004,8,2),
+27.94444444
+],
+[
+new Date(2004,8,3),
+27.77777778
+],
+[
+new Date(2004,8,4),
+28
+],
+[
+new Date(2004,8,5),
+28.61111111
+],
+[
+new Date(2004,8,6),
+28.55555556
+],
+[
+new Date(2004,8,7),
+28.44444444
+],
+[
+new Date(2004,8,8),
+27.83333333
+],
+[
+new Date(2004,8,9),
+26.22222222
+],
+[
+new Date(2004,8,10),
+25.61111111
+],
+[
+new Date(2004,8,11),
+25
+],
+[
+new Date(2004,8,12),
+24.44444444
+],
+[
+new Date(2004,8,13),
+24.83333333
+],
+[
+new Date(2004,8,14),
+24.66666667
+],
+[
+new Date(2004,8,15),
+24.61111111
+],
+[
+new Date(2004,8,16),
+24.33333333
+],
+[
+new Date(2004,8,17),
+25.38888889
+],
+[
+new Date(2004,8,18),
+25.61111111
+],
+[
+new Date(2004,8,19),
+26.38888889
+],
+[
+new Date(2004,8,20),
+27.61111111
+],
+[
+new Date(2004,8,21),
+26.61111111
+],
+[
+new Date(2004,8,22),
+26.22222222
+],
+[
+new Date(2004,8,23),
+26.27777778
+],
+[
+new Date(2004,8,24),
+25.61111111
+],
+[
+new Date(2004,8,25),
+27.11111111
+],
+[
+new Date(2004,8,26),
+28.83333333
+],
+[
+new Date(2004,8,27),
+27.61111111
+],
+[
+new Date(2004,8,28),
+28.05555556
+],
+[
+new Date(2004,8,29),
+28.77777778
+],
+[
+new Date(2004,8,30),
+28.88888889
+],
+[
+new Date(2004,9,1),
+27.66666667
+],
+[
+new Date(2004,9,2),
+26.44444444
+],
+[
+new Date(2004,9,3),
+25.27777778
+],
+[
+new Date(2004,9,4),
+25.22222222
+],
+[
+new Date(2004,9,5),
+24.77777778
+],
+[
+new Date(2004,9,6),
+24.44444444
+],
+[
+new Date(2004,9,7),
+24
+],
+[
+new Date(2004,9,8),
+23.55555556
+],
+[
+new Date(2004,9,9),
+23.16666667
+],
+[
+new Date(2004,9,10),
+23.11111111
+],
+[
+new Date(2004,9,11),
+22.94444444
+],
+[
+new Date(2004,9,12),
+23.44444444
+],
+[
+new Date(2004,9,13),
+23.83333333
+],
+[
+new Date(2004,9,14),
+23.77777778
+],
+[
+new Date(2004,9,15),
+24.11111111
+],
+[
+new Date(2004,9,16),
+24.88888889
+],
+[
+new Date(2004,9,17),
+25.55555556
+],
+[
+new Date(2004,9,18),
+26.22222222
+],
+[
+new Date(2004,9,19),
+26.55555556
+],
+[
+new Date(2004,9,20),
+25.44444444
+],
+[
+new Date(2004,9,21),
+25.44444444
+],
+[
+new Date(2004,9,22),
+25.38888889
+],
+[
+new Date(2004,9,23),
+25.27777778
+],
+[
+new Date(2004,9,24),
+24.5
+],
+[
+new Date(2004,9,25),
+25.11111111
+],
+[
+new Date(2004,9,26),
+25.27777778
+],
+[
+new Date(2004,9,27),
+24.27777778
+],
+[
+new Date(2004,9,28),
+23.61111111
+],
+[
+new Date(2004,9,29),
+23.55555556
+],
+[
+new Date(2004,9,30),
+25.5
+],
+[
+new Date(2004,9,31),
+24.05555556
+],
+[
+new Date(2004,10,1),
+23.83333333
+],
+[
+new Date(2004,10,2),
+24.55555556
+],
+[
+new Date(2004,10,3),
+25.11111111
+],
+[
+new Date(2004,10,4),
+24.55555556
+],
+[
+new Date(2004,10,5),
+24.55555556
+],
+[
+new Date(2004,10,6),
+24.33333333
+],
+[
+new Date(2004,10,7),
+23
+],
+[
+new Date(2004,10,8),
+24.38888889
+],
+[
+new Date(2004,10,9),
+24.38888889
+],
+[
+new Date(2004,10,10),
+24.33333333
+],
+[
+new Date(2004,10,11),
+24.05555556
+],
+[
+new Date(2004,10,12),
+23.33333333
+],
+[
+new Date(2004,10,13),
+22.11111111
+],
+[
+new Date(2004,10,14),
+22.11111111
+],
+[
+new Date(2004,10,15),
+24.61111111
+],
+[
+new Date(2004,10,16),
+23.33333333
+],
+[
+new Date(2004,10,17),
+21.16666667
+],
+[
+new Date(2004,10,18),
+19.27777778
+],
+[
+new Date(2004,10,19),
+18.61111111
+],
+[
+new Date(2004,10,20),
+19
+],
+[
+new Date(2004,10,21),
+19.94444444
+],
+[
+new Date(2004,10,22),
+15.27777778
+],
+[
+new Date(2004,10,23),
+13.33333333
+],
+[
+new Date(2004,10,24),
+15.05555556
+],
+[
+new Date(2004,10,25),
+17
+],
+[
+new Date(2004,10,26),
+14.66666667
+],
+[
+new Date(2004,10,27),
+13.94444444
+],
+[
+new Date(2004,10,28),
+14.72222222
+],
+[
+new Date(2004,10,29),
+16
+],
+[
+new Date(2004,10,30),
+16.11111111
+],
+[
+new Date(2004,11,1),
+16.11111111
+],
+[
+new Date(2004,11,2),
+16.38888889
+],
+[
+new Date(2004,11,3),
+16.44444444
+],
+[
+new Date(2004,11,4),
+15.72222222
+],
+[
+new Date(2004,11,5),
+16.05555556
+],
+[
+new Date(2004,11,6),
+16.83333333
+],
+[
+new Date(2004,11,7),
+17.11111111
+],
+[
+new Date(2004,11,8),
+17
+],
+[
+new Date(2004,11,9),
+15.38888889
+],
+[
+new Date(2004,11,10),
+15.33333333
+],
+[
+new Date(2004,11,11),
+16
+],
+[
+new Date(2004,11,12),
+15.66666667
+],
+[
+new Date(2004,11,13),
+14.94444444
+],
+[
+new Date(2004,11,14),
+14.44444444
+],
+[
+new Date(2004,11,15),
+14.88888889
+],
+[
+new Date(2004,11,16),
+13.61111111
+],
+[
+new Date(2004,11,17),
+12.11111111
+],
+[
+new Date(2004,11,18),
+12.38888889
+],
+[
+new Date(2004,11,19),
+15.38888889
+],
+[
+new Date(2004,11,20),
+15.33333333
+],
+[
+new Date(2004,11,21),
+15.27777778
+],
+[
+new Date(2004,11,22),
+14.83333333
+],
+[
+new Date(2004,11,23),
+15.22222222
+],
+[
+new Date(2004,11,24),
+15
+],
+[
+new Date(2004,11,25),
+13.27777778
+],
+[
+new Date(2004,11,26),
+14.22222222
+],
+[
+new Date(2004,11,27),
+14.27777778
+],
+[
+new Date(2004,11,28),
+14.55555556
+],
+[
+new Date(2004,11,29),
+16.16666667
+],
+[
+new Date(2004,11,30),
+16.83333333
+],
+[
+new Date(2004,11,31),
+18.33333333
+] 
+];
+data.addColumn('date','Date');
+data.addColumn('number','Temp');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartCalendarID12e03652c88f9() {
+var data = gvisDataCalendarID12e03652c88f9();
+var options = {};
+options["width"] = 600;
+options["height"] = 320;
+options["title"] = "Daily temperature in Cairo";
+options["calendar"] = {yearLabel: { fontName: 'Times-Roman',
+                               fontSize: 32, color: '#1A8763', bold: true},
+                               cellSize: 10,
+                               cellColor: { stroke: 'red', strokeOpacity: 0.2 },
+                               focusedCellColor: {stroke:'red'}};
+
+    var chart = new google.visualization.Calendar(
+    document.getElementById('CalendarID12e03652c88f9')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "calendar";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartCalendarID12e03652c88f9);
+})();
+function displayChartCalendarID12e03652c88f9() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartCalendarID12e03652c88f9"></script>
+ 
+
+<!-- divChart -->
+
+<div id="CalendarID12e03652c88f9" 
+  style="width: 600; height: 320;">
+</div>
+
+<h2>Timeline chart</h2>
+
+<pre><code class="r">datTL <- data.frame(Position=c(rep("President", 3), rep("Vice", 3)),
+                    Name=c("Washington", "Adams", "Jefferson",
+                           "Adams", "Jefferson", "Burr"),
+                    start=as.Date(x=rep(c("1789-03-29", "1797-02-03", 
+                                          "1801-02-03"),2)),
+                    end=as.Date(x=rep(c("1797-02-03", "1801-02-03", 
+                                        "1809-02-03"),2)))
+
+Timeline <- gvisTimeline(data=datTL, 
+                         rowlabel="Name",
+                         barlabel="Position",
+                         start="start", 
+                         end="end",
+                         options=list(timeline="{groupByRowLabel:false}",
+                                      backgroundColor='#ffd', 
+                                      height=350,
+                                      colors="['#cbb69d', '#603913', '#c69c6e']"))
+plot(Timeline)
+</code></pre>
+
+<!-- Timeline generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataTimelineID12e03736a4293 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Washington",
+"President",
+new Date(1789,2,29),
+new Date(1797,1,3)
+],
+[
+"Adams",
+"President",
+new Date(1797,1,3),
+new Date(1801,1,3)
+],
+[
+"Jefferson",
+"President",
+new Date(1801,1,3),
+new Date(1809,1,3)
+],
+[
+"Adams",
+"Vice",
+new Date(1789,2,29),
+new Date(1797,1,3)
+],
+[
+"Jefferson",
+"Vice",
+new Date(1797,1,3),
+new Date(1801,1,3)
+],
+[
+"Burr",
+"Vice",
+new Date(1801,1,3),
+new Date(1809,1,3)
+] 
+];
+data.addColumn('string','Name');
+data.addColumn('string','Position');
+data.addColumn('date','start');
+data.addColumn('date','end');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartTimelineID12e03736a4293() {
+var data = gvisDataTimelineID12e03736a4293();
+var options = {};
+options["width"] = 600;
+options["height"] = 350;
+options["timeline"] = {groupByRowLabel:false};
+options["backgroundColor"] = "#ffd";
+options["colors"] = ['#cbb69d', '#603913', '#c69c6e'];
+
+    var chart = new google.visualization.Timeline(
+    document.getElementById('TimelineID12e03736a4293')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "timeline";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartTimelineID12e03736a4293);
+})();
+function displayChartTimelineID12e03736a4293() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartTimelineID12e03736a4293"></script>
+ 
+
+<!-- divChart -->
+
+<div id="TimelineID12e03736a4293" 
+  style="width: 600; height: 350;">
+</div>
+
+<h2>Merging charts</h2>
+
+<pre><code class="r">G <- gvisGeoChart(Exports, "Country", "Profit", 
+                  options=list(width=300, height=300))
+T <- gvisTable(Exports, 
+               options=list(width=220, height=300))
+
+GT <- gvisMerge(G,T, horizontal=TRUE) 
+plot(GT)
+</code></pre>
+
+<!-- GeoChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataGeoChartID12e03202e6d82 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Germany",
+3
+],
+[
+"Brazil",
+4
+],
+[
+"United States",
+5
+],
+[
+"France",
+4
+],
+[
+"Hungary",
+3
+],
+[
+"India",
+2
+],
+[
+"Iceland",
+1
+],
+[
+"Norway",
+4
+],
+[
+"Spain",
+5
+],
+[
+"Turkey",
+1
+] 
+];
+data.addColumn('string','Country');
+data.addColumn('number','Profit');
+data.addRows(datajson);
+return(data);
+}
+
+
+// jsData 
+function gvisDataTableID12e034817824f () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Germany",
+3,
+true
+],
+[
+"Brazil",
+4,
+false
+],
+[
+"United States",
+5,
+true
+],
+[
+"France",
+4,
+true
+],
+[
+"Hungary",
+3,
+false
+],
+[
+"India",
+2,
+true
+],
+[
+"Iceland",
+1,
+false
+],
+[
+"Norway",
+4,
+true
+],
+[
+"Spain",
+5,
+true
+],
+[
+"Turkey",
+1,
+false
+] 
+];
+data.addColumn('string','Country');
+data.addColumn('number','Profit');
+data.addColumn('boolean','Online');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartGeoChartID12e03202e6d82() {
+var data = gvisDataGeoChartID12e03202e6d82();
+var options = {};
+options["width"] = 300;
+options["height"] = 300;
+
+    var chart = new google.visualization.GeoChart(
+    document.getElementById('GeoChartID12e03202e6d82')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+
+
+// jsDrawChart
+function drawChartTableID12e034817824f() {
+var data = gvisDataTableID12e034817824f();
+var options = {};
+options["allowHtml"] = true;
+options["width"] = 220;
+options["height"] = 300;
+
+    var chart = new google.visualization.Table(
+    document.getElementById('TableID12e034817824f')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "geochart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartGeoChartID12e03202e6d82);
+})();
+function displayChartGeoChartID12e03202e6d82() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+
+
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "table";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartTableID12e034817824f);
+})();
+function displayChartTableID12e034817824f() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartGeoChartID12e03202e6d82"></script>
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartTableID12e034817824f"></script>
+ 
+
+<table border="0">
+<tr>
+<td>
+
+<!-- divChart -->
+  
+<div id="GeoChartID12e03202e6d82" 
+  style="width: 300; height: 300;">
+</div>
+
+</td>
+<td>
+
+<!-- divChart -->
+  
+<div id="TableID12e034817824f" 
+  style="width: 220; height: 300;">
+</div>
+
+</td>
+</tr>
+</table>
+
+<h1>Flash charts</h1>
+
+<p>All the following charts require a Flash player. </p>
+
+<h2>Motion chart</h2>
+
+<pre><code class="r">Motion=gvisMotionChart(Fruits, 
+                       idvar="Fruit", 
+                       timevar="Year")
+plot(Motion)
+</code></pre>
+
+<!-- MotionChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataMotionChartID12e03646c9da8 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Apples",
+2008,
+"West",
+98,
+78,
+20,
+"2008-12-31"
+],
+[
+"Apples",
+2009,
+"West",
+111,
+79,
+32,
+"2009-12-31"
+],
+[
+"Apples",
+2010,
+"West",
+89,
+76,
+13,
+"2010-12-31"
+],
+[
+"Oranges",
+2008,
+"East",
+96,
+81,
+15,
+"2008-12-31"
+],
+[
+"Bananas",
+2008,
+"East",
+85,
+76,
+9,
+"2008-12-31"
+],
+[
+"Oranges",
+2009,
+"East",
+93,
+80,
+13,
+"2009-12-31"
+],
+[
+"Bananas",
+2009,
+"East",
+94,
+78,
+16,
+"2009-12-31"
+],
+[
+"Oranges",
+2010,
+"East",
+98,
+91,
+7,
+"2010-12-31"
+],
+[
+"Bananas",
+2010,
+"East",
+81,
+71,
+10,
+"2010-12-31"
+] 
+];
+data.addColumn('string','Fruit');
+data.addColumn('number','Year');
+data.addColumn('string','Location');
+data.addColumn('number','Sales');
+data.addColumn('number','Expenses');
+data.addColumn('number','Profit');
+data.addColumn('string','Date');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartMotionChartID12e03646c9da8() {
+var data = gvisDataMotionChartID12e03646c9da8();
+var options = {};
+options["width"] = 600;
+options["height"] = 500;
+options["state"] = "";
+
+    var chart = new google.visualization.MotionChart(
+    document.getElementById('MotionChartID12e03646c9da8')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "motionchart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartMotionChartID12e03646c9da8);
+})();
+function displayChartMotionChartID12e03646c9da8() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartMotionChartID12e03646c9da8"></script>
+ 
+
+<!-- divChart -->
+
+<div id="MotionChartID12e03646c9da8" 
+  style="width: 600; height: 500;">
+</div>
+
+<p>You can change some of displaying settings via the browser,
+e.g. the level of opacity of non-selected items, or the chart type.
+The state string from the 'Advanced' tab can be used to set those
+settings via R. Just copy and past the string from the browser into
+the argument state of the options list.
+Here is an example of a motion chart, with an initial line chart
+displayed. </p>
+
+<pre><code class="r">myStateSettings <-'
+{"xZoomedDataMin":1199145600000,"colorOption":"2",
+"duration":{"timeUnit":"Y","multiplier":1},"yLambda":1,
+"yAxisOption":"4","sizeOption":"_UNISIZE",
+"iconKeySettings":[],"xLambda":1,"nonSelectedAlpha":0,
+"xZoomedDataMax":1262304000000,"iconType":"LINE",
+"dimensions":{"iconDimensions":["dim0"]},
+"showTrails":false,"uniColorForNonSelected":false,
+"xAxisOption":"_TIME","orderedByX":false,"playDuration":15000,
+"xZoomedIn":false,"time":"2010","yZoomedDataMin":0,
+"yZoomedIn":false,"orderedByY":false,"yZoomedDataMax":100}
+'
+M <- gvisMotionChart(Fruits, "Fruit", "Year", options=list(state=myStateSettings))
+plot(M)
+</code></pre>
+
+<!-- MotionChart generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataMotionChartID12e037d9e22b2 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+"Apples",
+2008,
+"West",
+98,
+78,
+20,
+"2008-12-31"
+],
+[
+"Apples",
+2009,
+"West",
+111,
+79,
+32,
+"2009-12-31"
+],
+[
+"Apples",
+2010,
+"West",
+89,
+76,
+13,
+"2010-12-31"
+],
+[
+"Oranges",
+2008,
+"East",
+96,
+81,
+15,
+"2008-12-31"
+],
+[
+"Bananas",
+2008,
+"East",
+85,
+76,
+9,
+"2008-12-31"
+],
+[
+"Oranges",
+2009,
+"East",
+93,
+80,
+13,
+"2009-12-31"
+],
+[
+"Bananas",
+2009,
+"East",
+94,
+78,
+16,
+"2009-12-31"
+],
+[
+"Oranges",
+2010,
+"East",
+98,
+91,
+7,
+"2010-12-31"
+],
+[
+"Bananas",
+2010,
+"East",
+81,
+71,
+10,
+"2010-12-31"
+] 
+];
+data.addColumn('string','Fruit');
+data.addColumn('number','Year');
+data.addColumn('string','Location');
+data.addColumn('number','Sales');
+data.addColumn('number','Expenses');
+data.addColumn('number','Profit');
+data.addColumn('string','Date');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartMotionChartID12e037d9e22b2() {
+var data = gvisDataMotionChartID12e037d9e22b2();
+var options = {};
+options["width"] = 600;
+options["height"] = 500;
+options["state"] = "\n{\"xZoomedDataMin\":1199145600000,\"colorOption\":\"2\",\n\"duration\":{\"timeUnit\":\"Y\",\"multiplier\":1},\"yLambda\":1,\n\"yAxisOption\":\"4\",\"sizeOption\":\"_UNISIZE\",\n\"iconKeySettings\":[],\"xLambda\":1,\"nonSelectedAlpha\":0,\n\"xZoomedDataMax\":1262304000000,\"iconType\":\"LINE\",\n\"dimensions\":{\"iconDimensions\":[\"dim0\"]},\n\"showTrails\":false,\"uniColorForNonSelected\":false,\n\"xAxisOption\":\"_TIME\",\"orderedByX\":false,\"playDuration\":15000 [...]
+
+    var chart = new google.visualization.MotionChart(
+    document.getElementById('MotionChartID12e037d9e22b2')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "motionchart";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartMotionChartID12e037d9e22b2);
+})();
+function displayChartMotionChartID12e037d9e22b2() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartMotionChartID12e037d9e22b2"></script>
+ 
+
+<!-- divChart -->
+
+<div id="MotionChartID12e037d9e22b2" 
+  style="width: 600; height: 500;">
+</div>
+
+<pre><code class="r">## See demo(package='googleVis') for other available demos.
+</code></pre>
+
+<h2>Geo Map</h2>
+
+<pre><code class="r">AndrewGeo <- gvisGeoMap(Andrew, 
+                        locationvar="LatLong", 
+                        numvar="Speed_kt", 
+                        hovervar="Category", 
+                        options=list(height=350, 
+                                     region="US", 
+                                     dataMode="markers"))
+</code></pre>
+
+<pre><code>## Warning in gvisGeoMap(Andrew, locationvar = "LatLong", numvar = "Speed_kt", : GeoMap (gvisGeoMap) is Flash based, conisder using GeoChart (gvisGeoChart) instead.
+## For more details visit: goo.gl/tkiEV8
+</code></pre>
+
+<pre><code class="r">plot(AndrewGeo)
+</code></pre>
+
+<!-- GeoMap generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataGeoMapID12e03470d0022 () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+10.8,
+-35.5,
+25,
+"Tropical Depression"
+],
+[
+11.2,
+-37.4,
+30,
+"Tropical Depression"
+],
+[
+11.7,
+-39.6,
+30,
+"Tropical Depression"
+],
+[
+12.3,
+-42,
+35,
+"Tropical Storm"
+],
+[
+13.1,
+-44.2,
+35,
+"Tropical Storm"
+],
+[
+13.6,
+-46.2,
+40,
+"Tropical Storm"
+],
+[
+14.1,
+-48,
+45,
+"Tropical Storm"
+],
+[
+14.6,
+-49.9,
+45,
+"Tropical Storm"
+],
+[
+15.4,
+-51.8,
+45,
+"Tropical Storm"
+],
+[
+16.3,
+-53.5,
+45,
+"Tropical Storm"
+],
+[
+17.2,
+-55.3,
+45,
+"Tropical Storm"
+],
+[
+18,
+-56.9,
+45,
+"Tropical Storm"
+],
+[
+18.8,
+-58.3,
+45,
+"Tropical Storm"
+],
+[
+19.8,
+-59.3,
+40,
+"Tropical Storm"
+],
+[
+20.7,
+-60,
+40,
+"Tropical Storm"
+],
+[
+21.7,
+-60.7,
+40,
+"Tropical Storm"
+],
+[
+22.5,
+-61.5,
+40,
+"Tropical Storm"
+],
+[
+23.2,
+-62.4,
+45,
+"Tropical Storm"
+],
+[
+23.9,
+-63.3,
+45,
+"Tropical Storm"
+],
+[
+24.4,
+-64.2,
+50,
+"Tropical Storm"
+],
+[
+24.8,
+-64.9,
+50,
+"Tropical Storm"
+],
+[
+25.3,
+-65.9,
+55,
+"Tropical Storm"
+],
+[
+25.6,
+-67,
+60,
+"Tropical Storm"
+],
+[
+25.8,
+-68.3,
+70,
+"Hurricane"
+],
+[
+25.7,
+-69.7,
+80,
+"Hurricane"
+],
+[
+25.6,
+-71.1,
+90,
+"Hurricane"
+],
+[
+25.5,
+-72.5,
+105,
+"Hurricane"
+],
+[
+25.4,
+-74.2,
+120,
+"Hurricane"
+],
+[
+25.4,
+-75.8,
+135,
+"Hurricane"
+],
+[
+25.4,
+-77.5,
+125,
+"Hurricane"
+],
+[
+25.4,
+-79.3,
+120,
+"Hurricane"
+],
+[
+25.6,
+-81.2,
+110,
+"Hurricane"
+],
+[
+25.8,
+-83.1,
+115,
+"Hurricane"
+],
+[
+26.2,
+-85,
+115,
+"Hurricane"
+],
+[
+26.6,
+-86.7,
+115,
+"Hurricane"
+],
+[
+27.2,
+-88.2,
+115,
+"Hurricane"
+],
+[
+27.8,
+-89.6,
+120,
+"Hurricane"
+],
+[
+28.5,
+-90.5,
+120,
+"Hurricane"
+],
+[
+29.2,
+-91.3,
+115,
+"Hurricane"
+],
+[
+30.1,
+-91.7,
+80,
+"Tropical Storm"
+],
+[
+30.9,
+-91.6,
+50,
+"Tropical Storm"
+],
+[
+31.5,
+-91.1,
+35,
+"Tropical Depression"
+],
+[
+32.1,
+-90.5,
+30,
+"Tropical Depression"
+],
+[
+32.8,
+-89.6,
+30,
+"Tropical Depression"
+],
+[
+33.6,
+-88.4,
+25,
+"Tropical Depression"
+],
+[
+34.4,
+-86.7,
+20,
+"Tropical Depression"
+],
+[
+35.4,
+-84,
+20,
+"Tropical Depression"
+] 
+];
+data.addColumn('number','Latitude');
+data.addColumn('number','Longitude');
+data.addColumn('number','Speed_kt');
+data.addColumn('string','Category');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartGeoMapID12e03470d0022() {
+var data = gvisDataGeoMapID12e03470d0022();
+var options = {};
+options["dataMode"] = "markers";
+options["width"] = 556;
+options["height"] = 350;
+options["region"] = "US";
+
+    var chart = new google.visualization.GeoMap(
+    document.getElementById('GeoMapID12e03470d0022')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "geomap";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartGeoMapID12e03470d0022);
+})();
+function displayChartGeoMapID12e03470d0022() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartGeoMapID12e03470d0022"></script>
+ 
+
+<!-- divChart -->
+
+<div id="GeoMapID12e03470d0022" 
+  style="width: 556; height: 350;">
+</div>
+
+<h2>Annotated time line chart</h2>
+
+<pre><code class="r">AnnoTimeLine  <- gvisAnnotatedTimeLine(Stock, 
+                                       datevar="Date",
+                                       numvar="Value", 
+                                       idvar="Device",
+                                       titlevar="Title", 
+                                       annotationvar="Annotation",
+                                       options=list(displayAnnotations=TRUE,
+                                                    width="600px", height="350px"))
+</code></pre>
+
+<pre><code>## Warning in gvisAnnotatedTimeLine(Stock, datevar = "Date", numvar = "Value", : AnnotatedTimeline (gvisAnnotatedTimeLine) is Flash based, conisder using  AnnotationChart (gvisAnnotationChart) instead.
+## For more details visit: goo.gl/tkiEV8
+</code></pre>
+
+<pre><code class="r">plot(AnnoTimeLine)
+</code></pre>
+
+<!-- AnnotatedTimeLine generated in R 3.3.2 by googleVis 0.6.2 package -->
+
+<!-- Sun Jan  1 09:36:35 2017 -->
+
+<!-- jsHeader -->
+
+<script type="text/javascript">
+ 
+// jsData 
+function gvisDataAnnotatedTimeLineID12e031b095e7a () {
+var data = new google.visualization.DataTable();
+var datajson =
+[
+ [
+new Date(2008,0,1),
+3000,
+null,
+null,
+40645,
+null,
+null
+],
+[
+new Date(2008,0,2),
+14045,
+null,
+null,
+20374,
+null,
+null
+],
+[
+new Date(2008,0,3),
+5502,
+null,
+null,
+50766,
+null,
+null
+],
+[
+new Date(2008,0,4),
+75284,
+null,
+null,
+14334,
+"Out of stock",
+"Ran out of stock of pens at 4pm"
+],
+[
+new Date(2008,0,5),
+41476,
+"Bought pencils",
+"Bought 200k pencils",
+66467,
+null,
+null
+],
+[
+new Date(2008,0,6),
+333222,
+null,
+null,
+39463,
+null,
+null
+] 
+];
+data.addColumn('date','Date');
+data.addColumn('number','Pencils');
+data.addColumn('string','Title.Pencils');
+data.addColumn('string','Annotation.Pencils');
+data.addColumn('number','Pens');
+data.addColumn('string','Title.Pens');
+data.addColumn('string','Annotation.Pens');
+data.addRows(datajson);
+return(data);
+}
+ 
+// jsDrawChart
+function drawChartAnnotatedTimeLineID12e031b095e7a() {
+var data = gvisDataAnnotatedTimeLineID12e031b095e7a();
+var options = {};
+options["width"] = "600px";
+options["height"] = "350px";
+options["displayAnnotations"] = true;
+
+    var chart = new google.visualization.AnnotatedTimeLine(
+    document.getElementById('AnnotatedTimeLineID12e031b095e7a')
+    );
+    chart.draw(data,options);
+    
+
+}
+  
+ 
+// jsDisplayChart
+(function() {
+var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+var chartid = "annotatedtimeline";
+  
+// Manually see if chartid is in pkgs (not all browsers support Array.indexOf)
+var i, newPackage = true;
+for (i = 0; newPackage && i < pkgs.length; i++) {
+if (pkgs[i] === chartid)
+newPackage = false;
+}
+if (newPackage)
+  pkgs.push(chartid);
+  
+// Add the drawChart function to the global list of callbacks
+callbacks.push(drawChartAnnotatedTimeLineID12e031b095e7a);
+})();
+function displayChartAnnotatedTimeLineID12e031b095e7a() {
+  var pkgs = window.__gvisPackages = window.__gvisPackages || [];
+  var callbacks = window.__gvisCallbacks = window.__gvisCallbacks || [];
+  window.clearTimeout(window.__gvisLoad);
+  // The timeout is set to 100 because otherwise the container div we are
+  // targeting might not be part of the document yet
+  window.__gvisLoad = setTimeout(function() {
+  var pkgCount = pkgs.length;
+  google.load("visualization", "1", { packages:pkgs, callback: function() {
+  if (pkgCount != pkgs.length) {
+  // Race condition where another setTimeout call snuck in after us; if
+  // that call added a package, we must not shift its callback
+  return;
+}
+while (callbacks.length > 0)
+callbacks.shift()();
+} });
+}, 100);
+}
+ 
+// jsFooter
+</script>
+ 
+
+<!-- jsChart -->  
+
+<script type="text/javascript" src="https://www.google.com/jsapi?callback=displayChartAnnotatedTimeLineID12e031b095e7a"></script>
+ 
+
+<!-- divChart -->
+
+<div id="AnnotatedTimeLineID12e031b095e7a" 
+  style="width: 600px; height: 350px;">
+</div>
+
+</body>
+
+</html>
diff --git a/inst/gadgets/gadgets.R b/inst/gadgets/gadgets.R
new file mode 100644
index 0000000..0d59c3b
--- /dev/null
+++ b/inst/gadgets/gadgets.R
@@ -0,0 +1,165 @@
+## Move into the inst/gadget folder before you run this script!
+
+Motion=gvisMotionChart(Fruits, idvar="Fruit", timevar="Year",
+  options=list(height=350, width=400)) 
+cat(createGoogleGadget(Motion), file="motionchart.xml")
+
+## Geo Map with coloured regions
+Geo=gvisGeoMap(Exports, locationvar="Country", numvar="Profit",
+                       options=list(dataMode='regions'))
+
+cat(createGoogleGadget(Geo), file="geomap.xml")#
+
+## Show Hurricane Andrew (1992) storm track with Geo Map
+AndrewGeo <- gvisGeoMap(Andrew, locationvar="LatLong", numvar="Speed_kt", 
+      			 hovervar="Category", 
+      		         options=list(height=250, width=400, region="US"))
+
+cat(createGoogleGadget(AndrewGeo), file="andrewgeomap.xml")
+
+## Hurricane Andrew (1992) storm track with Google Maps
+AndrewMap <- gvisMap(Andrew, "LatLong" , "Tip", 
+      	      options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE,
+		      mapType='terrain', useMapTypeControl=TRUE))
+
+cat(createGoogleGadget(AndrewMap), file="andrewmap.xml")
+
+## Geo Chart
+GeoChart <- gvisGeoChart(Exports, "Country", "Profit",
+                         options=list(region="150"))
+cat(createGoogleGadget(GeoChart), file="geochart.xml")
+
+
+## Table. Click on the column header to sort the rows 
+Table <- gvisTable(Exports, options=list(width=400, height=270))
+cat(createGoogleGadget(Table), file="table.xml")
+
+## Table with embedded links
+PopTable <- gvisTable(Population, options=list(width=600, height=300, page='enable'))
+
+cat(createGoogleGadget(PopTable), file="poptable.xml")
+
+## Tree Map. Left mouse-click to drill down, right mouse-click to move up a hierarchy
+Tree <- gvisTreeMap(Regions,  "Region", "Parent", "Val", "Fac",
+                    options=list(fontSize=16, width=400, height=300)) 
+
+cat(createGoogleGadget(Tree), file="treemap.xml")
+
+require(datasets)
+states <- data.frame(state.name, state.area)
+
+states3 <- data.frame(state.region, state.division, state.name, state.area)
+
+regions <- aggregate(list(region.area=states3$state.area),
+                     list(region=state.region), sum)
+
+divisions <- aggregate(list(division.area=states3$state.area),
+                     list(division=state.division, region=state.region),
+                     sum)
+
+my.states3 <- data.frame(regionid=c("USA",
+                                    as.character(regions$region),
+                                    as.character(divisions$division),
+                                    as.character(states3$state.name)),
+                         parentid=c(NA, rep("USA", 4), 
+                                   as.character(divisions$region),
+                                   as.character(states3$state.division)),
+                         state.area=c(sum(states3$state.area),
+                                      regions$region.area,
+                                      divisions$division.area,
+                                      states3$state.area))
+
+my.states3$state.area.log=log(my.states3$state.area)
+
+statesTree3 <- gvisTreeMap(my.states3, "regionid", "parentid",
+                           "state.area", "state.area.log", options=list(showScale=TRUE, width=400, height=300))
+
+cat(createGoogleGadget(statesTree3), file="statestreemap.xml")
+
+
+## Annotated Time Line Chart
+AnnoTimeLine  <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(displayAnnotations=TRUE,
+                             legendPosition='newRow',
+                             width=400, height=250)
+                           )
+cat(createGoogleGadget(AnnoTimeLine), file="annotimeline.xml")
+
+## Sample data
+df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+
+## Line chart
+Line <- gvisLineChart(df,
+                options=list(legend='none', width=300, height=200))
+cat(createGoogleGadget(Line), file="linechart.xml")
+
+
+## Bar chart
+Bar <- gvisBarChart(df,
+                    options=list(legend='none', width=300, height=200))
+cat(createGoogleGadget(Bar), file="barchart.xml")
+
+## Column chart
+Column <- gvisColumnChart(df,
+                          options=list(legend='none', width=300, height=200))
+cat(createGoogleGadget(Column), file="columnchart.xml")
+
+## Area chart
+Area <- gvisAreaChart(df,
+                      options=list(legend='none', width=300, height=300))
+cat(createGoogleGadget(Area), file="areachart.xml")
+
+## Stepped Area Chart
+SteppedArea <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+      options=list(isStacked=TRUE, width=300, height=290))
+plot(SteppedArea)
+cat(createGoogleGadget(Area), file="steppedareachart.xml")
+
+## Scatter chart
+Scatter <- gvisScatterChart(women, options=list(legend="none",
+                 lineWidth=2, pointSize=0, 
+                 title="Women", vAxis="{title:'weight (lbs)'}",
+                 hAxis="{title:'height (in)'}", width=300, height=300))
+                 
+cat(createGoogleGadget(Scatter), file="scatterchart.xml")
+
+## Bubble chart
+Bubble <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses",
+                           colorvar="Year", sizevar="Profit",
+                           options=list(hAxis='{minValue:75, maxValue:125}',
+                             width=500, height=300))
+
+cat(createGoogleGadget(Bubble), file="bubblechart.xml")
+
+
+## Pie chart
+Pie <- gvisPieChart(CityPopularity,
+                    options=list(width=400, height=200))
+cat(createGoogleGadget(Pie), file="piechart.xml")
+
+## Gauge
+Gauge <-  gvisGauge(CityPopularity, options=list(min=0, max=800, greenFrom=500,
+                                      greenTo=800, yellowFrom=300, yellowTo=500,
+                                      redFrom=0, redTo=300, width=300, height=220))
+cat(createGoogleGadget(Gauge), file="gauge.xml")
+
+## Intensity Map
+Intensity <- gvisIntensityMap(df)
+
+cat(createGoogleGadget(Intensity), file="intensitymap.xml")
+
+## Org chart
+Org <- gvisOrgChart(Regions, options=list(width=600, height=210,
+                               size='large', allowCollapse=TRUE))
+cat(createGoogleGadget(Org), file="orgchart.xml")
+
+## Candlestick chart
+Candle <- gvisCandlestickChart(OpenClose, xvar="Weekday", low="Low",
+                                      open="Open", close="Close",
+                                      high="High",
+                                      options=list(legend='none',
+                                        width=300, height=250))
+
+cat(createGoogleGadget(Candle), file="candlestickchart.xml")
diff --git a/inst/mansections/GoogleChartToolsURL.txt b/inst/mansections/GoogleChartToolsURL.txt
new file mode 100644
index 0000000..23e773c
--- /dev/null
+++ b/inst/mansections/GoogleChartToolsURL.txt
@@ -0,0 +1,2 @@
+\url{http://developers.google.com/chart/interactive/docs/gallery/CHARTNAME}
+
diff --git a/inst/mansections/GoogleChartToolsURLConfigOptions.txt b/inst/mansections/GoogleChartToolsURLConfigOptions.txt
new file mode 100644
index 0000000..ffe2c2f
--- /dev/null
+++ b/inst/mansections/GoogleChartToolsURLConfigOptions.txt
@@ -0,0 +1,2 @@
+\url{https://developers.google.com/chart/interactive/docs/gallery/CHARTNAME#Configuration_Options}
+
diff --git a/inst/mansections/gvisOptions.txt b/inst/mansections/gvisOptions.txt
new file mode 100644
index 0000000..86acc2b
--- /dev/null
+++ b/inst/mansections/gvisOptions.txt
@@ -0,0 +1,52 @@
+The parameters can be set via a named list. The parameters have to map those
+of the Google documentation. 
+\itemize{
+\item{Boolean arguments are set to 
+either \code{TRUE} or \code{FALSE}, using the R syntax.
+}
+\item{Google API parameters with a single value and with names that don't 
+include a "." are set like one would do in R, that is 
+\code{options=list(width=200, height=300)}. 
+Exceptions to this rule are the width and height options for 
+\code{\link{gvisAnnotatedTimeLine}} and \code{\link{gvisAnnotationChart}}.
+For those two functions, width and height must be character strings of the 
+format \code{"Xpx"}, where \code{X} is a number, or \code{"automatic"}. 
+For example, 
+\code{options=list(width="200px", height="300px")}.
+}
+\item{Google API parameters with names that don't include a ".", but require 
+multivalues are set as a character, wrapped in "[ ]" and separated by commas, 
+e.g. 
+
+\code{options=list(colors="['#cbb69d', '#603913', '#c69c6e']")}
+}
+\item{Google API parameters with names that do include a "." present parameters with 
+several sub-options and have to be set as a character wrapped in "{ }".
+The values of those sub-options are set via parameter:value. Boolean values
+have to be stated as \code{'true'} or \code{'false'}. 
+For example the Google documentaion states the formating options for the 
+vertical axis and states the parameter as \code{vAxis.format}. 
+Then this paramter can be set in R as:
+
+\code{options=list(vAxis="{format:'#,###\%'}")}. 
+}
+\item{If several sub-options have to be set, e.g. 
+
+\code{titleTextStyle.color}, \code{titleTextStyle.fontName} and 
+\code{titleTextStyle.fontSize}, then those can be combined in one list item 
+such as:
+
+\code{options=list(titleTextStyle="{color:'red', fontName:'Courier', fontSize:16}")}
+}
+\item{paramters that can have more than one value per sub-options are 
+wrapped in "[ ]". For example to set the labels for left and right axes use:
+
+\code{options=list(vAxes="[{title:'val1'}, {title:'val2'}]")}
+}
+\item{\code{gvis.editor}}{ a character label for an
+ on-page button that opens an in-page dialog box enabling
+users to edit, change and customise the chart. By default no
+value is given and therefore no button is displayed. 
+}
+}
+For more details see the Google API documentation and the R examples below.   
diff --git a/inst/mansections/gvisOutputStructure.txt b/inst/mansections/gvisOutputStructure.txt
new file mode 100644
index 0000000..c0fb493
--- /dev/null
+++ b/inst/mansections/gvisOutputStructure.txt
@@ -0,0 +1,43 @@
+"\code{gvis}" and "\code{list}".   
+An object of class "\code{gvis}" is a list containing at least the
+following components:
+\describe{
+\item{\code{type}}{Google visualisation type}
+\item{\code{chartid}}{character id of the chart object. Unique chart
+ids are required to place several charts on the same page.
+}
+\item{\code{html}}{a list with the building blocks for a page
+\describe{
+\item{\code{header}}{a character string of a html page header:
+\code{<html>...<body>},}
+\item{\code{chart}}{a named character vector of the chart's building blocks:
+\describe{
+\item{\code{jsHeader}}{Opening \code{<script>} tag and
+reference to Google's JavaScript library.
+}
+\item{\code{jsData}}{JavaScript function defining the input
+\code{data} as a JSON object.
+} 
+\item{\code{jsDrawChart}}{JavaScript function combing the data with 
+the visualisation API and user options.
+}
+\item{\code{jsDisplayChart}}{JavaScript function calling the
+handler to display the chart.
+}
+\item{\code{jsFooter}}{End tag \code{</script>}.
+}
+\item{\code{jsChart}}{Call of the \code{jsDisplayChart} function.
+}
+\item{\code{divChart}}{\code{<div>} container to embed the chart
+into the page.
+}
+}   
+}
+\item{\code{caption}}{character string of a standard caption,
+including data name and chart id.
+}  
+\item{\code{footer}}{character string of a html page footer:
+\code{</body>...</html>}, including the used R and googleVis version
+and link to Google's Terms of Use.}
+}}
+}
diff --git a/inst/rsp/index.rsp b/inst/rsp/index.rsp
new file mode 100644
index 0000000..5463562
--- /dev/null
+++ b/inst/rsp/index.rsp
@@ -0,0 +1,158 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+        "http://www.w3.org/TR/REC-html40/loose.dtd">
+
+ <%title="Using the Google visualisation API with R"%>
+ 
+<html>
+  <%@include file="src/simpleHead.rsp"%>
+  
+  <body>
+    <%@include file="src/simpleHeader.rsp"%>
+    <%require(googleVis)%>
+    <h2>
+      Welcome
+    </h2>
+    Welcome
+    to <a href="http://code.google.com/p/google-motion-charts-with-r/"><b>googleVis</b></a> 
+    version <%=packageDescription("googleVis")$Version%> by:
+    <a href="mailto:markus.gesmann at gmail.com">Markus Gesmann</a>
+    and <a href="mailto:decastillo at gmail.com">Diego de Castillo</a>
+    <h2>
+      Introduction
+    </h2> 
+    <p>
+     <tt>googleVis</tt> is a package
+     for <a href="http://www.r-project.org">R</a> which provides
+     functions to visualise data in R with
+     the <a href="http://code.google.com/apis/visualization/documentation/gallery.html">Google
+     Visualisation API.</a> 
+     <BR>
+     Please read 
+     Google's <a href="http://code.google.com/apis/visualization/terms.html">terms
+     of use</a> and data policy. 
+     <BR>The visual output will be rendered in your browser using Flash. 
+    </p>
+    <p>    
+      Type <tt>?googleVis</tt> in the R console to see the overall documentation
+      and <tt>vignette('googleVis')</tt> to access the package
+      vignette.
+      <BR>
+      This page provides some examples of the package. You find more
+      as part of the demo; to execute the demo type into the R
+      console: <tt>demo(googleVis)</tt>.
+    </p>
+    <h2>
+      Embedding googleVis charts into your web page with <a href="/">R.rsp</a>
+    </h2>
+    <p>
+      The R
+      package <tt><a href="http://cran.r-project.org/package=R.rsp">R.rsp</a></tt>
+      provides a lightweight web-server which we are using here to
+      display these pages. Additionally the <tt>R.rsp</tt>
+      package allows us to dynamically generate documents into
+      static content using R Server Pages. This means we can mix html and R 
+      code to create content on the fly. 
+    </p>
+    <p>
+      For more information
+      on <tt>R.rsp</tt> see <a href="/">here.</a>
+    </p>
+    <h2>Examples with googleVis</h2>
+    You can embed googleVis charts quite easily in your rsp page.
+    <p>
+      For example 
+      <pre>
+<%=gvisGeoMap(Exports, locationvar='Country',
+numvar='Profit',options=list(height=350,
+dataMode='regions'))$html$chart%> 
+      </pre> 
+      gives you a <b>Geo Map</b>:
+    </p>
+    <p>
+      <%=gvisGeoMap(Exports, locationvar='Country', numvar='Profit',options=list(height=350, dataMode='regions'))$html$chart%>
+      See also: <a href="http://code.google.com/apis/visualization/documentation/gallery/geomap.html">Google
+      Geo Map API</a>  
+    </p>
+    <p>
+      A Google <b>Map</b> can be create e.g. via 
+      <pre>
+<%=gvisMap(Andrew, "LatLong" , "Tip", options=list(showTip=TRUE,
+showLine=TRUE, enableScrollWheel=TRUE,  mapType='terrain',
+useMapTypeControl=TRUE))$html$chart%>
+     </pre> 
+    </p>
+    <p>
+<%=gvisMap(as.list(Andrew), "LatLong" , "Tip",  options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE, mapType='terrain', useMapTypeControl=TRUE))$html$chart%>
+     See also: <a href="http://code.google.com/apis/visualization/documentation/gallery/map.html">Google
+	Map API</a>  
+    </p>
+   <p>
+      For a <b>Motion Chart</b> we would write something like 
+      <pre>
+<%=gvisMotionChart(Fruits, idvar="Fruit", timevar="Year",
+options=list(width=600, height=500))$html$chart%>
+      </pre> 
+    </p>
+    <p>
+      <%=gvisMotionChart(Fruits, idvar="Fruit", timevar="Year",  options=list(width=600, height=500))$html$chart%>
+      See also: <a href="http://code.google.com/apis/visualization/documentation/gallery/motionchart.html">Google
+	Motion Chart API</a>  
+    </p>
+    <p>
+      A <b>Tree Map</b> can be generated with 
+      <pre>
+<%=gvisTreeMap(Regions, idvar="Region", parentvar="Parent",
+sizevar="Val", colorvar="Fac", options=list(width=600, height=500,
+showScale=TRUE, fontSize=16))$html$chart%>
+      </pre> 
+    </p>
+    <p>
+      <%=gvisTreeMap(Regions, "Region", "Parent", "Val", "Fac", options=list(width=600, height=500,  showScale=TRUE, fontSize=16))$html$chart%>
+      See also: <a href="http://code.google.com/apis/visualization/documentation/gallery/treemap.html">Google
+	Tree Map API</a>  
+    </p>
+    <p>
+      To display a <b>Table</b> we write 
+      <pre>
+<%=gvisTable(Exports, options=list(width=600, height=300))$html$chart%>
+     </pre> 
+    </p>
+    <p>
+      <%=gvisTable(Exports, options=list(width=600, height=300))$html$chart%>
+      See also: <a href="http://code.google.com/apis/visualization/documentation/gallery/table.html">Google
+      Table API</a>  
+    </p>
+
+
+    <p>
+      For an <b>Annotated Time Line</b> an example could look like 
+      <pre>
+<%=gvisAnnotatedTimeLine(Stock, datevar="Date", numvar="Value",
+idvar="Device",  titlevar="Title", annotationvar="Annotation",
+options=list(displayAnnotations=TRUE, width=600, height=350))$html$chart%> 
+     </pre> 
+    </p>
+    <p>
+      <%=gvisAnnotatedTimeLine(Stock, datevar="Date", numvar="Value",  idvar="Device", titlevar="Title", annotationvar="Annotation",  options=list(displayAnnotations=TRUE, width=600, height=350))$html$chart%>
+      See also: <a href="http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html">Google
+      Annotated Time Line API</a>  
+    </p>
+
+    <p>
+      We hope these examples show you how you can generate content
+      with functions from the <!-- <tt>R.rsp</tt> and --> <tt>googleVis</tt>
+      packages.
+    </p>
+    <p>
+    </p>
+    <small>
+      <em>If a page is loading "forever", that is, the internal web server seems to be stuck, try to press ENTER in the main R window.  This normally helps.</em>
+    </small>
+    
+
+
+    <%@include file="src/simpleFooter.rsp"%>
+  </body>
+</html>
+
+
diff --git a/inst/rsp/myAnalysis/index.rsp b/inst/rsp/myAnalysis/index.rsp
new file mode 100644
index 0000000..031f5e9
--- /dev/null
+++ b/inst/rsp/myAnalysis/index.rsp
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+        "http://www.w3.org/TR/REC-html40/loose.dtd">
+
+<%title="Google Motion Chart Pages"%>
+
+
+<html>
+<%@include file="../src/simpleHead.rsp"%>
+
+<body>
+<%@include file="../src/simpleHeader.rsp"%>
+
+
+
+<p>
+By default the <tt>googleVis</tt> package will store its output in
+this directory.
+</p>
+Current files:
+<ul>
+ <%=paste("<li> <a href='", dir(system.file(paste("rsp","myAnalysis", sep=.Platform$file.sep), package="googleVis")),"'>",   dir(system.file(paste("rsp","myAnalysis",  sep=.Platform$file.sep), package="googleVis")), "</a>\n",   sep="")%>
+</ul>
+
+
+<%@include file="../src/simpleFooter.rsp"%>
+</body>
+</html>
diff --git a/inst/rsp/src/simpleFooter.rsp b/inst/rsp/src/simpleFooter.rsp
new file mode 100755
index 0000000..988f46c
--- /dev/null
+++ b/inst/rsp/src/simpleFooter.rsp
@@ -0,0 +1,6 @@
+<%--     F o o t e r    --%>
+<address style="margin-top: 1ex; padding-top: 0.5ex; border-top: #000000 1px solid;">
+ <div style="float:left; font-size:smaller;">Generated on <%=date()%> with <a href="http://code.google.com/p/google-motion-charts-with-r/">googleVis</a>.
+ </div>
+ <div style="float:right; font-size:smaller;" class="WebcutsHide">Powered by <a href="http://www.braju.com/R/">R.rsp v<%=getVersion(R.rsp)%></a>.</div>
+</address>
diff --git a/inst/rsp/src/simpleHead.rsp b/inst/rsp/src/simpleHead.rsp
new file mode 100755
index 0000000..f04cd5b
--- /dev/null
+++ b/inst/rsp/src/simpleHead.rsp
@@ -0,0 +1,10 @@
+<head>
+<link media="screen" type="text/css" rel="StyleSheet" href="/css/R.css">
+<link media="screen" type="text/css" rel="StyleSheet" href="/css/rsp.css">
+<link media="screen" type="text/css" rel="StyleSheet" href="/css/figures.css"> 
+</head>
+
+<!-- 
+HTTP debug information: 
+<%=request%> 
+-->
diff --git a/inst/rsp/src/simpleHeader.rsp b/inst/rsp/src/simpleHeader.rsp
new file mode 100755
index 0000000..092af67
--- /dev/null
+++ b/inst/rsp/src/simpleHeader.rsp
@@ -0,0 +1,36 @@
+<%--     H e a d e r   --%>
+<%
+uri <- getRequestUri(request);
+uriPath <- strsplit(uri, split="/")[[1]][-1];
+
+if (regexpr("./$", uri) != -1) {
+  upPath <- "../";
+} else if (regexpr("./index.rsp$", uri) != -1) {
+  upPath <- "../";
+  uriPath <- uriPath[-length(uriPath)];
+} else {
+  upPath <- "index.rsp";
+  uriPath <- uriPath[-length(uriPath)];
+}
+%>
+
+<div class="PageHeader">
+ <div style="float: left;">
+  <a href="/">~</a> / 
+  <% for (kk in seq(length=length(uriPath))) { %>
+    <a href="/<%=paste(uriPath[1:kk], collapse="/")%>/"><%=uriPath[kk]%></a> /
+  <% } %>
+ </div>
+ <div style="float: right;">
+  Admin: 
+  <a href="/admin/shutdown.rsp">shutdown</a>
+ </div>
+ <br>
+</div>
+
+
+<style type="text/css">  
+tt {  
+font-family: courier, monospace;  
+}  
+</style>  
diff --git a/inst/shiny/server.R b/inst/shiny/server.R
new file mode 100644
index 0000000..3251309
--- /dev/null
+++ b/inst/shiny/server.R
@@ -0,0 +1,15 @@
+library(googleVis)
+
+shinyServer(function(input, output) {
+  datasetInput <- reactive({
+    switch(input$dataset,
+           "rock" = rock,
+           "pressure" = pressure,
+           "cars" = cars)
+  })
+  
+  output$view <- renderGvis({
+    gvisScatterChart(datasetInput(), 
+                     options=list(title=paste('Data:',input$dataset)))
+  })
+})
\ No newline at end of file
diff --git a/inst/shiny/ui.R b/inst/shiny/ui.R
new file mode 100644
index 0000000..c7fb1e5
--- /dev/null
+++ b/inst/shiny/ui.R
@@ -0,0 +1,10 @@
+shinyUI(pageWithSidebar(
+  headerPanel("googleVis on Shiny"),
+  sidebarPanel(
+    selectInput("dataset", "Choose a dataset:", 
+                choices = c("rock", "pressure", "cars"))
+  ),
+  mainPanel(
+    htmlOutput("view")
+  )
+))
\ No newline at end of file
diff --git a/man/Andrew.Rd b/man/Andrew.Rd
new file mode 100644
index 0000000..4cf38bd
--- /dev/null
+++ b/man/Andrew.Rd
@@ -0,0 +1,56 @@
+\name{Andrew}
+\alias{Andrew}
+\docType{data}
+\title{
+  Hurricane Andrew: googleVis example data set
+}
+\description{
+  Hurricane Andrew storm path from 16 August to 28 August 1992
+}
+\usage{data(Andrew)}
+\format{
+  A data frame with 47 observations on the following 8 variables.
+  \describe{
+    \item{\code{Date/Time UTC}}{a POSIXct}
+    \item{\code{Lat}}{a numeric vector}
+    \item{\code{Long}}{a numeric vector}
+    \item{\code{Pressure_mb}}{a numeric vector}
+    \item{\code{Speed_kt}}{a numeric vector}
+    \item{\code{Category}}{a factor with levels \code{Hurricane} \code{Tropical Depression} \code{Tropical Storm}}
+    \item{\code{LatLong}}{a character vector}
+    \item{\code{Tip}}{a character vector}
+  }
+}
+%%\details{
+%%  ~~ If necessary, more details than the __description__ above ~~
+%%}
+\source{
+  National Hurricane Center: \url{http://www.nhc.noaa.gov/1992andrew.html}
+}
+%%\references{
+%%  ~~ possibly secondary sources and usages ~~
+%%}
+\examples{
+data(Andrew)
+
+AndrewGeoMap <- gvisGeoMap(Andrew, locationvar='LatLong', numvar='Speed_kt',
+                          hovervar='Category',
+                          options=list(width=800,height=400,
+                          region='US', dataMode='Markers'))
+
+AndrewMap <- gvisMap(Andrew, 'LatLong' , 'Tip',
+                           options=list(showTip=TRUE, showLine=TRUE,
+                           enableScrollWheel=TRUE,
+                           mapType='hybrid', useMapTypeControl=TRUE,
+			   width=800,height=400))
+
+AndrewTable <- gvisTable(Andrew,options=list(width=800))
+
+## Combine the outputs into one page:
+
+AndrewVis <- gvisMerge(AndrewGeoMap, AndrewMap)
+
+plot(AndrewVis)
+
+}
+\keyword{datasets}
diff --git a/man/Cairo.Rd b/man/Cairo.Rd
new file mode 100644
index 0000000..7b056b1
--- /dev/null
+++ b/man/Cairo.Rd
@@ -0,0 +1,27 @@
+  \name{Cairo}
+\alias{Cairo}
+\docType{data}
+\title{
+Daily temperature data for Cairo
+}
+\description{
+The average air temperature (C) in Cairo from 2002 to 2004.
+}
+\usage{data(Cairo)}
+\format{
+  A data frame with 1091 observations on the following 2 variables.
+  \describe{
+    \item{\code{Date}}{calendar date}
+    \item{\code{Temp}}{average temperatur in Celsius}
+  }
+}
+%\details{
+%}
+\references{
+Wood, S.N. (2006) Generalized Additive Models: An Introduction with R
+}
+\examples{
+data(Cairo)
+plot(gvisCalendar(Cairo))
+}
+\keyword{datasets}
diff --git a/man/CityPopularity.Rd b/man/CityPopularity.Rd
new file mode 100644
index 0000000..56127c8
--- /dev/null
+++ b/man/CityPopularity.Rd
@@ -0,0 +1,31 @@
+\name{CityPopularity}
+\alias{CityPopularity}
+\docType{data}
+\title{
+CityPopularity: googleVis example data set
+}
+\description{
+Example data set to illustrate the use of the googleVis package.
+}
+\usage{data(CityPopularity)}
+\format{
+  A data frame with 6 observations on the following 2 variables.
+  \describe{
+    \item{\code{City}}{a factor with levels \code{Boston} \code{Chicago} \code{Houston} \code{Los Angeles} \code{Miami} \code{New York}}
+    \item{\code{Popularity}}{a numeric vector}
+  }
+}
+%%\details{
+%%  ~~ If necessary, more details than the __description__ above ~~
+%%}
+\source{
+ Google Geo Map  API: \url{https://google-developers.appspot.com/chart/interactive/docs/gallery/geomap.html}
+}
+%%\references{
+%%  ~~ possibly secondary sources and usages ~~
+%}
+\examples{
+data(CityPopularity)
+str(CityPopularity)
+}
+\keyword{datasets}
diff --git a/man/Exports.Rd b/man/Exports.Rd
new file mode 100644
index 0000000..9080cb1
--- /dev/null
+++ b/man/Exports.Rd
@@ -0,0 +1,23 @@
+\name{Exports}
+\alias{Exports}
+\docType{data}
+\title{
+Exports: googleVis example data set
+}
+\description{
+  Example data set to illustrate the use of the googleVis package.
+}
+\usage{data(Exports)}
+\format{
+  A data frame with 10 observations on the following 3 variables.
+  \describe{
+    \item{\code{Country}}{a factor with levels \code{Brazil}, \code{Germany} ...}
+    \item{\code{Profit}}{a numeric vector}
+    \item{\code{Online}}{a logical vector}
+  }
+}
+\examples{
+data(Exports)
+str(Exports)
+}
+\keyword{datasets}
diff --git a/man/Fruits.Rd b/man/Fruits.Rd
new file mode 100644
index 0000000..ac706df
--- /dev/null
+++ b/man/Fruits.Rd
@@ -0,0 +1,31 @@
+\name{Fruits}
+\alias{Fruits}
+\docType{data}
+\title{
+Fruits: googleVis example data set
+}
+\description{
+ Example data set to illustrate the use of the googleVis package.
+}
+\usage{data(Fruits)}
+\format{
+A data frame with 9 observations on the following 7 variables.
+  \describe{
+    \item{\code{Fruit}}{a factor with levels \code{Apples} \code{Bananas} \code{Oranges}}
+    \item{\code{Year}}{a numeric vector}
+    \item{\code{Location}}{a factor with levels \code{East} \code{West}}
+    \item{\code{Sales}}{a numeric vector}
+    \item{\code{Expenses}}{a numeric vector}
+    \item{\code{Profit}}{a numeric vector}
+    \item{\code{Date}}{a Date}
+  }
+}
+\examples{
+data(Fruits)
+M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
+
+\dontrun{
+ plot(M)
+}
+}
+\keyword{datasets}
diff --git a/man/OpenClose.Rd b/man/OpenClose.Rd
new file mode 100644
index 0000000..dba1cb1
--- /dev/null
+++ b/man/OpenClose.Rd
@@ -0,0 +1,35 @@
+\name{OpenClose}
+\alias{OpenClose}
+\docType{data}
+\title{
+ OpenClose: googleVis example data set
+}
+\description{
+  Example data set to illustrate the use of the googleVis package.
+}
+\usage{data(OpenClose)}
+\format{
+  A data frame with 5 observations on the following 5 variables.
+  \describe{
+    \item{\code{Weekday}}{a factor with levels \code{Fri} \code{Mon} \code{Thurs} \code{Tues} \code{Wed}}
+    \item{\code{Low}}{a numeric vector}
+    \item{\code{Open}}{a numeric vector}
+    \item{\code{Close}}{a numeric vector}
+    \item{\code{High}}{a numeric vector}
+  }
+}
+%\details{
+%%  ~~ If necessary, more details than the __description__ above ~~
+%%}
+\source{
+  Google Visualisation: Candlestick Chart
+  \url{http://code.google.com/apis/chart/interactive/docs/gallery/candlestickchart.html}
+}
+%%\references{
+%%  ~~ possibly secondary sources and usages ~~
+%%}
+\examples{
+OpenClose
+plot(gvisCandlestickChart(OpenClose, options=list(legend='none')))
+}
+\keyword{datasets}
diff --git a/man/Population.Rd b/man/Population.Rd
new file mode 100644
index 0000000..e528a55
--- /dev/null
+++ b/man/Population.Rd
@@ -0,0 +1,36 @@
+\name{Population}
+\alias{Population}
+\docType{data}
+\title{
+ Population: googleVis example data set
+}
+\description{
+ Example data set to illustrate the use of the googleVis package.
+}
+\usage{data(Population)}
+\format{
+  A data frame with 195 observations on the following 7 variables.
+  \describe{
+    \item{\code{Rank}}{a numeric vector with population ranking}
+    \item{\code{Country}}{country name as character}
+    \item{\code{Population}}{population}
+    \item{\code{\% of World Population}}{\% of world population}
+    \item{\code{Flag}}{html image-tag to wikipedia with country flag}
+    \item{\code{Mode}}{logical test vector}
+    \item{\code{Date}}{date test vector}
+  }
+}
+\source{
+Sourced from Wikipedia (columns 1 to 5):
+\url{http://en.wikipedia.org/wiki/List_of_countries_by_population},
+9 October 2010. 
+}
+\examples{
+data(Population)
+tbl <- gvisTable(Population)
+
+\dontrun{
+plot(tbl)
+}
+}
+\keyword{datasets}
diff --git a/man/Regions.Rd b/man/Regions.Rd
new file mode 100644
index 0000000..6a68e63
--- /dev/null
+++ b/man/Regions.Rd
@@ -0,0 +1,29 @@
+\name{Regions}
+\alias{Regions}
+\docType{data}
+\title{
+ Regions: googleVis example data set
+}
+\description{
+ Example data set to illustrate the use of the googleVis package.
+ }
+\usage{data(Regions)}
+\format{
+  A data frame with 11 observations on the following 4 variables.
+  \describe{
+    \item{\code{Region}}{a factor with levels \code{America}, \code{Asia} ...}
+    \item{\code{Parent}}{parent region identifier}
+    \item{\code{Val}}{a numeric vector}
+    \item{\code{Fac}}{a numeric vector}
+  }
+}
+\examples{
+data(Regions)
+Tree <- gvisTreeMap(Regions,  "Region", "Parent", "Val", "Fac",
+                    options=list(width=600, height=500,
+                                 showScale=TRUE, fontSize=16))
+\dontrun{
+plot(Tree)
+}
+}
+\keyword{datasets}
diff --git a/man/Stock.Rd b/man/Stock.Rd
new file mode 100644
index 0000000..881931b
--- /dev/null
+++ b/man/Stock.Rd
@@ -0,0 +1,56 @@
+\name{Stock}
+\alias{Stock}
+\docType{data}
+\title{
+  Stock: googleVis example data set
+}
+\description{
+  Example data set to illustrate the use of the googleVis package.
+}
+\usage{data(Stock)}
+\format{
+  A data frame with 12 observations on the following 5 variables.
+  \describe{
+    \item{\code{Date}}{a Date}
+    \item{\code{Device}}{a character vector}
+    \item{\code{Value}}{a numeric vector}
+    \item{\code{Title}}{a factor with levels \code{Bought pencils} \code{Out of stock}}
+    \item{\code{Annotation}}{a factor with levels \code{Bought 200k pencils} \code{Ran of stock on pens at 4pm}}
+  }
+}
+%%\details{
+%%  ~~ If necessary, more details than the __description__ above ~~
+%%}
+\source{
+  Google Annotated Time Line  API:
+  \url{https://google-developers.appspot.com/chart/interactive/docs/gallery/annotatedtimeline.html}
+}
+%%\references{
+%%  ~~ possibly secondary sources and usages ~~
+%%}
+\examples{
+## Create data as used by Google in their annotated time line example
+
+ Date <- as.Date(paste("2008-1-", 1:6, sep=""))
+ Pencils <- c(3000, 14045, 5502, 75284, 41476, 333222)
+ Pencils.titles <-c(rep(NA,4), 'Bought pencils', NA)
+ Pencils.annotation <-c(rep(NA,4), 'Bought 200k pencils', NA)
+ Pens <- c(40645, 20374, 50766, 14334, 66467, 39463)
+ Pens.titles <- c(rep(NA, 3), 'Out of stock', NA, NA)
+ Pens.annotation <- c(rep(NA, 3), 'Ran of out stock of pens at 4pm', NA, NA)
+
+ original.df=data.frame(Date, Pencils, Pencils.titles,
+                        Pencils.annotation, Pens, Pens.titles,
+                        Pens.annotation)  
+
+
+ Stock <- reshape(original.df, idvar="Date", times=c("Pencils", "Pens"), 
+                  timevar="Device",
+                  varying=list(c("Pencils", "Pens"),
+                               c("Pencils.titles", "Pens.titles"),
+                               c("Pencils.annotation", "Pens.annotation")), 
+                   v.names=c("Value", "Title", "Annotation"),
+                   direction="long")
+
+}
+\keyword{datasets}
diff --git a/man/createGoogleGadget.Rd b/man/createGoogleGadget.Rd
new file mode 100644
index 0000000..43978ef
--- /dev/null
+++ b/man/createGoogleGadget.Rd
@@ -0,0 +1,52 @@
+\name{createGoogleGadget}
+\alias{createGoogleGadget}
+\title{
+Create a Google Gadget
+}
+\description{
+Create a Google Gadget based on a Google Visualisation Object
+}
+\usage{
+createGoogleGadget(gvis)
+}
+\arguments{
+  \item{gvis}{an object of class 'gvis', e.g. output of a googleVis visualisation functions. 
+}
+}
+%\details{
+%%  ~~ If necessary, more details than the description above ~~
+%}
+\value{
+  createGoogleGadget returns a Google Gadget XML string.
+}
+\references{
+  For more information about Google Gadgets see:
+  \url{https://developers.google.com/gadgets/}
+}
+\author{
+Markus Gesmann
+}
+\note{
+Google Gadgets can be embedded in various Google products, for example
+as part of a Google Code wiki page, Blogger or Google Sites.
+In all cases the XML gadget file has to be hosted online, e.g. using Google Docs.
+
+In Blogger the gadgets can be embedded via the design tab, and in a Google Sites via
+the menu "Insert" -> "More gadgets ..." -> "Add gadget ULR".  
+
+In a Google Code wiki the gadget can be embedded via
+
+\code{<wiki:gadget url="http://example.com/gadget.xml" height="200" border="0" />}
+
+}
+
+
+\seealso{
+See also as \code{\link{print.gvis}}, \code{\link{cat}}
+}
+\examples{
+M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
+gdgt <- createGoogleGadget(M)
+cat(gdgt)
+}
+\keyword{ intreface }
diff --git a/man/dino.Rd b/man/dino.Rd
new file mode 100644
index 0000000..5ea4f46
--- /dev/null
+++ b/man/dino.Rd
@@ -0,0 +1,27 @@
+\name{dino}
+\alias{dino}
+\docType{data}
+\title{
+Dinosaur data
+}
+\description{
+Lenght of dinosaurs
+}
+\usage{data(dino)}
+\format{
+  A data frame with 28 observations on 2 variables, dinosaur and length.
+}
+%\details{
+%%  ~~ If necessary, more details than the __description__ above ~~
+%}
+\source{
+  \url{https://developers.google.com/chart/interactive/docs/gallery/histogram}
+}
+%\references{
+%%  ~~ possibly secondary sources and usages ~~
+%}
+\examples{
+data(dino)
+str(dino) 
+}
+\keyword{datasets}
diff --git a/man/googleVis-package.Rd b/man/googleVis-package.Rd
new file mode 100644
index 0000000..6cd0289
--- /dev/null
+++ b/man/googleVis-package.Rd
@@ -0,0 +1,45 @@
+\name{googleVis-package}
+\alias{googleVis-package}
+\alias{googleVis}
+\docType{package}
+\title{
+  R Interface to Google Charts
+}
+\description{
+  R interface to Google Charts API, allowing users 
+  to create interactive charts based on data frames. Charts 
+  are displayed locally via the R HTTP help server. A modern 
+  browser with Internet connection is required and for some 
+  charts Flash. The data remains local and is not uploaded to 
+  Google.
+    
+  Please visit the project web site for more information:
+  \url{http://github.com/mages/googleVis}.
+
+  You find further notes on Markus' blog:
+  \url{http://www.magesblog.com/search/label/googleVis}
+} 
+%\details{
+%	}
+\author{
+	Markus Gesmann, Diego de Castillo
+	}
+\note{
+  See \code{vignette("googleVis")} for an introduction to the
+  \code{googleVis} package. 
+  }
+\references{
+  \itemize{
+		\item Google Charts API: \url{https://developers.google.com/chart/}
+	  \item Google Terms of Use: \url{https://developers.google.com/terms/}
+	  \item Google Maps API Terms of Service: \url{https://developers.google.com/maps/terms}
+      }
+}
+\examples{
+\dontrun{
+  demo(googleVis)
+  ## For other demos see
+  demo(package='googleVis')	
+  }
+}
+\keyword{ package }
diff --git a/man/gvisAnnotatedTimeLine.Rd b/man/gvisAnnotatedTimeLine.Rd
new file mode 100644
index 0000000..652b261
--- /dev/null
+++ b/man/gvisAnnotatedTimeLine.Rd
@@ -0,0 +1,227 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisAnnotatedTimeLine.R
+\name{gvisAnnotatedTimeLine}
+\alias{gvisAnnotatedTimeLine}
+\title{Google Annotated Time Line with R
+\Sexpr{googleChartName <- "annotatedtimeline"}
+\Sexpr{gvisChartName <- "gvisAnnotatedTimeLine"}}
+\usage{
+gvisAnnotatedTimeLine(data, datevar = "", numvar = "", idvar = "",
+  titlevar = "", annotationvar = "", date.format = "\%Y/\%m/\%d",
+  options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least two columns,
+one with date information (\code{datevar}) and one numerical variable.}
+
+\item{datevar}{column name of \code{data} which shows the date dimension.
+The information has to be of class \code{\link{Date}} or \code{POSIX*} time
+series.}
+
+\item{numvar}{column name of \code{data} which shows the values to be
+displayed against \code{datevar}. The information has to be
+\code{\link{numeric}}.}
+
+\item{idvar}{column name of \code{data} which identifies different groups of
+the data. The information has to be of class \code{\link{character}} or
+\code{\link{factor}}.}
+
+\item{titlevar}{column name of \code{data} which shows the title of the
+annotations. The information has to be of class \code{\link{character}} or
+\code{\link{factor}}.  Missing information can be set to \code{NA}. See
+section 'Details' for more details.}
+
+\item{annotationvar}{column name of \code{data} which shows the annotation
+text. The information has to be of class \code{\link{character}} or
+\code{\link{factor}}. Missing information can be set to \code{NA}. See
+section 'Details' for more details.}
+
+\item{date.format}{if \code{datevar} is of class \code{\link{Date}} then
+this argument specifies how the dates are reformatted to be used by
+JavaScript.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisAnnotatedTimeLine function reads a data.frame and creates text
+output referring to the Google Visualisation API, which can be included into
+a web page, or as a stand-alone page.
+}
+\details{
+An annotated time line is an interactive time series line chart with
+optional annotations. The chart is rendered within the browser using Flash.
+}
+\section{Warnings}{
+
+AnnotatedTimeline (gvisAnnotatedTimeLine) is Flash based, conisder using  AnnotationChart (gvisAnnotationChart) instead.
+For more details visit: goo.gl/tkiEV8
+
+Because of Flash security settings the chart might not work correctly when
+accessed from a file location in the browser (e.g.,
+file:///c:/webhost/myhost/myviz.html) rather than from a web server URL
+(e.g. http://www.myhost.com/myviz.html). See the googleVis package vignette
+and the Macromedia web site
+(\url{http://www.macromedia.com/support/documentation/en/flashplayer/help/})
+for more details.
+
+Important: To use this visualization, you must specify the height and width 
+of the container element explicitly on your page. So, for example:
+options=list(width="600px", height="350px")
+
+Use code{\link{gvisAnnotationChart}} for a non-Flash version of this plot.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Flash and Internet
+## connection to display the visualisation.
+
+
+data(Stock)
+Stock
+A1 <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(displayAnnotations=TRUE,
+                            legendPosition='newRow',
+                            width="600px", height="350px")
+                           )
+plot(A1)
+
+## Two Y-axis
+A2 <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(displayAnnotations=TRUE, 
+                            width="600px", height="350px", scaleColumns='[0,1]',
+                            scaleType='allmaximized')
+                          )
+plot(A2)
+
+## Zoom into the time window, no Y-axis ticks
+A3 <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(
+                             width="600px", height="350px",
+                            zoomStartTime=as.Date("2008-01-04"),
+                            zoomEndTime=as.Date("2008-01-05")) 
+                          )
+plot(A3)
+
+
+
+## Colouring the area below the lines to create an area chart
+A4 <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(
+                             width="600px", height="350px",
+                             fill=10, displayExactValues=TRUE,
+                             colors="['#0000ff','#00ff00']")
+                           )
+                          
+plot(A4)
+
+
+## Data with POSIXct datetime variable
+A5 <- gvisAnnotatedTimeLine(Andrew, datevar="Date/Time UTC",
+                            numvar="Pressure_mb",
+                            options=list(scaleType='maximized',
+                                         width="600px", height="350px")
+                            )
+
+plot(A5)
+
+
+\dontrun{
+
+## Plot Apple's monthly stock prices since 1984
+
+## Get current date
+d <- Sys.time() 
+current.year <- format(d, "\%Y")
+current.month <- format(d, "\%m")
+current.day <- format(d, "\%d")
+
+## Yahoo finance sets January to 00 hence: 
+month <- as.numeric(current.month)  - 1
+month <- ifelse(month < 10, paste("0",month, sep=""), m)
+
+## Get weekly stock prices from Apple Inc.
+tckr <- 'AAPL'
+yahoo <- 'http://ichart.finance.yahoo.com/table.csv'
+
+fn <- sprintf('\%s?s=\%s&a=08&b=7&c=1984&d=\%s&e=\%s&f=\%s&g=w&ignore=.csv',
+      yahoo, tckr, month, current.day, current.year)
+
+## Get data from Yahoo! Finance
+data <- read.csv(fn, colClasses=c("Date", rep("numeric",6)))
+
+AAPL <- reshape(data[,c("Date", "Close", "Volume")], idvar="Date", 
+     		times=c("Close", "Volume"), 
+                timevar="Type",
+                varying=list(c("Close", "Volume")),
+                v.names="Value",
+                direction="long")
+
+## Calculate previous two years for zoom start time
+lyd <- as.POSIXlt(as.Date(d))
+lyd$year <- lyd$year-2
+lyd <- as.Date(lyd)
+
+aapl <- gvisAnnotatedTimeLine(AAPL, datevar="Date",
+                           numvar="Value", idvar="Type",
+                          options=list(
+                            colors="['blue', 'lightblue']",
+                            zoomStartTime=lyd,
+                            zoomEndTime=as.Date(d),
+                            legendPosition='newRow',
+                            width="600px", height="400px", scaleColumns='[0,1]',
+                            scaleType='allmaximized')
+                           )
+
+plot(aapl)
+}
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+plotting methods. Further see \code{\link{reshape}} for reshaping data, e.g.
+from a wide format into a long format.
+}
+\keyword{iplot}
+
diff --git a/man/gvisAnnotationChart.Rd b/man/gvisAnnotationChart.Rd
new file mode 100644
index 0000000..a43e321
--- /dev/null
+++ b/man/gvisAnnotationChart.Rd
@@ -0,0 +1,202 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisAnnotationChart.R
+\name{gvisAnnotationChart}
+\alias{gvisAnnotationChart}
+\title{Google Annotation Chart with R
+\Sexpr{googleChartName <- "annotationchart"}
+\Sexpr{gvisChartName <- "gvisAnnotationChart"}}
+\usage{
+gvisAnnotationChart(data, datevar = "", numvar = "", idvar = "",
+  titlevar = "", annotationvar = "", date.format = "\%Y/\%m/\%d",
+  options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least two columns,
+one with date information (\code{datevar}) and one numerical variable.}
+
+\item{datevar}{column name of \code{data} which shows the date dimension.
+The information has to be of class \code{\link{Date}} or \code{POSIX*} time
+series.}
+
+\item{numvar}{column name of \code{data} which shows the values to be
+displayed against \code{datevar}. The information has to be
+\code{\link{numeric}}.}
+
+\item{idvar}{column name of \code{data} which identifies different groups of
+the data. The information has to be of class \code{\link{character}} or
+\code{\link{factor}}.}
+
+\item{titlevar}{column name of \code{data} which shows the title of the
+annotations. The information has to be of class \code{\link{character}} or
+\code{\link{factor}}.  Missing information can be set to \code{NA}. See
+section 'Details' for more details.}
+
+\item{annotationvar}{column name of \code{data} which shows the annotation
+text. The information has to be of class \code{\link{character}} or
+\code{\link{factor}}. Missing information can be set to \code{NA}. See
+section 'Details' for more details.}
+
+\item{date.format}{if \code{datevar} is of class \code{\link{Date}} then
+this argument specifies how the dates are reformatted to be used by
+JavaScript.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}.}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+gvisAnnotationChart charts are interactive time series line charts that support 
+annotations. Unlike the gvisAnnotatedTimeLine, which uses Flash, 
+annotation charts are SVG/VML and should be preferred whenever possible.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Internet
+## connection to display the visualisation.
+
+
+data(Stock)
+Stock
+A1 <- gvisAnnotationChart(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(displayAnnotations=TRUE,
+                            legendPosition='newRow',
+                            width=600, height=350)
+                           )
+plot(A1)
+
+## Two Y-axis
+A2 <- gvisAnnotationChart(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(displayAnnotations=TRUE, 
+                            width=600, height=350, scaleColumns='[0,1]',
+                            scaleType='allmaximized')
+                          )
+plot(A2)
+
+## Zoom into the time window, no Y-axis ticks
+A3 <- gvisAnnotationChart(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(
+                             width=600, height=350,
+                            zoomStartTime=as.Date("2008-01-04"),
+                            zoomEndTime=as.Date("2008-01-05")) 
+                          )
+plot(A3)
+
+
+
+## Colouring the area below the lines to create an area chart
+A4 <- gvisAnnotationChart(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(
+                             width=600, height=350,
+                             fill=10, displayExactValues=TRUE,
+                             colors="['#0000ff','#00ff00']")
+                           )
+                          
+plot(A4)
+
+
+## Data with POSIXct datetime variable
+A5 <- gvisAnnotationChart(Andrew, datevar="Date/Time UTC",
+                            numvar="Pressure_mb",
+                            options=list(scaleType='maximized')
+                            )
+
+plot(A5)
+
+
+\dontrun{
+
+## Plot Apple's monthly stock prices since 1984
+
+## Get current date
+d <- Sys.time() 
+current.year <- format(d, "\%Y")
+current.month <- format(d, "\%m")
+current.day <- format(d, "\%d")
+
+## Yahoo finance sets January to 00 hence: 
+month <- as.numeric(current.month)  - 1
+month <- ifelse(month < 10, paste("0",month, sep=""), m)
+
+## Get weekly stock prices from Apple Inc.
+tckr <- 'AAPL'
+yahoo <- 'http://ichart.finance.yahoo.com/table.csv'
+
+fn <- sprintf('\%s?s=\%s&a=08&b=7&c=1984&d=\%s&e=\%s&f=\%s&g=w&ignore=.csv',
+      yahoo, tckr, month, current.day, current.year)
+
+## Get data from Yahoo! Finance
+data <- read.csv(fn, colClasses=c("Date", rep("numeric",6)))
+
+AAPL <- reshape(data[,c("Date", "Close", "Volume")], idvar="Date", 
+     		times=c("Close", "Volume"), 
+                timevar="Type",
+                varying=list(c("Close", "Volume")),
+                v.names="Value",
+                direction="long")
+
+## Calculate previous two years for zoom start time
+lyd <- as.POSIXlt(as.Date(d))
+lyd$year <- lyd$year-2
+lyd <- as.Date(lyd)
+
+aapl <- gvisAnnotationChart(AAPL, datevar="Date",
+                           numvar="Value", idvar="Type",
+                          options=list(
+                            colors="['blue', 'lightblue']",
+                            zoomStartTime=lyd,
+                            zoomEndTime=as.Date(d),
+                            legendPosition='newRow',
+                            width=600, height=400, scaleColumns='[0,1]',
+                            scaleType='allmaximized')
+                           )
+
+plot(aapl)
+}
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+plotting methods. Further see \code{\link{reshape}} for reshaping data, e.g.
+from a wide format into a long format.
+}
+\keyword{iplot}
+
diff --git a/man/gvisAreaChart.Rd b/man/gvisAreaChart.Rd
new file mode 100644
index 0000000..f22bcc6
--- /dev/null
+++ b/man/gvisAreaChart.Rd
@@ -0,0 +1,101 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCoreCharts.R
+\name{gvisAreaChart}
+\alias{gvisAreaChart}
+\title{Google Area Chart with R
+\Sexpr{googleChartName <- "areachart"}
+\Sexpr{gvisChartName <- "gvisAreaChart"}}
+\usage{
+gvisAreaChart(data, xvar = "", yvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as an area chart}
+
+\item{xvar}{name of the character column which contains the category labels
+for the x-axes.}
+
+\item{yvar}{a vector of column names of the numerical variables to be
+plotted. Each column is displayed as a separate line.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisAreaChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page.
+}
+\details{
+The area chart is rendered within the browser using SVG or VML and displays
+tips when hovering over points.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+
+## Area chart
+Area1 <- gvisAreaChart(df, xvar="country", yvar=c("val1", "val2"))
+plot(Area1)
+
+## Stacked chart
+Area2 <- gvisAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+      options=list(isStacked=TRUE))
+plot(Area2)
+
+
+## Add a customised title
+Area3 <- gvisAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+             options=list(title="Hello World",
+                          titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}"))
+plot(Area3)
+
+\dontrun{
+## Change y-axis to percentages
+Area3 <- gvisAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+                       options=list(vAxis="{format:'#,###\%'}"))
+plot(Area3)
+}
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisBarChart.Rd b/man/gvisBarChart.Rd
new file mode 100644
index 0000000..d0ce8c7
--- /dev/null
+++ b/man/gvisBarChart.Rd
@@ -0,0 +1,123 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCoreCharts.R
+\name{gvisBarChart}
+\alias{gvisBarChart}
+\title{Google Bar Chart with R
+\Sexpr{googleChartName <- "barchart"}
+\Sexpr{gvisChartName <- "gvisBarChart"}}
+\usage{
+gvisBarChart(data, xvar = "", yvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a bar chart}
+
+\item{xvar}{name of the character column which contains the category labels
+for the x-axes.}
+
+\item{yvar}{a vector of column names of the numerical variables to be
+plotted.  Each column is displayed as a separate bar/column.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisBarChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser using SVG or VML.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+df <- data.frame(country=c("US", "GB", "BR"), 
+                           val1=c(1,3,4), 
+                           val2=c(23,12,32))
+
+## Bar chart
+Bar1 <- gvisBarChart(df, xvar="country", yvar=c("val1", "val2"))
+plot(Bar1)
+
+## Stacked bar chart
+Bar2 <- gvisBarChart(df, xvar="country", yvar=c("val1", "val2"),
+     options=list(isStacked=TRUE))
+plot(Bar2)
+
+
+## Add a customised title and change width of bars
+Bar3 <- gvisBarChart(df, xvar="country", yvar=c("val1", "val2"),
+             options=list(title="Hello World",
+                          titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}",
+                          bar="{groupWidth:'100\%'}"))
+plot(Bar3)
+
+\dontrun{
+## Change x-axis to percentages
+Bar4 <- gvisBarChart(df, xvar="country", yvar=c("val1", "val2"),
+                       options=list(hAxis="{format:'#,###\%'}"))
+plot(Bar4)
+
+## The following example reads data from a Wikipedia table and displays
+## the information in a bar chart.
+## We use the readHMLTable function of the XML package to get the data
+library(XML)
+## Get the data of the biggest ISO container companies from Wikipedia
+##(table 3):
+df=readHTMLTable(readLines("http://en.wikipedia.org/wiki/Intermodal_freight_transport"))[[3]][,1:2]
+## Rename the second column
+names(df)[2]="TEU capacity"
+## The numbers are displayed with commas to separate thousands, so let's
+## get rid of them:
+df[,2]=as.numeric(gsub(",", "", as.character(df[,2])))
+
+## Finally we can create a nice bar chart:
+Bar5 <- gvisBarChart(df, options=list(
+                    chartArea="{left:250,top:50,width:\\"50\%\\",height:\\"75\%\\"}",
+                    legend="bottom", 
+                    title="Top 20 container shipping companies in order of TEU capacity"))
+
+plot(Bar5)
+
+}
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisBubbleChart.Rd b/man/gvisBubbleChart.Rd
new file mode 100644
index 0000000..4f3225e
--- /dev/null
+++ b/man/gvisBubbleChart.Rd
@@ -0,0 +1,124 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisBubbleChart.R
+\name{gvisBubbleChart}
+\alias{gvisBubbleChart}
+\title{Google Bubble Chart with R
+\Sexpr{googleChartName <- "bubblechart"}
+\Sexpr{gvisChartName <- "gvisBubbleChart"}}
+\usage{
+gvisBubbleChart(data, idvar = "", xvar = "", yvar = "", colorvar = "",
+  sizevar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a bubble chart.
+The data has to have at least three columns for \code{idvar, xvar}, and
+\code{yvar}.}
+
+\item{idvar}{column name of \code{data} with the bubble}
+
+\item{xvar}{column name of a numerical vector in \code{data} to be plotted
+on the x-axis.}
+
+\item{yvar}{column name of a numerical vector in \code{data} to be plotted
+on the y-axis.}
+
+\item{colorvar}{column name of data that identifies bubbles in the same
+series. Use the same value to identify all bubbles that belong to the same
+series; bubbles in the same series will be assigned the same color. Series
+can be configured using the \code{series} option.}
+
+\item{sizevar}{values in this column are mapped to actual pixel values using
+the \code{sizeAxis} option.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}.}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisBubbleChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page.
+}
+\details{
+A bubble chart is used to visualize a data set with 2 to 4 dimensions. The
+first two dimensions are visualized as coordinates, the 3rd as color and the
+4th as size.
+
+The bubble chart is rendered within the browser using SVG or VML and
+displays tips when hovering over points.
+}
+\examples{
+
+
+bubble1 <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses")
+plot(bubble1)
+
+## Set color and size
+bubble2 <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses",
+                          colorvar="Location", sizevar="Profit",
+                          options=list(hAxis='{minValue:75, maxValue:125}'))
+
+plot(bubble2)
+
+## Use year to color the bubbles
+bubble3 <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses",
+                           colorvar="Year", sizevar="Profit",
+                           options=list(hAxis='{minValue:75, maxValue:125}'))
+plot(bubble3)
+
+## Gradient colour example
+bubble4 <- gvisBubbleChart(Fruits, idvar="Fruit", xvar="Sales", yvar="Expenses",
+                          sizevar="Profit",
+                          options=list(hAxis='{minValue:75,  maxValue:125}', 
+                                  colorAxis="{colors: ['lightblue', 'blue']}"))
+plot(bubble4)
+
+\dontrun{
+## Moving bubble chart over time, aka motion chart
+
+M <- gvisMotionChart(Fruits, Fruit, Year)
+plot(M)
+}
+
+
+
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{gvisMotionChart}} for a moving bubble chart
+over time, and \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods.
+}
+\keyword{iplot}
+
diff --git a/man/gvisCalendar.Rd b/man/gvisCalendar.Rd
new file mode 100644
index 0000000..34859db
--- /dev/null
+++ b/man/gvisCalendar.Rd
@@ -0,0 +1,105 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCalendar.R
+\name{gvisCalendar}
+\alias{gvisCalendar}
+\title{Google Calendar Chart with R
+\Sexpr{googleChartName <- "Calendar"}
+\Sexpr{gvisChartName <- "gvisCalendar"}}
+\usage{
+gvisCalendar(data, datevar = "", numvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least two columns,
+one with date information (\code{datevar}) and one numerical variable.}
+
+\item{datevar}{column name of \code{data} which shows the date dimension.
+The information has to be of class \code{\link{Date}} or \code{POSIX*} time
+series.}
+
+\item{numvar}{column name of \code{data} which shows the values to be
+displayed against \code{datevar}. The information has to be
+\code{\link{numeric}}.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}.}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+A calendar chart is a visualization used to show activity over the course 
+of a long span of time, such as months or years. They're best used when 
+you want to illustrate how some quantity varies depending on the day of 
+the week, or how it trends over time.
+}
+\section{Warning}{
+
+The calendar chart may be undergoing substantial revisions in future 
+Google Charts releases.
+}
+\examples{
+cl1 <- gvisCalendar(Cairo, datevar="Date", numvar="Temp")
+plot(cl1)
+
+## Not all months shown? 
+## We can change the setting of the width ...
+
+cl2 <- gvisCalendar(Cairo, datevar="Date", numvar="Temp",
+                    options=list(width=1000))
+plot(cl2)
+
+## ... or the cell size
+cl3 <- gvisCalendar(Cairo, datevar="Date", 
+                    numvar="Temp", 
+                    options=list(calendar="{ cellSize: 10 }"))
+plot(cl3)
+
+## Example with many options set
+cl4 <- gvisCalendar(Cairo, datevar="Date", numvar="Temp",
+                    options=list(
+                    title="Daily temperature in Cairo",
+                    height=320,
+                    calendar="{yearLabel: { fontName: 'Times-Roman',
+                               fontSize: 32, color: '#1A8763', bold: true},
+                               cellSize: 10,
+                               cellColor: { stroke: 'red', strokeOpacity: 0.2 },
+                               focusedCellColor: {stroke:'red'}}")
+                  )
+plot(cl4)
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+plotting methods.
+}
+\keyword{iplot}
+
diff --git a/man/gvisCandlestickChart.Rd b/man/gvisCandlestickChart.Rd
new file mode 100644
index 0000000..e6a3878
--- /dev/null
+++ b/man/gvisCandlestickChart.Rd
@@ -0,0 +1,108 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCoreCharts.R
+\name{gvisCandlestickChart}
+\alias{gvisCandlestickChart}
+\title{Google Candlestick chart with R
+\Sexpr{googleChartName <- "candlestickchart"}
+\Sexpr{gvisChartName <- "gvisCandlestickChart"}}
+\usage{
+gvisCandlestickChart(data, xvar = "", low = "", open = "", close = "",
+  high = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a candlestick
+chart. The data has to have at least 5 columns.}
+
+\item{xvar}{name of the character column which contains the category labels
+for the x-axes.}
+
+\item{low}{name of the numeric column specifying the low/minimum value of
+this marker. This is the base of the candle's center line.}
+
+\item{open}{name of the numeric column specifying the opening/initial value
+of this marker. This is one vertical border of the candle. If less than the
+\code{close} value, the candle will be filled; otherwise it will be hollow.}
+
+\item{close}{name of the numeric column specifying the closing/final value
+of this marker. This is the second vertical border of the candle. If less
+than the \code{open} value, the candle will be hollow; otherwise it will be
+filled.}
+
+\item{high}{name of the numeric column specifying the high/maximum value of
+this marker. This is the top of the candle's center line.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+An interactive candlestick chart.
+}
+\details{
+The gvisCandlestickChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser using SVG or VML.
+
+A candlestick chart is used to show an opening and closing value overlaid on
+top of a total variance. Candlestick charts are often used to show stock
+value behavior. In this chart, items where the opening value is less than
+the closing value (a gain) are drawn as filled boxes, and items where the
+opening value is more than the closing value (a loss) are drawn as hollow
+boxes.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+## Example data set
+OpenClose
+
+C1 <- gvisCandlestickChart(OpenClose, xvar="Weekday", low="Low",
+                                      open="Open", close="Close",
+                                      high="High",
+                                      options=list(legend='none'))
+
+plot(C1)
+
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisColumnChart.Rd b/man/gvisColumnChart.Rd
new file mode 100644
index 0000000..78fe3e0
--- /dev/null
+++ b/man/gvisColumnChart.Rd
@@ -0,0 +1,100 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCoreCharts.R
+\name{gvisColumnChart}
+\alias{gvisColumnChart}
+\title{Google Column Chart with R
+\Sexpr{googleChartName <- "columnchart"}
+\Sexpr{gvisChartName <- "gvisColumnChart"}}
+\usage{
+gvisColumnChart(data, xvar = "", yvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a column chart}
+
+\item{xvar}{name of the character column which contains the category labels
+for the x-axes.}
+
+\item{yvar}{a vector of column names of the numerical variables to be
+plotted.  Each column is displayed as a separate bar/column.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisColumnChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser using SVG or VML.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+
+## Column chart
+Col1 <- gvisColumnChart(df, xvar="country", yvar=c("val1", "val2"))
+plot(Col1)
+
+## Stacked column chart
+Col2 <- gvisColumnChart(df, xvar="country", yvar=c("val1", "val2"),
+     options=list(isStacked=TRUE))
+plot(Col2)
+
+
+## Add a customised title and and change width of columns
+Col3 <- gvisColumnChart(df, xvar="country", yvar=c("val1", "val2"),
+             options=list(title="Hello World",
+                          titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}",
+                          bar="{groupWidth:'100\%'}"))
+plot(Col3)
+
+\dontrun{
+## Change y-axis to percentages
+Col4 <- gvisColumnChart(df, xvar="country", yvar=c("val1", "val2"),
+                       options=list(vAxis="{format:'#,###\%'}"))
+plot(Col4)
+}
+
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisComboChart.Rd b/man/gvisComboChart.Rd
new file mode 100644
index 0000000..fad0b57
--- /dev/null
+++ b/man/gvisComboChart.Rd
@@ -0,0 +1,100 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCoreCharts.R
+\name{gvisComboChart}
+\alias{gvisComboChart}
+\title{Google Combo Chart with R
+\Sexpr{googleChartName <- "combochart"}
+\Sexpr{gvisChartName <- "gvisComboChart"}}
+\usage{
+gvisComboChart(data, xvar = "", yvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a columns, line
+and area chart.}
+
+\item{xvar}{name of the character column which contains the category labels
+for the x-axes.}
+
+\item{yvar}{a vector of column names of the numerical variables to be
+plotted.  Each column is displayed as a separate column, line or area
+series.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+A chart that lets you render each series as a different marker type from the
+following list: columns, lines, and area lines.
+}
+\details{
+The gvisComboChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser using SVG or VML.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+CityPopularity
+## Add the mean
+CityPopularity$Mean=mean(CityPopularity$Popularity)
+
+C1 <- gvisComboChart(CityPopularity, xvar="City",
+                                     yvar=c("Mean", "Popularity"),
+                                   options=list(seriesType="bars",
+                                                title="City Popularity",
+                                                series='{0: {type:"line"}}'))
+plot(C1)
+
+## Changing the width of columsn
+C2 <- gvisComboChart(CityPopularity, xvar="City",
+                                     yvar=c("Mean", "Popularity"),
+                                   options=list(seriesType="bars",
+                                                bar="{groupWidth:'100\%'}",
+                                                title="City Popularity",
+                                                series='{0: {type:"line"}}'))
+plot(C2)
+
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisGauge.Rd b/man/gvisGauge.Rd
new file mode 100644
index 0000000..04239b2
--- /dev/null
+++ b/man/gvisGauge.Rd
@@ -0,0 +1,79 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisPieGaugeChart.R
+\name{gvisGauge}
+\alias{gvisGauge}
+\title{Google Gauge with R
+\Sexpr{googleChartName <- "gauge"}
+\Sexpr{gvisChartName <- "gvisGauge"}}
+\usage{
+gvisGauge(data, labelvar = "", numvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a gauge}
+
+\item{labelvar}{name of the character column which contains the category
+labels for the slice labels.}
+
+\item{numvar}{a vector of column names of the numerical variables of the
+slice values.}
+
+\item{options}{list of configuration options, see: 
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisGauge function reads a data.frame and creates text output referring
+to the Google Visualisation API, which can be included into a web page, or
+as a stand-alone page. The actual chart is rendered by the web browser using
+SVG or VML.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+Gauge1 <- gvisGauge(CityPopularity, options=list(min=0, max=800, greenFrom=500,
+                    greenTo=800, yellowFrom=300, yellowTo=500,
+                    redFrom=0, redTo=300))
+
+plot(Gauge1)
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisGeoChart.Rd b/man/gvisGeoChart.Rd
new file mode 100644
index 0000000..b5a73e9
--- /dev/null
+++ b/man/gvisGeoChart.Rd
@@ -0,0 +1,207 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisGeoChart.R
+\name{gvisGeoChart}
+\alias{gvisGeoChart}
+\title{Google Geo Chart with R
+\Sexpr{googleChartName <- "geochart"}
+\Sexpr{gvisChartName <- "gvisGeoChart"}}
+\usage{
+gvisGeoChart(data, locationvar = "", colorvar = "", sizevar = "",
+  hovervar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least one column
+with location name (\code{locationvar}), value to be mapped to location. The
+format of the data varies depending on which display mode that you use:
+Regions or Markers.}
+
+\item{locationvar}{column name of \code{data} with the geo locations to be
+analysed. The locations can be provide in two formats: \describe{
+\item{Format 1}{'latitude:longitude'. See the example below.} \item{Format
+2}{Address, country name, region name locations, or US metropolitan area
+codes, see
+\url{http://code.google.com/apis/adwords/docs/developer/adwords_api_us_metros.html}.
+This format works with the \code{dataMode} option set to either 'markers' or
+'regions'. The following formats are accepted: A specific address (for
+example, "1600 Pennsylvania Ave"). A country name as a string (for example,
+"England"), or an uppercase ISO-3166 code or its English text equivalent
+(for example, "GB" or "United Kingdom").  An uppercase ISO-3166-2 region
+code name or its English text equivalent (for example, "US-NJ" or "New
+Jersey").  } }}
+
+\item{colorvar}{column name of \code{data} with the optional numeric column
+used to assign a color to this marker, based on the scale specified in the
+\code{colorAxis.colors} property. If this column is not present, all markers
+will be the same color. If the column is present, null values are not
+allowed. Values are scaled relative to each other, or absolutely to values
+specified in the \code{colorAxis.values} property.}
+
+\item{sizevar}{only used for \code{displayMode='markers'}. Column name of
+\code{data} with the optional numeric column used to assign the marker size,
+relative to the other marker sizes. If this column is not present, the value
+from the previous column will be used (or default `size, if no color column
+is provided as well). If the column is present, null valuesare not allowed.}
+
+\item{hovervar}{column name of \code{data} with the additional string text
+displayed when the user hovers over this region.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisGeoChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page.
+}
+\details{
+A geo chart is a map of a country, a continent, or a region with two modes:
+The region mode colorizes whole regions, such as countries, provinces, or
+states. The marker mode marks designated regions using bubbles that are
+scaled according to a value that you specify.
+
+A geo chart is rendered within the browser using SVG or VML. Note that the
+map is not scrollable or draggable.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Internet
+## connection to display the visualisation.
+
+## Regions examples
+## The regions style fills entire regions (typically countries) with
+## colors corresponding to the values that you assign
+
+G1a <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit') 
+
+plot(G1a)
+
+## Change projection
+G1b <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit',
+                   options=list(projection="kavrayskiy-vii")) 
+
+plot(G1b)
+
+## Plot only Europe
+G2 <- gvisGeoChart(Exports, "Country", "Profit",
+                   options=list(region="150"))
+
+plot(G2)
+
+
+## Example showing US data by state 
+require(datasets)
+
+states <- data.frame(state.name, state.x77)
+G3 <- gvisGeoChart(states, "state.name", "Illiteracy",
+                 options=list(region="US", displayMode="regions", 
+                              resolution="provinces",
+   	 width=600, height=400))
+plot(G3)
+
+## Markers Example
+## A marker style map renders bubble-shaped markers at specified
+## locations with the color and size that you specify.
+
+G4 <- gvisGeoChart(CityPopularity, locationvar='City', colorvar='Popularity',
+                      options=list(region='US', height=350, 
+                                   displayMode='markers',
+				   colorAxis="{values:[200,400,600,800],
+                                   colors:[\\'red', \\'pink\\', \\'orange',\\'green']}")
+                      ) 
+plot(G4)
+
+G5 <- gvisGeoChart(Andrew, "LatLong", colorvar='Speed_kt',
+                   options=list(region="US"))
+plot(G5)
+
+
+G6 <- gvisGeoChart(Andrew, "LatLong", sizevar='Speed_kt',
+                   colorvar="Pressure_mb", options=list(region="US"))
+plot(G6)
+
+## Create lat:long values and plot a map of Oceania
+## Set background colour to light-blue
+
+require(stats)
+data(quakes)
+head(quakes)
+quakes$latlong<-paste(quakes$lat, quakes$long, sep=":")
+
+G7 <- gvisGeoChart(quakes, "latlong", "depth", "mag",
+                   options=list(displayMode="Markers", region="009",
+                   colorAxis="{colors:['red', 'grey']}",
+                   backgroundColor="lightblue"))
+
+plot(G7)
+
+\dontrun{
+# Plot S&P countries' credit rating sourced from Wikipedia
+# Use the hovervar to show the rating
+library(XML)
+url <- "http://en.wikipedia.org/wiki/List_of_countries_by_credit_rating"
+x <- readHTMLTable(readLines(url), which=3)
+levels(x$Rating) <- substring(levels(x$Rating), 4, 
+                              nchar(levels(x$Rating)))
+x$Ranking <- x$Rating
+levels(x$Ranking) <- nlevels(x$Rating):1
+x$Ranking <- as.character(x$Ranking)
+x$Rating <- paste(x$Country, x$Rating, sep=": ")
+#### Create a geo chart
+G8 <- gvisGeoChart(x, "Country", "Ranking", hovervar="Rating",
+                options=list(gvis.editor="S&P", 
+                             colorAxis="{colors:['#91BFDB', '#FC8D59']}"))
+plot(G8)
+
+
+## Plot world wide earth quakes of the last 30 days with magnitude >= 4.0 
+library(XML)
+## Get earthquake data of the last 30 days
+eq <- read.csv("http://earthquake.usgs.gov/earthquakes/feed/v0.1/summary/2.5_week.csv")
+eq$loc=paste(eq$Latitude, eq$Longitude, sep=":")
+
+G9 <- gvisGeoChart(eq, "loc", "Depth", "Magnitude",
+                   options=list(displayMode="Markers", 
+                   colorAxis="{colors:['purple', 'red', 'orange', 'grey']}",
+                   backgroundColor="lightblue"), chartid="EQ")
+plot(G9)
+}
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com}, 
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} 
+for printing and plotting methods.
+}
+\keyword{iplot}
+
diff --git a/man/gvisGeoMap.Rd b/man/gvisGeoMap.Rd
new file mode 100644
index 0000000..ef2e8be
--- /dev/null
+++ b/man/gvisGeoMap.Rd
@@ -0,0 +1,156 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisGeoMap.R
+\name{gvisGeoMap}
+\alias{gvisGeoMap}
+\title{Google Geo Map with R 
+\Sexpr{googleChartName <- "geomap"}
+\Sexpr{gvisChartName <- "gvisGeoMap"}}
+\usage{
+gvisGeoMap(data, locationvar = "", numvar = "", hovervar = "",
+  options = list(), chartid)
+}
+\arguments{
+\item{data}{\code{data.frame}. The data has to have at least two
+columns with location name (\code{locationvar}), value to be mapped
+to location (\code{numvar}) and an optional variable to display any
+text while the mouse hovers over the location (\code{hovervar}).}
+
+\item{locationvar}{column name of \code{data} with the geo locations to be
+analysed. The locations can be provide in two formats:
+
+\describe{      
+\item{Format 1}{'latitude:longitude'. See the example below.}
+\item{Format 2}{Address, country name, region name locations, or
+US metropolitan area codes, see
+\url{http://code.google.com/apis/adwords/docs/developer/adwords_api_us_metros.html}. 
+This format works with the \code{dataMode} option set to either
+'markers' or 'regions'. The following formats are accepted: 
+A specific address (for example, "1600 Pennsylvania Ave"). 
+A country name as a string (for example, "England"), or an uppercase ISO-3166 code
+ or its English text equivalent (for example, "GB" or "United Kingdom").
+  An uppercase ISO-3166-2 region code name or its English text
+   equivalent (for example, "US-NJ" or "New Jersey"). 
+   }
+ }}
+
+\item{numvar}{column name of \code{data} with the numeric value
+displayed when the user hovers over this region.}
+
+\item{hovervar}{column name of \code{data} with the additional string
+text displayed when the user hovers over this region.}
+
+\item{options}{list of configuration options.
+The options are documented in detail by Google online:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisGeoMap function reads a data.frame and
+creates text output referring to the Google Visualisation API, which can be
+included into a web page, or as a stand-alone page.
+
+A geo map is a map of a country, continent, or region map, with colours
+and values assigned to specific regions. Values are displayed as a colour
+scale, and you can specify optional hover-text for regions. The map is
+rendered in the browser. Note that the
+map is not scroll-able or drag-gable, but can be configured to allow
+zooming.
+}
+\section{Warnings}{
+
+GeoMap (gvisGeoMap) is Flash based, conisder using GeoChart (gvisGeoChart) instead.
+For more details visit: goo.gl/tkiEV8
+
+Because of Flash security settings the chart 
+might not work correctly when accessed from a file location in the 
+browser (e.g., file:///c:/webhost/myhost/myviz.html) rather than 
+from a web server URL (e.g. http://www.myhost.com/myviz.html). 
+See the googleVis package vignette and the Macromedia web 
+site (\url{http://www.macromedia.com/support/documentation/en/flashplayer/help/}) 
+for more details.
+}
+\examples{
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Internet
+## connection to display the visualisation.
+
+## Regions Example
+## The regions style fills entire regions (typically countries) with colors
+## corresponding to the values that you assign. Specify the regions style
+## by assigning options['dataMode'] = 'regions' in your code.
+
+G1 <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+                 options=list(dataMode="regions")) 
+
+plot(G1)
+
+## Markers Example
+## The "markers" style displays a circle, sized and colored to indicate
+## a value, over the regions that you specify. 
+G2 <- gvisGeoMap(CityPopularity, locationvar='City', numvar='Popularity',
+                 options=list(region='US', height=350, 
+                              dataMode='markers',
+                              colors='[0xFF8747, 0xFFB581, 0xc06000]'))  
+
+plot(G2) 
+
+## Example showing US data by state 
+
+require(datasets)
+states <- data.frame(state.name, state.x77)
+
+G3 <- gvisGeoMap(states, "state.name", "Illiteracy",
+                 options=list(region="US", dataMode="regions",
+                              width=600, height=400))
+plot(G3) 
+
+## Example with latitude and longitude information
+## Show Hurricane Andrew (1992) storm track
+G4 <- gvisGeoMap(Andrew, locationvar="LatLong", numvar="Speed_kt", 
+                 hovervar="Category", 
+                 options=list(height=350, region="US", dataMode="markers"))
+
+plot(G4) 
+
+## World population
+WorldPopulation=data.frame(Country=Population$Country, 
+                           Population.in.millions=round(Population$Population/1e6,0),
+                           Rank=paste(Population$Country, "Rank:", Population$Rank))
+
+G5 <- gvisGeoMap(WorldPopulation, "Country", "Population.in.millions", "Rank", 
+                 options=list(dataMode="regions", width=600, height=300))
+plot(G5)
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com}, 
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\keyword{iplot}
+
diff --git a/man/gvisHistogram.Rd b/man/gvisHistogram.Rd
new file mode 100644
index 0000000..cf0aeeb
--- /dev/null
+++ b/man/gvisHistogram.Rd
@@ -0,0 +1,90 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisHistogram.R
+\name{gvisHistogram}
+\alias{gvisHistogram}
+\title{Google Histogram Chart with R
+\Sexpr{googleChartName <- "histogram"}
+\Sexpr{gvisChartName <- "gvisHistogram"}}
+\usage{
+gvisHistogram(data, options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a histogram. 
+Each column will be displayed as a histogram.}
+
+\item{options}{list of configuration options, see
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}.}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisHistogram function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser using SVG or VML.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+
+hist1 <- gvisHistogram(dino)
+plot(hist1)
+
+## Histogram of the top 20 countries
+pop <- Population[1:20,c("Country", "Population")]
+pop=transform(pop, Population=round(Population/1e6))
+
+hist2 <- gvisHistogram(pop, option=list(title="Country Populations",
+                                    legend="{ position: 'none' }",
+                                    colors="['green']"))
+plot(hist2)
+                                    
+set.seed(123)
+dat=data.frame(A=rpois(100, 20), 
+               B=rpois(100, 5), 
+               C=rpois(100, 50))
+hist3 <- gvisHistogram(dat, options=list(
+                       legend="{ position: 'top', maxLines: 2 }",
+                       colors="['#5C3292', '#1A8763', '#871B47']"))
+
+plot(hist3)
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisIntensityMap.Rd b/man/gvisIntensityMap.Rd
new file mode 100644
index 0000000..cc6ee3d
--- /dev/null
+++ b/man/gvisIntensityMap.Rd
@@ -0,0 +1,95 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisIntensityMap.R
+\name{gvisIntensityMap}
+\alias{gvisIntensityMap}
+\title{Google Intensity Map with R
+\Sexpr{googleChartName <- "intensitymap"}
+\Sexpr{gvisChartName <- "gvisIntensityMap"}}
+\usage{
+gvisIntensityMap(data, locationvar = "", numvar = "", options = list(),
+  chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least two columns
+with location name (\code{locationvar}) and any number of numeric columns
+(\code{numvar}) to be mapped.}
+
+\item{locationvar}{column name of \code{data} with the geo locations to be
+analysed. The location has to contain country ISO codes or USA state codes.}
+
+\item{numvar}{column names of \code{data} with the numeric values to be
+displayed.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+An intensity map highlights regions or countries based on relative values.
+}
+\details{
+The gvisIntensityMap function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page.
+}
+\section{Note}{
+
+Please note that the maximum height for this visualisation is 220 and 
+the maximum width is 440. For more details see the Google documentation.
+
+% END DYNAMIC CONTENT
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Internet
+## connection to display the visualisation.
+
+df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+Intensity1 <- gvisIntensityMap(df, locationvar="country", numvar=c("val1", "val2"))
+plot(Intensity1)
+
+## Set colours for each tab
+Intensity2 <- gvisIntensityMap(df,
+              options=list(colors="['#4682b4', '#0073CF']"))
+plot(Intensity2)
+
+
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+plotting methods, \code{\link{gvisMap}} and \code{\link{gvisGeoMap}} for an
+alternative to \code{gvisIntensityMap}.
+}
+\keyword{iplot}
+
diff --git a/man/gvisLineChart.Rd b/man/gvisLineChart.Rd
new file mode 100644
index 0000000..dd35951
--- /dev/null
+++ b/man/gvisLineChart.Rd
@@ -0,0 +1,119 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCoreCharts.R
+\name{gvisLineChart}
+\alias{gvisLineChart}
+\title{Google Line Chart with R
+\Sexpr{googleChartName <- "linechart"}
+\Sexpr{gvisChartName <- "gvisLineChart"}}
+\usage{
+gvisLineChart(data, xvar = "", yvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a line chart}
+
+\item{xvar}{name of the character column which contains the category labels
+for the x-axes.}
+
+\item{yvar}{a vector of column names of the numerical variables to be
+plotted. Each column is displayed as a separate line.}
+
+\item{options}{list of configuration options, see
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisLineChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser using SVG or VML.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+df <- data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+
+## Line chart
+Line1 <- gvisLineChart(df, xvar="country", yvar=c("val1", "val2"))
+plot(Line1)
+
+
+## Add a customised title and smoothed curve
+Line2 <- gvisLineChart(df, xvar="country", yvar=c("val1", "val2"),
+             options=list(title="Hello World",
+                          titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}",
+                          curveType='function'))
+plot(Line2)
+
+\dontrun{
+## Change y-axis to percentages
+Line3 <- gvisLineChart(df, xvar="country", yvar=c("val1", "val2"),
+                       options=list(vAxis="{format:'#,###\%'}"))
+plot(Line3)
+
+}
+
+## Create a chart with two y-axis:
+Line4 <-  gvisLineChart(df, "country", c("val1","val2"),
+                        options=list(series="[{targetAxisIndex: 0},
+                                              {targetAxisIndex:1}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]"
+                          ))
+plot(Line4)
+
+## Line chart with edit button
+Line5 <- gvisLineChart(df, xvar="country", yvar=c("val1", "val2"),
+                       options=list(gvis.editor="Edit me!"))
+plot(Line5)
+
+## Customizing lines 
+Dashed <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+             options=list(
+             series="[{color:'green', targetAxisIndex: 0, 
+                       lineWidth: 1, lineDashStyle: [2, 2, 20, 2, 20, 2]}, 
+                      {color: 'blue',targetAxisIndex: 1, 
+                       lineWidth: 2, lineDashStyle: [4, 1]}]",
+                       vAxes="[{title:'val1'}, {title:'val2'}]"
+                       ))
+plot(Dashed)
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisMap.Rd b/man/gvisMap.Rd
new file mode 100644
index 0000000..f7572c7
--- /dev/null
+++ b/man/gvisMap.Rd
@@ -0,0 +1,120 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisMap.R
+\name{gvisMap}
+\alias{gvisMap}
+\title{Google Maps with R
+\Sexpr{googleChartName <- "map"}
+\Sexpr{gvisChartName <- "gvisMap"}}
+\usage{
+gvisMap(data, locationvar = "", tipvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least two columns
+with location name (\code{locationvar}) and the variable to display the text
+in the tip icon (\code{tipvar}).}
+
+\item{locationvar}{column name of \code{data} with the geo locations to be
+analysed. The locations can be provide in two formats: \describe{
+\item{Format 1}{'latitude:longitude'. See the example below.} \item{Format
+2}{The first column should be a string that contains an address. This
+address should be as complete as you can make it.  } }}
+
+\item{tipvar}{column name of \code{data} with the string text displayed over
+the tip icon.}
+
+\item{options}{list of configuration options for Google Map.
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisMap function reads a data.frame and creates text output referring to
+the Google Visualisation API, which can be included into a web page, or as a
+stand-alone page.
+}
+\details{
+The maps are the well known Google Maps.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Internet
+## connection to display the visualisation.
+  
+## Example with latitude and longitude information
+## Plot Hurricane Andrew (1992) storm path:
+
+data(Andrew)
+
+M1 <- gvisMap(Andrew, "LatLong" , "Tip",
+              options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE,
+                           mapType='hybrid', useMapTypeControl=TRUE,
+                           width=800,height=400))
+
+plot(M1) 
+
+
+## Example with address, here UK post-code and some html code in tooltip
+
+df <- data.frame(Postcode=c("EC3M 7HA", "EC2P 2EJ"),
+                 Tip=c("<a href='http://www.lloyds.com'>Lloyd's</a>", 
+                 "<a href='http://www.guildhall.cityoflondon.gov.uk/'>Guildhall</a>"))
+ 
+M2 <- gvisMap(df, "Postcode", "Tip",
+              options=list(showTip=TRUE, mapType='normal',
+              enableScrollWheel=TRUE))
+ 
+plot(M2)
+
+## Change mapping icons
+M3 <- gvisMap(df, "Postcode", "Tip",
+              options=list(showTip=TRUE, mapType='normal',
+              enableScrollWheel=TRUE,
+              icons=paste0("{",
+              "'default': {'normal': 'http://icons.iconarchive.com/",
+              "icons/icons-land/vista-map-markers/48/",
+              "Map-Marker-Ball-Azure-icon.png',\\n",
+              "'selected': 'http://icons.iconarchive.com/",
+              "icons/icons-land/vista-map-markers/48/",
+              "Map-Marker-Ball-Right-Azure-icon.png'",
+              "}}")))
+                        
+plot(M3)
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+plotting methods, \code{\link{gvisGeoMap}} and
+\code{\link{gvisIntensityMap}} for an alternative to \code{gvisMap}.
+}
+\keyword{iplot}
+
diff --git a/man/gvisMerge.Rd b/man/gvisMerge.Rd
new file mode 100644
index 0000000..e99d78e
--- /dev/null
+++ b/man/gvisMerge.Rd
@@ -0,0 +1,150 @@
+\name{gvisMerge}
+\alias{gvisMerge}
+\title{
+  Merge two googleVis charts into one gvis-object 
+}
+\description{
+  gvisMerge merges two gvis-objects, either next or below
+  each other into one gvis-object. The objects are arranged in a HTML table. 
+}
+\usage{
+gvisMerge(x, y, horizontal = FALSE,
+                tableOptions = "border=\"0\"", chartid)
+}
+\arguments{
+  \item{x}{a \code{gvis}-object.  
+  }
+  \item{y}{a \code{gvis}-object.
+  }
+  \item{horizontal}{boolean. Default \code{FALSE}. If \code{FALSE} the
+    two \code{gvis}-objects are arranged below each other, otherwise
+    next to each other.
+  }
+  \item{tableOptions}{a valid HTML table option string. Default \code{"border=\"0\""}. 
+  }
+  \item{chartid}{character. If missing (default) a random chart id will be generated based on
+    chart type and \code{\link{tempfile}}
+  }
+}
+%\details{
+%%  ~~ If necessary, more details than the description above ~~
+%}
+\value{
+  \code{gvisMerge} returns list of \code{\link{class}} "\code{gvis}" and "\code{list}". 
+  
+  An object of class "\code{gvis}" is a list containing at least the following components:
+  \item{\code{type}}{Google visualisation type, here 'gvisMerge'}
+  \item{\code{chartid}}{character id of the chart object. Unique chart
+    ids are required to place several charts on the same page.
+  }
+  \item{\code{html}}{a list with the building blocks for a page
+    \describe{
+      \item{\code{header}}{a character string of a html page header:
+	\code{<html>...<body>},}
+      \item{\code{chart}}{a named character vector of the chart's building blocks:
+      	\describe{
+	  \item{\code{jsHeader}}{Opening \code{<script>} tag and
+	    reference to Google's JavaScript library.
+	  }
+	  \item{\code{jsData}}{JavaScript function defining the input
+	    \code{data} as a JSON object.
+	  } 
+	  \item{\code{jsDrawChart}}{JavaScript function
+	    combing the data with the visualisation API and user
+	    options.
+	  }
+	  \item{\code{jsDisplayChart}}{JavaScript function calling the
+	    handler to display the chart.
+	  }
+	  \item{\code{jsFooter}}{End tag \code{</script>}.
+	  }
+	  \item{\code{jsChart}}{Call of the \code{jsDisplayChart} 
+	    function.
+	  }
+	  \item{\code{divChart}}{\code{<div>} container to embed the chart
+	    into the page.
+	  }
+	}   
+      }
+      \item{\code{caption}}{character string of a standard caption,
+	including data name and chart id.
+      }	
+      \item{\code{footer}}{character string of a html page footer:
+	\code{</body>...</html>}, including the used R and googleVis version
+	and link to Google's Terms of Use.}
+    }
+  }
+}
+\references{
+  Google Chart Tools API: \url{https://developers.google.com/chart/}
+
+  Follow the link for Google's data policy.
+}
+\author{
+  Markus Gesmann \email{markus.gesmann at gmail.com},
+}
+%%\note{
+%%  ~~further notes~~
+%%}
+
+\seealso{
+  See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+  printing and plotting methods
+}
+\examples{
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Internet
+## connection to display the visualisation.
+
+Pie1 <- gvisPieChart(CityPopularity)
+
+## Doughnut chart - a pie with a hole
+Pie2 <- gvisPieChart(CityPopularity, options=list(
+  slices="{4: {offset: 0.2}, 0: {offset: 0.3}}",
+  title='City popularity',
+  legend='none',
+  pieSliceText='label',
+  pieHole=0.5))
+
+plot(gvisMerge(Pie2, Pie1, 
+        tableOptions = "cellspacing=\"20\" bgcolor=\"#AABBCC\"",
+        horizontal=TRUE))
+               
+## Nested charts               
+               
+G <- gvisGeoChart(Exports, "Country", "Profit", 
+                  options=list(width=250, height=100))
+T <- gvisTable(Exports, 
+                  options=list(width=250, height=300))
+
+GT <- gvisMerge(G,T, horizontal=FALSE) 
+plot(GT)
+
+M <- gvisMotionChart(Fruits, "Fruit", "Year",
+                     options=list(width=400, height=410))
+
+GTM <- gvisMerge(GT, M, horizontal=TRUE,
+                     tableOptions="cellspacing=10")
+plot(GTM)
+
+
+line <- gvisLineChart(OpenClose, "Weekday", c("Open", "Close"), 
+        options=list(legend='none', width=300, height=150))
+column <- gvisColumnChart(OpenClose, "Weekday", c("Open", "Close"),
+              options=list(legend='none', width=300, height=150))
+area <- gvisAreaChart(OpenClose, "Weekday", c("Open", "Close"),
+              options=list(legend='none', width=300, height=150))
+bar <- gvisBarChart(OpenClose, "Weekday", c("Open", "Close"),
+              options=list(legend='none', width=300, height=150))
+LBCA <- gvisMerge(gvisMerge(line, bar), gvisMerge(column, area),
+                  horizontal=TRUE, tableOptions="bgcolor=\"#AABBCC\"") 
+
+plot(LBCA)
+
+## Applying gvisMerge successively
+
+p <- Reduce(gvisMerge, list(line, column, area, bar))
+plot(p)               
+
+}
+\keyword{ aplot }
diff --git a/man/gvisMethods.Rd b/man/gvisMethods.Rd
new file mode 100644
index 0000000..95b4744
--- /dev/null
+++ b/man/gvisMethods.Rd
@@ -0,0 +1,347 @@
+\name{gvis Methods}
+\alias{print.gvis}
+\alias{plot.gvis}
+
+\title{
+  Print and plot gvis objects
+}
+\description{
+  Methods to print and plot \code{gvis} objects
+}
+\usage{	
+\method{print}{gvis}(x, tag=NULL, file = "", ...)
+		
+\method{plot}{gvis}(x, tag=NULL,...)
+}
+\arguments{
+  \item{x}{
+    An object of class \code{gvis}, or a HTML file in case of
+    plot.gvis. 
+  }
+  \item{tag}{Default \code{NULL}. Name tag of the objects to be
+    extracted from a gvis object. If tag is missing 
+    then the values of \code{getOption("gvis.print.tag")},
+    \code{getOption("gvis.plot.tag")} will be used for \code{print.gvis}
+    and \code{plot.gvis} respectively.  
+
+    A complete list of available tags is given by the command
+    \code{getOption("gvis.tags")}. 
+
+    The default value of \code{gvis.print.tag} is \code{"html"}, which
+    means \code{print.gvis} will show a complete web page with the
+    visualisation, while the tag \code{"chart"} will present the code
+    for the visualisation chart only. For more information see the
+    details section.
+
+    The default tag for \code{plot.gvis.tag} is \code{NULL}, which will
+    result in R opening a browser window, while any tag which is not
+    \code{NULL} will give the same behaviour as \code{print.gvis},
+    e.g. \code{tag='chart'} or setting \code{options(gvis.plot.tag='chart')}
+    will produce the same output as \code{print(x, tag='chart')}.
+    This behaviour is particular helpful when googleVis is used in
+    scripts, like \code{knitr} or \code{R.rsp}. The plot commands can
+    be used initially in an interactive mode and with one change in
+    \code{options()} produce the HTML output required for a programmatic
+    run of the script. See the example section below for a
+    \code{knitr} case study.
+
+    \code{plot.gvis} ignores the argument \code{tag} it \code{x} is a
+    HTML file name.
+  }	
+  \item{file}{
+    file name. If "" (the
+    default), output will be printed to the standard output connection,
+    the console unless redirected by \code{\link{sink}}.
+  }
+  \item{\dots}{arguments passed on to \code{\link{cat}}
+      (\code{print.gvis}) or \code{\link{browseURL}} (\code{plot.gvis}).
+  }
+}
+
+\details{
+
+  An object of class "\code{gvis}" is a list containing at least the
+  following components (tags):
+  \describe{
+    \item{\code{type}}{Google visualisation type, e.g. 'MotionChart'}
+    \item{\code{chartid}}{character id of the chart object. Unique chart
+      ids are required to place several charts on the same page.
+    }
+  \item{\code{html}}{a list with the building blocks for a page
+    \describe{
+      \item{\code{header}}{a character string of a html page header:
+	\code{<html>...<body>},}
+      \item{\code{chart}}{a named character vector of the chart's building blocks:
+      	\describe{
+	  \item{\code{jsHeader}}{Opening \code{<script>} tag and
+	    reference to Google's JavaScript library.
+	  }
+	  \item{\code{jsData}}{JavaScript function defining the input
+	    \code{data} as a JSON object.
+	  } 
+	  \item{\code{jsDrawChart}}{JavaScript function
+	    combing the data with the visualisation API and user
+	    options.
+	  }
+	  \item{\code{jsDisplayChart}}{JavaScript function calling the
+	    handler to display the chart.
+	  }
+	  \item{\code{jsFooter}}{End tag \code{</script>}.
+	  }
+	  \item{\code{jsChart}}{Call of the \code{jsDisplayChart} 
+	    function.
+	  }
+	  \item{\code{divChart}}{\code{<div>} container to embed the chart
+	    into the page.
+	  }
+	}   
+      }
+      \item{\code{caption}}{character string of a standard caption,
+	including data name and chart id.
+      }	
+      \item{\code{footer}}{character string of a html page footer:
+	\code{</body>...</html>}, including the used R and googleVis version
+	and link to Google's Terms of Use.}
+    }
+  }
+}
+}
+
+\value{
+  \item{\code{print.gvis}}{ None (invisible \code{NULL}).}
+  
+  \item{\code{plot.gvis}}{Returns the file name invisibly.}
+}
+\references{
+  Please see also the package vignette for the usage of the googleVis
+  package with RApache, brew, knitr and R.rsp.
+}
+\author{
+  Markus Gesmann \email{markus.gesmann at gmail.com},
+  
+  Diego de Castillo \email{decastillo at gmail.com}
+}
+\note{
+  The \code{plot} command does not open a graphics device in the
+  traditional way. Instead it creates HTML files in a temporary
+  directory and uses the R HTTP server to display the output  
+  of a \code{googleVis} function locally. 
+  A browser with Flash and Internet connection is required.
+  The displayed page includes a link (click on the chart id) to a
+  further page, which shows the code of the chart for the user to copy
+  and paste into her own page.
+  
+%  googleVis will use the Viewer pane in RStudio (version >= 0.98.441) 
+%  to display non-Flash charts by default. Flash charts and merged 
+%  gvis-objects are displayed in the default browser. 
+%  The setting is controlled via the option \code{googleVis.viewer}. 
+%  By default it will have the value of \code{getOption("viewer")}.
+%  Set \code{options("googleVis.viewer"=NULL)} and the googleVis
+%  plot function will open all output in the standard browser again.
+}
+
+%% ~Make other sections like Warning with \section{Warning }{....} ~
+
+\seealso{
+  See also \code{\link{cat}}, \code{\link{browseURL}},
+  \code{\link{createGoogleGadget}} and \code{\link{gvisMerge}} for combining charts.
+}
+\examples{
+## Show gvis options
+sapply(c("gvis.print.tag", "gvis.plot.tag", "gvis.tags"), getOption)
+
+M <- gvisMotionChart(Fruits, "Fruit", "Year")
+str(M)
+## The output for a complete web page
+M
+
+## Access only the plot,
+M$html$chart
+
+## wrap it in cat and it becomes more readable,
+cat(unlist(M$html$chart))
+
+## or use the print function.
+print(M, tag="chart")
+
+## Extract the data as a JavaScript function.
+print(M, tag="jsData")
+
+## Display the visualisation.
+## A web browser with Internet connection and Flash is required.
+plot(M)
+
+## Combine with another chart, e.g. table
+#tbl <- gvisTable(Fruits, options=list(height=220))
+#Mtbl <- gvisMerge(M, tbl)
+#plot(Mtbl)
+
+
+## Example of using googleVis with knitr and markdown
+
+\dontrun{
+## Simple knitr/markdown file with googleVis
+knitrRmd <-"
+# Markdown example with knitr and googleVis
+===========================================
+This is a little Markdown example file.
+Set the googleVis options first.
+In this case change the behaviour of plot.gvis
+```{r setOptions, message=FALSE}
+library(googleVis)
+op <- options(gvis.plot.tag='chart')
+```
+The following plot statements will automatically return  the HTML
+required for the 'knitted' output. 
+
+## Combo chart
+```{r ComboExample, results='asis', tidy=FALSE}
+## Add the mean
+CityPopularity$Mean=mean(CityPopularity$Popularity)
+CC <- gvisComboChart(CityPopularity, xvar='City',
+          yvar=c('Mean', 'Popularity'),
+          options=list(seriesType='bars',
+                       width=450, height=300,
+                       title='City Popularity',
+                       series='{0: {type:\"line\"}}'))
+plot(CC)
+```
+Example of gvisComboChart with R code shown above.
+
+## Place two charts next to each other
+```{r gvisMergeExample, results='asis', echo=FALSE}
+Geo <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit', 
+                    options=list(height=300, width=350)) 
+Tbl <- gvisTable(Exports, options=list(height=300, width=200))
+plot(gvisMerge(Geo, Tbl, horizontal=TRUE))
+``````
+Example of a gvisGeoChart with gvisTable and R code hidden.
+
+## Motion Chart
+```{r MotionChartExample, results='asis', tidy=FALSE}
+M <- gvisMotionChart(Fruits, 'Fruit', 'Year',
+         options=list(width=400, height=350))
+plot(M)
+```
+Please note that the Motion Chart is only displayed when hosted on a
+web server, or is placed in a directory which has been added to the 
+trusted sources in the [security settings of Macromedia]
+(http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html). 
+See the googleVis package vignette for more details. 
+
+```{r resetOptions}
+## Set options back to original options
+options(op)
+```
+"
+
+## Write the content of knitrRmd into a Rmd-file, knit it and convert it
+## into a html output. Finally show the file with the R-help http
+## server, this will ensure that also the motion chart is visible.
+
+library(knitr)
+library(markdown)
+
+wd <- getwd()
+setwd(tempdir())
+fn=tempfile()
+fn.Rmd <- paste(fn, ".Rmd", sep="")
+fn.md <- paste(fn, ".md", sep="")
+fn.html <- paste(fn, "-out.html", sep="") 
+## Write R Markdown into a file
+cat(knitrRmd, file=fn.Rmd)
+render_markdown()
+knit(fn.Rmd, fn.md)
+knit2html(fn.md)
+
+## Open output in browser
+## Use plot.gvis which will use the R-help http server
+## The URL will start with http://127.0.0.1...
+## The HTML file will be copied into a temporary directory
+plot.gvis(fn.html)
+## Compare to browseURL, its URL will start with file://... the motion
+## chart is unlikely to be displayed because of Flash security
+## settings. See the googleVis vignette for more details. 
+browseURL(fn.html)
+setwd(wd)
+}
+
+\dontrun{
+## Updating the data of an existing googleVis web page
+
+## Suppose you have an existing web page in which you embedded a
+## motion chart with the id "mtnc".
+## Now you have a new set of data, but you would like to avoid
+## touching the html file again.
+## The idea is to write the data and JavaScript functions into separate
+## files and to refer to these in the html page.
+
+## In this example we call the chart id "mtnc"
+## To display the example we use the R HTTP server again, and
+## write the files into a temp directory
+
+myChartID <- "mtnc"
+## baseURL should reflect your web address, e.g. http://myHomePage.com
+baseURL <- sprintf("http://127.0.0.1:\%s/custom/googleVis", tools:::httpdPort)
+wwwdir <- tempdir() ## the www repository on your computer
+
+  
+## Create a motion chart
+M=gvisMotionChart(Fruits, "Fruit", "Year", chartid=myChartID)
+
+## Here is our plot again
+plot(M)
+
+## Write the data and functions into separate files:
+cat(M$html$chart['jsData'], file=file.path(wwwdir, "gvisData.js"))
+cat(M$html$chart[c('jsDrawChart', 'jsDisplayChart', 'jsChart')], 
+			    file=file.path(wwwdir, "gvisFunctions.js"))
+
+  
+## Create a html page with reference to the above
+## JavaScript files
+  
+html <- sprintf('
+<html>
+  <head>
+  <script type="text/javascript" src="http://www.google.com/jsapi">
+  </script>
+  <script type="text/javascript" src="\%s/gvisFunctions.js"></script>
+  <script type="text/javascript" src="\%s/gvisData.js"></script>
+  <script type="text/javascript">
+  displayChart\%s()
+  </script>
+  </head>
+  <body>
+  <div id="\%s" style="width: 600px; height: 500px;"></div>
+  </body>
+  </html>
+  ', baseURL, baseURL, myChartID, myChartID)
+  
+## Write html scaffold into a file
+cat(html, file=file.path(wwwdir, paste("Chart", myChartID, ".html", sep="")))
+
+## Display the result via
+URL <- paste(baseURL,"/Chart", myChartID, ".html", sep="")
+browseURL(URL)
+
+## Update the data, say the data should have shown North and South
+## instead of East and West as a location  
+FruitsUpdate <- Fruits
+levels(FruitsUpdate$Location)=c("North", "South")
+
+Mupdate=gvisMotionChart(FruitsUpdate, "Fruit", "Year", chartid=myChartID)
+
+## Only update the file gvisData.js:
+cat(Mupdate$html$chart['jsData'], file=file.path(wwwdir, "gvisData.js"))
+
+## Redisplay the chart with the updated data
+browseURL(URL)
+
+}
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ iplot }
+\keyword{ methods }
+\keyword{ print }
diff --git a/man/gvisMotionChart.Rd b/man/gvisMotionChart.Rd
new file mode 100644
index 0000000..296faa0
--- /dev/null
+++ b/man/gvisMotionChart.Rd
@@ -0,0 +1,189 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisMotionChart.R
+\name{gvisMotionChart}
+\alias{gvisMotionChart}
+\title{Google Motion Chart with R
+\Sexpr{googleChartName <- "motionchart"}
+\Sexpr{gvisChartName <- "gvisMotionChart"}}
+\usage{
+gvisMotionChart(data, idvar = "id", timevar = "time", xvar = "",
+  yvar = "", colorvar = "", sizevar = "", date.format = "\%Y/\%m/\%d",
+  options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least four
+columns with subject name (\code{idvar}), time (\code{timevar}) and
+two columns of numeric values. Further columns, numeric and
+character/factor are optional. The combination of \code{idvar} and
+\code{timevar} has to describe a unique row. The column names of the
+\code{idvar} and \code{timevar} have to be specified. Further
+columns, if not specified by the other arguments (\code{xvar, yvar,
+colorvar, sizevar}), will be assumed to be in the order of the 
+arguments.}
+
+\item{idvar}{column name of \code{data} with the subject to be 
+analysed.}
+
+\item{timevar}{column name of \code{data} which shows the time 
+dimension. The information has to be either numeric, of class 
+\code{\link{Date}} or a character which follows the pattern  
+'YYYYWww' (e.g. '2010W04' for weekly data) or 'YYYYQq' 
+(e.g. '2010Q1' for quarterly data).}
+
+\item{xvar}{column name of a numerical vector in \code{data} to be 
+plotted on the x-axis.}
+
+\item{yvar}{column name of a numerical vector in \code{data} to be 
+plotted on the y-axis.}
+
+\item{colorvar}{column name of data that identifies bubbles in the 
+same series. Use the same value to identify all bubbles that belong 
+to the same series; bubbles in the same series will be assigned the 
+same color. Series can be configured using the \code{series} option.}
+
+\item{sizevar}{values in this column are mapped to actual pixel 
+values using the \code{sizeAxis} option.}
+
+\item{date.format}{if \code{timevar} is of class \code{\link{Date}} 
+then this argument specifies how the dates are reformatted to be 
+used by JavaScript.}
+
+\item{options}{list of configuration options for Google Motion Chart.
+The options are documented in detail by Google online:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisMotionChart function reads a data.frame and
+creates text output referring to the Google Visualisation API, 
+which can be included into a web page, or as a stand-alone page. 
+The actual chart is rendered by the web browser in Flash.
+A motion chart is a dynamic chart to explore several indicators over 
+time.
+}
+\section{Warnings}{
+
+Because of Flash security settings the chart 
+might not work correctly when accessed from a file location in the 
+browser (e.g., file:///c:/webhost/myhost/myviz.html) rather than 
+from a web server URL (e.g. http://www.myhost.com/myviz.html). 
+See the googleVis package vignette and the Macromedia web 
+site (\url{http://www.macromedia.com/support/documentation/en/flashplayer/help/}) 
+for more details.
+}
+
+\section{Note}{
+
+Please note that a \code{timevar} with values less than 100 will 
+be shown as years 19xx.
+}
+\examples{
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Flash and Internet
+## connection to display the visualisation.
+M1 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
+plot(M1)
+
+\dontrun{
+## Usage of date variable
+M2 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Date",
+                      date.format = "\\\%Y\\\%m\\\%d") 
+                      plot(M2)
+                      
+## Display weekly data:
+M3 <- gvisMotionChart(Fruits, "Fruit", "Date", date.format="\\\%YW\\\%W")
+plot(M3) 
+}
+## Options: no side panel on the right
+M4 <- gvisMotionChart(Fruits,"Fruit", "Year",
+                      options=list(showSidePanel=FALSE))
+plot(M4)
+
+## Options: trails un-ticked
+M5 <- gvisMotionChart(Fruits, "Fruit", "Year",
+                      options=list(state='{"showTrails":false};'))
+                      
+plot(M5)
+
+## You can change some of displaying settings via the browser,
+## e.g. the level of opacity of non-selected items, or the chart type.
+## The state string from the 'Advanced' tab can be used to set those
+## settings via R. Just copy and past the string from the browser into
+## the argument state of the options list.
+## Here is an example of a motion chart, with an initial line chart
+## displayed. Ensure that you have a newline at the start and end of
+## your settings string.
+
+myStateSettings <-'
+{"xZoomedDataMin":1199145600000,"colorOption":"2",
+"duration":{"timeUnit":"Y","multiplier":1},"yLambda":1,
+"yAxisOption":"4","sizeOption":"_UNISIZE",
+"iconKeySettings":[],"xLambda":1,"nonSelectedAlpha":0,
+"xZoomedDataMax":1262304000000,"iconType":"LINE",
+"dimensions":{"iconDimensions":["dim0"]},
+"showTrails":false,"uniColorForNonSelected":false,
+"xAxisOption":"_TIME","orderedByX":false,"playDuration":15000,
+"xZoomedIn":false,"time":"2010","yZoomedDataMin":0,
+"yZoomedIn":false,"orderedByY":false,"yZoomedDataMax":100}
+'
+M6a <- gvisMotionChart(Fruits, "Fruit", "Year", 
+                       options=list(state=myStateSettings))
+plot(M6a)
+
+## Newline set explicitly
+myStateSettings <-'\\n{"iconType":"LINE"}\\n'
+M6b <- gvisMotionChart(Fruits, "Fruit", "Year", 
+                       options=list(state=myStateSettings))
+plot(M6b)
+
+
+## Define which columns are used for the initial setup of the various
+## dimensions
+M7 <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year",
+                      xvar="Profit", yvar="Expenses",
+                      colorvar="Location", sizevar="Sales")
+plot(M7)
+## For more information see:
+## https://developers.google.com/chart/interactive/docs/gallery/motionchart
+
+## See also the demo(WorldBank). It demonstrates how you can access
+## country level data from the World Bank to create Gapminder-like
+## plots.
+ 
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com}, 
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} 
+for printing and plotting methods.
+}
+\keyword{iplot}
+
diff --git a/man/gvisOrgChart.Rd b/man/gvisOrgChart.Rd
new file mode 100644
index 0000000..d24fc72
--- /dev/null
+++ b/man/gvisOrgChart.Rd
@@ -0,0 +1,99 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisOrgChart.R
+\name{gvisOrgChart}
+\alias{gvisOrgChart}
+\title{Google Org Chart with R
+\Sexpr{googleChartName <- "orgchart"}
+\Sexpr{gvisChartName <- "gvisOrgChart"}}
+\usage{
+gvisOrgChart(data, idvar = "", parentvar = "", tipvar = "",
+  options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least three
+columns. Each row in the data table describes one node (a rectangle in the
+graph). Each node (except the root node) has one or more parent nodes. Each
+node is sized and colored according to its values relative to the other
+nodes currently shown.}
+
+\item{idvar}{column name of \code{data} describing the ID for each node. It
+should be unique among all nodes, and can include any characters, including
+spaces. This is shown on the node. You can specify a formatted value to show
+on the chart instead, but the unformatted value is still used as the ID.}
+
+\item{parentvar}{column name of \code{data} that match to entries in
+\code{idvar}. If this is a root node, leave this \code{NA}. Only one root is
+allowed.}
+
+\item{tipvar}{column name of \code{data} for the tip variable. Tool-tip text
+to show, when a user hovers over this node.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+An organizational chart that supports selection.
+}
+\details{
+The gvisOrgChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Internet
+## connection to display the visualisation.
+
+Regions
+Org1 <- gvisOrgChart(Regions, idvar = "Region", parentvar = "Parent", 
+     			      tipvar="Val")
+plot(Org1)
+
+## Set a few options
+Org2 <- gvisOrgChart(Regions, idvar = "Region", parentvar = "Parent", 
+     			      tipvar="Val", 
+     		     options=list(width=600, height=400,
+                     	          size='large', allowCollapse=TRUE))
+plot(Org2)
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+plotting methods.
+}
+\keyword{iplot}
+
diff --git a/man/gvisPieChart.Rd b/man/gvisPieChart.Rd
new file mode 100644
index 0000000..ea9730c
--- /dev/null
+++ b/man/gvisPieChart.Rd
@@ -0,0 +1,87 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisPieGaugeChart.R
+\name{gvisPieChart}
+\alias{gvisPieChart}
+\title{Google Pie Chart with R
+\Sexpr{googleChartName <- "piechart"}
+\Sexpr{gvisChartName <- "gvisPieChart"}}
+\usage{
+gvisPieChart(data, labelvar = "", numvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a pie chart}
+
+\item{labelvar}{Name of the character column which contains the category
+labels for the slice labels.}
+
+\item{numvar}{a vector of column names of the numerical variables of the
+slice values.}
+
+\item{options}{list of configuration options for Google Pie Charts, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisPieChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser using SVG or VML.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+Pie1 <- gvisPieChart(CityPopularity)
+plot(Pie1)
+
+## Doughnut chart - a pie with a hole
+Pie2 <- gvisPieChart(CityPopularity, options=list(
+                    slices="{4: {offset: 0.2}, 0: {offset: 0.3}}",
+                    title='City popularity',
+                    legend='none',
+                    pieSliceText='label',
+                    pieHole=0.5))
+plot(Pie2)
+
+
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisSankey.Rd b/man/gvisSankey.Rd
new file mode 100644
index 0000000..c84f8eb
--- /dev/null
+++ b/man/gvisSankey.Rd
@@ -0,0 +1,85 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisSankey.R
+\name{gvisSankey}
+\alias{gvisSankey}
+\title{Google Sankey Chart with R
+\Sexpr{googleChartName <- "sankey"}
+\Sexpr{gvisChartName <- "gvisSankey"}}
+\usage{
+gvisSankey(data, from = "", to = "", weight = "", options = list(),
+  chartid)
+}
+\arguments{
+\item{data}{data.frame that contains the data to be visualised}
+
+\item{from}{a string that referes to the column name in 
+\code{data} for the source nodes to be used}
+
+\item{to}{a string that referes to the column name in 
+\code{data} for the destination nodes to be used}
+
+\item{weight}{name of the column with the numerical weight of the connections}
+
+\item{options}{list of configuration options.
+The options are documented in detail by Google online:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+A sankey diagram is a visualization used to depict a flow from one set of 
+values to another. The things being connected are called nodes and the 
+connections are called links. They're named after Captain Sankey, who created 
+a diagram of steam engine efficiency that used arrows having widths 
+proportional to heat loss.
+}
+\section{Warning}{
+
+The sankey chart may be undergoing substantial revisions in 
+future Google Charts releases.
+}
+\examples{
+dat <- data.frame(From=c(rep("A",3), rep("B", 3)), 
+                  To=c(rep(c("X", "Y", "Z"),2)), 
+                  Weight=c(5,7,6,2,9,4))
+
+sk1 <- gvisSankey(dat, from="From", to="To", weight="Weight")
+plot(sk1)
+
+sk2 <- gvisSankey(dat, from="From", to="To", weight="Weight",
+                options=list(sankey="{link: {color: { fill: '#d799ae' } },
+                                     node: { color: { fill: '#a61d4c' },
+                                     label: { color: '#871b47' } }}"))
+plot(sk2)
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\keyword{iplot}
+
diff --git a/man/gvisScatterChart.Rd b/man/gvisScatterChart.Rd
new file mode 100644
index 0000000..81a3469
--- /dev/null
+++ b/man/gvisScatterChart.Rd
@@ -0,0 +1,125 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCoreCharts.R
+\name{gvisScatterChart}
+\alias{gvisScatterChart}
+\title{Google Scatter Chart with R
+\Sexpr{googleChartName <- "scatterchart"}
+\Sexpr{gvisChartName <- "gvisScatterChart"}}
+\usage{
+gvisScatterChart(data, options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a scatter chart.
+Two or more columns are required, all must be numeric. The values in the
+first column are used for the X-axis. The values in following columns are
+used for the Y-axis. Each column is displayed with a separate color.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisScatterChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser using SVG or VML.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+
+## Scatter chart
+Scatter1 <- gvisScatterChart(women)
+plot(Scatter1)
+
+## Using optional arguments
+Scatter2 <- gvisScatterChart(women, options=list(legend="none",
+                 lineWidth=2, pointSize=2,
+                 title="Women", vAxis="{title:'weight (lbs)'}",
+                 crosshair="{ trigger: 'both' }", 
+                 hAxis="{title:'height (in)'}", width=500, height=400))
+                 
+plot(Scatter2)
+
+
+df=data.frame(x=sin(1:100/3), 
+              Circle=cos(1:100/3), 
+ 	      Ellipse=cos(1:100/3)*0.5)
+
+## Plot several variables as smooth curves
+Scatter3 <- gvisScatterChart(df, 
+	    		options=list(curveType='function', 
+				     pointSize=0, 
+				     lineWidth=2))
+plot(Scatter3)
+
+## Two series in the same plot with different
+## x-values
+df <- data.frame(x=c(2,2,1,3,4),
+                 y1=c(0,3,NA,NA,NA),
+                 y2=c(NA,NA,0,3,2))
+Scatter4 <- gvisScatterChart(df,
+                             options=list(lineWidth=2,
+                                          pointSize=2))
+plot(Scatter4)
+
+## Customize points
+M <- matrix(nrow=6,ncol=6)
+M[col(M)==row(M)] <- 1:6
+dat <- data.frame(X=1:6, M)
+SC <- gvisScatterChart(dat, 
+                        options=list(
+                        title="Customizing points",
+                        legend="right",
+                        pointSize=30,
+                        series="{
+                             0: { pointShape: 'circle' },
+                             1: { pointShape: 'triangle' },
+                             2: { pointShape: 'square' },
+                             3: { pointShape: 'diamond' },
+                             4: { pointShape: 'star' },
+                             5: { pointShape: 'polygon' }
+                             }"))
+plot(SC)
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisSteppedAreaChart.Rd b/man/gvisSteppedAreaChart.Rd
new file mode 100644
index 0000000..212711c
--- /dev/null
+++ b/man/gvisSteppedAreaChart.Rd
@@ -0,0 +1,103 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisCoreCharts.R
+\name{gvisSteppedAreaChart}
+\alias{gvisSteppedAreaChart}
+\title{Google Stepped Area Chart with R
+\Sexpr{googleChartName <- "steppedarechart"}
+\Sexpr{gvisChartName <- "gvisSteppedAreChart"}}
+\usage{
+gvisSteppedAreaChart(data, xvar = "", yvar = "", options = list(),
+  chartid)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a stepped area
+chart.}
+
+\item{xvar}{name of the character column which contains the category labels
+for the x-axes.}
+
+\item{yvar}{a vector of column names of the numerical variables to be
+plotted.  Each column is displayed as a separate line.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisSteppedAreaChart function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page.
+}
+\details{
+The stepped area chart is rendered within the browser using SVG or VML and
+displays tips when hovering over points.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires an internet
+## connection to display the visualisation.
+
+df=data.frame(country=c("US", "GB", "BR"), val1=c(1,3,4), val2=c(23,12,32))
+
+## Stepped Area chart
+SteppedArea1 <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"))
+plot(SteppedArea1)
+
+## Stacked chart
+SteppedArea2 <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+      options=list(isStacked=TRUE))
+plot(SteppedArea2)
+
+
+## Add a customised title
+SteppedArea3 <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+             options=list(title="Hello World",
+                          titleTextStyle="{color:'red',fontName:'Courier',fontSize:16}"))
+plot(SteppedArea3)
+
+\dontrun{
+## Change y-axis to percentages
+SteppedArea3 <- gvisSteppedAreaChart(df, xvar="country", yvar=c("val1", "val2"),
+                       options=list(vAxis="{format:'#,###\%'}"))
+plot(SteppedArea3)
+}
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods
+}
+\keyword{iplot}
+
diff --git a/man/gvisTable.Rd b/man/gvisTable.Rd
new file mode 100644
index 0000000..af878a7
--- /dev/null
+++ b/man/gvisTable.Rd
@@ -0,0 +1,100 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisTable.R
+\name{gvisTable}
+\alias{gvisTable}
+\title{Google Table Chart with R
+\Sexpr{googleChartName <- "table"}
+\Sexpr{gvisChartName <- "gvisTable"}}
+\usage{
+gvisTable(data, options = list(), chartid, formats = NULL)
+}
+\arguments{
+\item{data}{a \code{\link{data.frame}} to be displayed as a table}
+
+\item{options}{list of configuration options, see: 
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+
+\item{formats}{named list. If \code{NULL} (default) no specific format will 
+be used. The named list needs to contain the column names of the data and 
+the specified format. The format string is a subset of the ICU pattern set. 
+For instance, {pattern:'#,###\%'} will result in output values "1,000\%", 
+"750\%", and "50\%" for values 10, 7.5, and 0.5.}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisTable function reads a data.frame and creates text output referring
+to the Google Visualisation API, which can be included into a web page, or
+as a stand-alone page. The actual chart is rendered by the web browser.
+}
+\details{
+A table that can be sorted and paged. Table cells can be formatted using
+format strings, or by directly inserting HTML as cell values. Numeric values
+are right-aligned; boolean values are displayed as check marks. Users can
+select single rows either with the keyboard or the mouse. Users can sort
+rows by clicking on column headers. The header row remains fixed as the user
+scrolls. The table fires a number of events corresponding to user
+interaction.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Flash and Internet
+## connection to display the visualisation.
+
+## Table with links to wikipedia (flags) 
+tbl1 <- gvisTable(Population)
+plot(tbl1)
+
+## Table with enabled paging
+tbl2 <- gvisTable(Population, options=list(page='enable', 
+                                           height='automatic',
+                                           width='automatic'))
+
+plot(tbl2)
+
+## Table with formating options
+tbl3 <- gvisTable(Population, formats=list(Population="#,###"))
+
+Population[['\% of World Population']] <- Population[['\% of World Population']]/100 
+tbl4 <- gvisTable(Population, formats=list(Population="#,###", 
+                                           '\% of World Population'='#.#\%'))
+plot(tbl4)                                           
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for
+printing and plotting methods.
+}
+\keyword{iplot}
+
diff --git a/man/gvisTimeline.Rd b/man/gvisTimeline.Rd
new file mode 100644
index 0000000..e5b1715
--- /dev/null
+++ b/man/gvisTimeline.Rd
@@ -0,0 +1,124 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisTimeLine.R
+\name{gvisTimeline}
+\alias{gvisTimeline}
+\title{Google Timeline Chart with R
+\Sexpr{googleChartName <- "timeline"}
+\Sexpr{gvisChartName <- "gvisTimeline"}}
+\usage{
+gvisTimeline(data, rowlabel = "", barlabel = "", start = "", end = "",
+  options = list(), chartid)
+}
+\arguments{
+\item{data}{data.frame that contains the data to be visualised}
+
+\item{rowlabel}{a string that referes to the column name in 
+\code{data} for the row labels to be used}
+
+\item{barlabel}{a string that referes to the column name in 
+\code{data} for the bar labels to be used}
+
+\item{start}{number, date or datetime for the start dates}
+
+\item{end}{number, date or datetime for the end dates}
+
+\item{options}{list of configuration options.
+The options are documented in detail by Google online:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+A timeline is a chart that depicts how a set of resources are used 
+over time. One popular type of timeline is the Gantt chart.
+}
+\examples{
+dat <- data.frame(Term=c("1","2","3"),
+                  President=c("Whasington", "Adams", "Jefferson"),
+                  start=as.Date(x=c("1789-03-29", "1797-02-03", "1801-02-03")),
+                  end=as.Date(x=c("1797-02-03", "1801-02-03", "1809-02-03")))
+
+tl <- gvisTimeline(data=dat[,-1], rowlabel="President", 
+                   start="start", end="end")
+plot(tl)
+
+tl <- gvisTimeline(data=dat, barlabel="President", 
+                   start="start", end="end")
+plot(tl)
+
+tl <- gvisTimeline(data=dat, rowlabel="President", 
+                   start="start", end="end",
+                   options=list(timeline="{showRowLabels:false}"))
+plot(tl)
+
+dat <- data.frame(Position=c(rep("President", 3), rep("Vice", 3)),
+                  Name=c("Washington", "Adams", "Jefferson",
+                         "Adams", "Jefferson", "Burr"),
+                  start=as.Date(x=rep(c("1789-03-29", "1797-02-03", "1801-02-03"),2)),
+                  end=as.Date(x=rep(c("1797-02-03", "1801-02-03", "1809-02-03"),2)))
+
+tl <- gvisTimeline(data=dat, rowlabel="Name",barlabel="Position", 
+                   start="start", end="end",
+                   options=list(timeline="{showRowLabels:true}"))
+plot(tl)
+
+tl <- gvisTimeline(data=dat, rowlabel="Name",barlabel="Position", 
+                   start="start", end="end",
+                   options=list(timeline="{groupByRowLabel:false}",
+                                backgroundColor='#ffd', height=350,
+                                colors="['#cbb69d', '#603913', '#c69c6e']"))
+
+plot(tl)
+
+# Datetime example 
+dat <- data.frame(Room=c("Room 1","Room 2","Room 3"),
+                  Language=c("English", "German", "French"),
+                  start=as.POSIXct(c("2014-03-14 14:00", "2014-03-14 15:00", 
+                                     "2014-03-14 14:30")),
+                 end=as.POSIXct(c("2014-03-14 15:00", "2014-03-14 16:00", 
+                                  "2014-03-14 15:30")))
+tl <- gvisTimeline(data=dat, rowlabel="Language",
+                   start="start", end="end")
+plot(tl)
+
+\dontrun{
+require(timeline)
+data(ww2)
+timeline(ww2, ww2.events, event.spots=2, event.label='', event.above=FALSE)
+ww2$Person <- gsub("\\\\n" ," ", ww2$Person)
+plot(gvisTimeline(ww2, barlabel="Person", rowlabel="Group",
+                  start="StartDate", end="EndDate",
+     options=list(width=600, height=350))
+)
+}
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\keyword{iplot}
+
diff --git a/man/gvisTreeMap.Rd b/man/gvisTreeMap.Rd
new file mode 100644
index 0000000..6708fcd
--- /dev/null
+++ b/man/gvisTreeMap.Rd
@@ -0,0 +1,213 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/gvisTreeMap.R
+\name{gvisTreeMap}
+\alias{gvisTreeMap}
+\title{Google Tree Map with R
+\Sexpr{googleChartName <- "treemap"}
+\Sexpr{gvisChartName <- "gvisTreeMap"}}
+\usage{
+gvisTreeMap(data, idvar = "", parentvar = "", sizevar = "",
+  colorvar = "", options = list(), chartid)
+}
+\arguments{
+\item{data}{a \code{data.frame}. The data has to have at least four columns.
+Each row in the data table describes one node (a rectangle in the graph).
+Each node (except the root node) has one or more parent nodes. Each node is
+sized and colored according to its values relative to the other nodes
+currently shown.}
+
+\item{idvar}{column name of \code{data} describing the ID for each node. It
+can be any valid JavaScript string, including spaces, and any length that a
+string can hold. This value is displayed as the node header.}
+
+\item{parentvar}{column name of \code{data} that match to entries in
+\code{idvar}. If this is a root node, leave this \code{NA}. Only one root is
+allowed per treemap.}
+
+\item{sizevar}{column name of \code{data} with positive values to define the
+size of maps.  Any positive value is allowed. This value determines the size
+of the node, computed relative to all other nodes currently shown. This
+value is ignored for non-leaf nodes (it is actually calculated from the size
+of all its children).}
+
+\item{colorvar}{column name of \code{data} with values to define range of
+color. The value is used to calculate a color for this node. Any value,
+positive or negative, is allowed. The color value is first recomputed on a
+scale from \code{minColorValue} to \code{maxColorValue}, and then the node
+is assigned a color from the gradient between \code{minColor} and
+\code{maxColor}.}
+
+\item{options}{list of configuration options, see:
+
+% START DYNAMIC CONTENT
+
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName,
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURLConfigOptions.txt")))}
+
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOptions.txt")))}}
+
+\item{chartid}{character. If missing (default) a random chart id will be 
+generated based on chart type and \code{\link{tempfile}}}
+}
+\value{
+\Sexpr[results=rd]{paste(gvisChartName)} returns list 
+of \code{\link{class}}
+ \Sexpr[results=rd]{paste(readLines(file.path(".", "inst", 
+ "mansections", "gvisOutputStructure.txt")))}
+}
+\description{
+The gvisTreeMap function reads a data.frame and creates text output
+referring to the Google Visualisation API, which can be included into a web
+page, or as a stand-alone page. The actual chart is rendered by the web
+browser.
+}
+\details{
+A tree map is a visual representation of a data tree, where each node can
+have zero or more children, and one parent (except for the root, which has
+no parents). Each node is displayed as a rectangle, sized and colored
+according to values that you assign. Sizes and colors are valued relative to
+all other nodes in the graph. You can specify how many levels to display
+simultaneously, and optionally to display deeper levels in a hinted fashion.
+If a node is a leaf node, you can specify a size and color; if it is not a
+leaf, it will be displayed as a bounding box for leaf nodes. The default
+behavior is to move down the tree when a user left-clicks a node, and to
+move back up the tree when a user right-clicks the graph.
+
+The total size of the graph is determined by the size of the containing
+element that you insert in your page. If you have leaf nodes with names too
+long to show, the name will be truncated with an ellipsis (...).
+}
+\section{Warning }{
+
+
+Tree maps display a tree like structure where every child has to have a
+unique parent.
+
+Values in column \code{sizevar} should be greater than zero and finite.
+}
+\examples{
+
+## Please note that by default the googleVis plot command
+## will open a browser window and requires Internet
+## connection to display the visualisation.
+
+Tree <- gvisTreeMap(Regions,  idvar="Region", parentvar="Parent",
+                    sizevar="Val", colorvar="Fac")
+plot(Tree)
+
+
+Tree2 <- gvisTreeMap(Regions,  "Region", "Parent", "Val", "Fac",
+                    options=list(width=600, height=500,
+                                 fontSize=16,
+                                 minColor='#EDF8FB',
+                                 midColor='#66C2A4',
+                                 maxColor='#006D2C',
+                                 headerHeight=20,
+                                 fontColor='black',
+                                 showScale=TRUE))
+
+plot(Tree2)
+
+## Simple static treemap with no drill down options based on US states
+## and their area. However we still have to create a parent id to use
+## gvisTreeMap
+ 
+require(datasets)
+states <- data.frame(state.name, state.area)
+
+## Create parent variable
+
+total=data.frame(state.area=sum(states$state.area), state.name="USA")
+
+my.states <- rbind(total, states)
+my.states$parent="USA"
+## Set parent variable to NA at root level
+my.states$parent[my.states$state.name=="USA"] <- NA
+
+my.states$state.area.log=log(my.states$state.area)
+statesTree <- gvisTreeMap(my.states, "state.name", "parent",
+                          "state.area", "state.area.log")
+plot(statesTree)
+
+
+## We add US regions to the above data set to enable drill down capabilities
+
+states2 <- data.frame(state.region, state.name, state.area)
+
+regions <- aggregate(list(region.area=states2$state.area),
+                     list(region=state.region), sum)
+
+my.states2 <- data.frame(regionid=c("USA",
+                                    as.character(regions$region),
+                                    as.character(states2$state.name)),
+                         parentid=c(NA, rep("USA", 4),
+                                   as.character(states2$state.region)),
+                         state.area=c(sum(states2$state.area),
+                                      regions$region.area, states2$state.area))
+
+my.states2$state.area.log=log(my.states2$state.area)
+
+statesTree2 <- gvisTreeMap(my.states2, "regionid", "parentid",
+                           "state.area", "state.area.log")
+
+plot(statesTree2)
+
+## Now we add another layer with US divisions
+
+states3 <- data.frame(state.region, state.division, state.name, state.area)
+
+regions <- aggregate(list(region.area=states3$state.area),
+                     list(region=state.region), sum)
+
+divisions <- aggregate(list(division.area=states3$state.area),
+                     list(division=state.division, region=state.region),
+                     sum)
+
+my.states3 <- data.frame(regionid=c("USA",
+                                    as.character(regions$region),
+                                    as.character(divisions$division),
+                                    as.character(states3$state.name)),
+                         parentid=c(NA, rep("USA", 4), 
+                                   as.character(divisions$region),
+                                   as.character(states3$state.division)),
+                         state.area=c(sum(states3$state.area),
+                                      regions$region.area,
+                                      divisions$division.area,
+                                      states3$state.area))
+
+my.states3$state.area.log=log(my.states3$state.area)
+
+statesTree3 <- gvisTreeMap(my.states3, "regionid", "parentid",
+                           "state.area", "state.area.log")
+
+plot(statesTree3)
+
+
+
+}
+\author{
+Markus Gesmann \email{markus.gesmann at gmail.com},
+
+Diego de Castillo \email{decastillo at gmail.com}
+}
+\references{
+Google Chart Tools API: 
+\Sexpr[results=rd]{gsub("CHARTNAME", 
+googleChartName, 
+readLines(file.path(".", "inst",  "mansections", 
+"GoogleChartToolsURL.txt")))}
+
+% END DYNAMIC CONTENT
+}
+\seealso{
+See also \code{\link{print.gvis}}, \code{\link{plot.gvis}} for printing and
+plotting methods.
+
+Please note that the \code{treemap} package offeres a static version of tree
+maps via its \code{tmPlot} function.
+}
+\keyword{iplot}
+
diff --git a/man/renderGvis.Rd b/man/renderGvis.Rd
new file mode 100644
index 0000000..57d313f
--- /dev/null
+++ b/man/renderGvis.Rd
@@ -0,0 +1,78 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/shiny.R
+\name{renderGvis}
+\alias{renderGvis}
+\title{renderGvis}
+\usage{
+renderGvis(expr, env = parent.frame(), quoted = FALSE)
+}
+\arguments{
+\item{expr}{An expression that returns a gvis object.}
+
+\item{env}{The environment in which to evaluate \code{expr}}
+
+\item{quoted}{Is \code{expr} a quoted expression (with \code{quote()})?
+This is useful if you want to save an expression in a variable.}
+}
+\value{
+Returns a function that can be assigned to a Shiny \code{output} 
+element.
+}
+\description{
+This function lets you use googleVis charts as Shiny output. 
+Use it to wrap a googleVis-generating function that you assign to an 
+\code{output} element in \code{server.R}; then create an \code{htmlOutput} 
+with the same name in \code{ui.R}.
+}
+\details{
+Use a googleVis Chart as Shiny Output
+}
+\section{Details}{
+
+More information about shiny is available online: 
+ \url{http://www.rstudio.com/shiny/}. 
+ You find further examples with googleVis on shiny on mages' blog:
+ \url{http://lamages.blogspot.co.uk/search/label/shiny}
+}
+\examples{
+  
+\dontrun{
+# To run this example:
+shiny::runApp(system.file("shiny/", package="googleVis"))
+# server.R
+library(googleVis)
+
+shinyServer(function(input, output) {
+  datasetInput <- reactive({
+    switch(input$dataset,
+           "rock" = rock,
+           "pressure" = pressure,
+           "cars" = cars)
+  })
+  
+  output$view <- renderGvis({
+    gvisScatterChart(datasetInput(),
+                     options=list(title=paste('Data:',input$dataset)))
+  })
+})
+
+# ui.R
+shinyUI(pageWithSidebar(
+  headerPanel("googleVis on Shiny"),
+  sidebarPanel(
+    selectInput("dataset", "Choose a dataset:",
+                choices = c("rock", "pressure", "cars"))
+  ),
+  mainPanel(
+    htmlOutput("view")
+  )
+))
+}
+
+
+}
+\author{
+Joe Cheng, \email{joe at rstudio.com}
+}
+\keyword{shiny}
+
diff --git a/vignettes/Using_Roles_via_googleVis.Rmd b/vignettes/Using_Roles_via_googleVis.Rmd
new file mode 100644
index 0000000..12a71e6
--- /dev/null
+++ b/vignettes/Using_Roles_via_googleVis.Rmd
@@ -0,0 +1,58 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Using Roles and Intervals via googleVis}
+-->
+# Using Roles via googleVis
+
+Roles add the ability to pass columns for further processing downstream. 
+Role columns must follow column they pertain to. Proper naming
+conventions must be observed. For example, roles fulfilling tooltip
+roles and must be called "foo.blah.tooltip". For more details see the [Google documentation](https://developers.google.com/chart/interactive/docs/roles).
+
+The following examples should help to illustrate the concept. 
+
+```{r setOptions, message=FALSE, echo=FALSE}
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('Roles', 'googleVis')
+```
+The first example uses a data set that has the additional column
+`pop.html.tooltip` with the first 11 letters of the Latin alphabet.
+This column is mapped automatically as a tooltip when the user hovers 
+over the chart point.
+```{r Tooltip, results='asis', tidy=FALSE}
+```
+HTML code can be embedded into the tooltip as well, if the option 
+isHtml is set to true.
+```{r TooltipHTML, results='asis', tidy=FALSE}
+```
+Often it is helpful to highlight certain parts of the data. The Google API
+distinguishes between certainty and emphasis.
+In a similar way to above additional columns with boolean values
+have to be added to the data.
+```{r CertaintyScopeEmphasis, results='asis', tidy=FALSE}
+```
+
+Using roles with column or bar charts has some specifics.
+Instead of 'emphasize' use 'style' to change the colours.
+```{r ColumnChart, results='asis', tidy=FALSE}
+```
+
+
+```{r TwoLines, results='asis', tidy=FALSE}
+```
+
+Setting the annotations style to 'line' allows adding little reference lines
+to the plot.
+```{r VerticalReferenceLine, results='asis', tidy=FALSE}
+```
+
+Intervals help to add error bars, confidence levels, etc.
+Note that the options are set either via `interval` or `intervals`, 
+if set to all intervals. The examples below give an indication of what 
+can be achieved with intervals. 
+For more details visit the Google [documentation](https://google-developers.appspot.com/chart/interactive/docs/gallery/intervals).
+
+```{r Interval, results='asis', tidy=FALSE}
+```
diff --git a/vignettes/Using_Trendlines_with_googleVis.Rmd b/vignettes/Using_Trendlines_with_googleVis.Rmd
new file mode 100644
index 0000000..7c109a3
--- /dev/null
+++ b/vignettes/Using_Trendlines_with_googleVis.Rmd
@@ -0,0 +1,35 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Using Trendlines with googleVis}
+-->
+# Using Trendlines with googleVis
+
+A trendline is a line superimposed on a chart revealing the overall 
+direction of the data. Google Charts can automatically generate 
+trendlines for Scatter Charts, Bar Charts, Column Charts and Line Charts.
+
+For more details visit: 
+https://developers.google.com/chart/interactive/docs/gallery/trendlines
+
+```{r setOptions, message=FALSE, echo=FALSE}
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('Trendlines', 'googleVis')
+```
+
+## Linear trend line
+```{r LinearTrend, results='asis', tidy=FALSE}
+```
+
+## Exponential trend line with equation shown in legend
+```{r ExponentialTrend, results='asis', tidy=FALSE}
+```
+
+## Add trend line to column chart
+```{r ColumnChartWithTrendline, results='asis', tidy=FALSE}
+```
+
+## Changing labels in legend
+```{r DifferentLabels, results='asis', tidy=FALSE}
+```
diff --git a/vignettes/Using_googleVis_with_knitr.Rmd b/vignettes/Using_googleVis_with_knitr.Rmd
new file mode 100644
index 0000000..4808462
--- /dev/null
+++ b/vignettes/Using_googleVis_with_knitr.Rmd
@@ -0,0 +1,56 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Markdown example with knitr and googleVis}
+-->
+# Markdown example with knitr and googleVis
+===========================================
+This is a little Markdown example output. The Markdown source file is hosted on [GitHub](https://github.com/mages/googleVis/blob/master/vignettes/Using_googleVis_with_knitr.Rmd).
+
+Set the googleVis options first to change the behaviour of plot.gvis, so that only the chart component of the HTML file is written into the output file.
+
+```{r setOptions, message=FALSE}
+library(googleVis)
+op <- options(gvis.plot.tag='chart')
+```
+The following plot statements will automatically return  the HTML
+required for the 'knitted' output. 
+
+## Combo chart
+```{r ComboExample, results='asis', tidy=FALSE}
+## Add the mean
+CityPopularity$Mean=mean(CityPopularity$Popularity)
+CC <- gvisComboChart(CityPopularity, xvar='City',
+          yvar=c('Mean', 'Popularity'),
+          options=list(seriesType='bars',
+                       width=450, height=300,
+                       title='City Popularity',
+                       series='{0: {type:\"line\"}}'))
+plot(CC)
+```
+Example of gvisComboChart with R code shown above.
+
+## Place two charts next to each other
+```{r gvisMergeExample, results='asis', echo=FALSE}
+Geo <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit', 
+                    options=list(height=300, width=350)) 
+Tbl <- gvisTable(Exports, options=list(height=300, width=200))
+plot(gvisMerge(Geo, Tbl, horizontal=TRUE))
+``````
+Example of a gvisGeoChart with gvisTable and R code hidden.
+
+## Motion Chart
+```{r MotionChartExample, results='asis', tidy=FALSE}
+M <- gvisMotionChart(Fruits, 'Fruit', 'Year',
+         options=list(width=400, height=350))
+plot(M)
+```
+Please note that the Motion Chart is only displayed when hosted on a
+web server, or if placed in a directory which has been added to the 
+trusted sources in the [security settings of Macromedia]
+(http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html). 
+See the googleVis package vignette for more details. 
+
+```{r resetOptions}
+## Set options back to original options
+options(op)
+```
diff --git a/vignettes/figures/Apostrophe.pdf b/vignettes/figures/Apostrophe.pdf
new file mode 100644
index 0000000..31ef2c6
Binary files /dev/null and b/vignettes/figures/Apostrophe.pdf differ
diff --git a/vignettes/figures/CambR_googleVis_29_May_2012.pdf b/vignettes/figures/CambR_googleVis_29_May_2012.pdf
new file mode 100644
index 0000000..b08138b
Binary files /dev/null and b/vignettes/figures/CambR_googleVis_29_May_2012.pdf differ
diff --git a/vignettes/figures/CreatePost.pdf b/vignettes/figures/CreatePost.pdf
new file mode 100644
index 0000000..83e476c
Binary files /dev/null and b/vignettes/figures/CreatePost.pdf differ
diff --git a/vignettes/figures/Editor.pdf b/vignettes/figures/Editor.pdf
new file mode 100644
index 0000000..8e79811
Binary files /dev/null and b/vignettes/figures/Editor.pdf differ
diff --git a/vignettes/figures/MarkdownExample.pdf b/vignettes/figures/MarkdownExample.pdf
new file mode 100644
index 0000000..1c73adf
Binary files /dev/null and b/vignettes/figures/MarkdownExample.pdf differ
diff --git a/vignettes/figures/MotionChart.pdf b/vignettes/figures/MotionChart.pdf
new file mode 100644
index 0000000..4e4c247
Binary files /dev/null and b/vignettes/figures/MotionChart.pdf differ
diff --git a/vignettes/figures/Options.pdf b/vignettes/figures/Options.pdf
new file mode 100644
index 0000000..eb3c848
Binary files /dev/null and b/vignettes/figures/Options.pdf differ
diff --git a/vignettes/figures/Rook.pdf b/vignettes/figures/Rook.pdf
new file mode 100644
index 0000000..9ae7cb4
Binary files /dev/null and b/vignettes/figures/Rook.pdf differ
diff --git a/vignettes/figures/googleVisDemoPlots.pdf b/vignettes/figures/googleVisDemoPlots.pdf
new file mode 100644
index 0000000..521ade1
Binary files /dev/null and b/vignettes/figures/googleVisDemoPlots.pdf differ
diff --git a/vignettes/figures/googleVisTutorial2013.png b/vignettes/figures/googleVisTutorial2013.png
new file mode 100644
index 0000000..adc1ac3
Binary files /dev/null and b/vignettes/figures/googleVisTutorial2013.png differ
diff --git a/vignettes/figures/gvisGeoChart.pdf b/vignettes/figures/gvisGeoChart.pdf
new file mode 100644
index 0000000..193002b
Binary files /dev/null and b/vignettes/figures/gvisGeoChart.pdf differ
diff --git a/vignettes/figures/gvisMerge.pdf b/vignettes/figures/gvisMerge.pdf
new file mode 100644
index 0000000..fe7dc4b
Binary files /dev/null and b/vignettes/figures/gvisMerge.pdf differ
diff --git a/vignettes/figures/gvisObject.pdf b/vignettes/figures/gvisObject.pdf
new file mode 100644
index 0000000..171397a
Binary files /dev/null and b/vignettes/figures/gvisObject.pdf differ
diff --git a/vignettes/figures/shiny.pdf b/vignettes/figures/shiny.pdf
new file mode 100644
index 0000000..c44f427
Binary files /dev/null and b/vignettes/figures/shiny.pdf differ
diff --git a/vignettes/googleVis.Rnw b/vignettes/googleVis.Rnw
new file mode 100644
index 0000000..8ab85b8
--- /dev/null
+++ b/vignettes/googleVis.Rnw
@@ -0,0 +1,1440 @@
+\documentclass{article}
+\usepackage[T1]{fontenc}
+\usepackage{Sweave}
+\usepackage{thumbpdf}
+\usepackage{url}
+%\usepackage{wrapfig}
+\usepackage{hyperref}
+
+\hypersetup{
+  pdftitle={Introduction to googleVis},%
+  pdfauthor={Markus Gesmann},%
+}
+
+%\VignetteEngine(Sweave)
+%!\VignetteEncoding{UTF-8}
+%\VignetteIndexEntry{Introduction to googleVis}
+%\VignetteDepends{googleVis}
+%\VignetteKeywords{google, visualisation, api}
+%\VignettePackage{googleVis}
+
+
+\SweaveOpts{engine=R, eps=FALSE, keep.source = TRUE}
+<<options, echo=FALSE>>=
+options(prompt = "R> ", digits = 4, show.signif.stars = FALSE)
+@
+
+
+%\keywords{google, visualisation, api, \proglang{R}}
+
+\setlength{\parindent}{0.0in}
+\setlength{\parskip}{2mm}
+
+\newcommand{\googleVis}{\textbf{\texttt{googleVis}} }
+\newcommand{\knitr}{\textbf{\texttt{knitr}} }
+\newcommand{\rsp}{\textbf{\texttt{R.rsp }}}
+\newcommand{\brew}{\textbf{\texttt{brew }}}
+\newcommand{\rapache}{\emph{{RApache }}}
+\newcommand{\Rook}{\emph{{Rook }}}
+\newcommand{\shiny}{\textbf{\texttt{shiny }}}
+
+\renewcommand{\familydefault}{\sfdefault}
+
+\begin{document}
+\SweaveOpts{concordance=TRUE}
+
+\author{Markus Gesmann\footnote{markus.gesmann at gmail.com},
+  Diego de Castillo\footnote{decastillo at gmail.com}}
+\title{Introduction to googleVis \Sexpr{packageDescription("googleVis")[['Version']]}
+}
+\maketitle
+\begin{abstract}
+  The \googleVis package provides an interface between R and the
+  Google Charts API. Google Charts offer interactive
+  charts which can be embedded into web pages. The best 
+  known of these charts is probably the Motion Chart, popularised 
+  by Hans Rosling in his TED talks. 
+ 
+  The functions of the \googleVis package allow the user to visualise
+  data stored in R data frames with Google Charts
+  without uploading the data to Google. The output of a \googleVis
+  function is HTML code that contains the data and references to
+  JavaScript functions hosted by Google.
+  
+  googleVis makes use of the internal R HTTP server to display the
+  output locally. A modern browser with an Internet connection is
+  required and for some charts a Flash player.
+	     
+\end{abstract}
+
+\clearpage
+\tableofcontents
+\clearpage
+
+\section{Introduction}\label{sec:Intro}
+
+\subsection{Motivation}\label{sec:Motivation}
+More and more data is becoming available, and yet
+stories and insights are still often missed: we are lost in the data
+jungle and struggle to see the wood for the trees. 
+
+Hence, new tools are required to bring data to life, to engage with
+users, to enable them to slice and dice the data, to view it from
+various angles and to find stories worth telling: outliers, trends or
+even the obvious. 
+
+In 2006 Hans Rosling gave an inspiring talk at
+TED~\cite{HansRoslingTedTalk} about social and economic developments
+in the world over the past 50 years, which challenged the views and
+perceptions of many listeners. Rosling had used extensive data analysis
+to reach his conclusions.  To visualise his talk, he and his team at
+Gapminder~\cite{Gapminder} had developed animated bubble charts, aka
+motion charts, see Figure~\ref{MotionChartGUI}. 
+
+Rosling's presentation popularised the idea and use of interactive
+charts. One year later the software behind
+Gapminder was bought by Google and integrated as motion charts into
+their Google Charts API~\cite{GoogleVisApi}, formerly known as Google
+Visualisation API.  
+
+In 2010 Sebasti\'{a}n P\'{e}rez Saaibi~\cite{Saaibi2010} presented at the 
+R/Rmetrics Workshop on  Computational Finance and Financial
+Engineering, the idea to use Google motion charts to visualise R
+output with the \rsp package~\cite{Rsp}. 
+
+Inspired by those talks and the desire to use interactive data
+visualisation tools to foster the dialogue between data analysts and
+others the authors of this vignette started the development of the
+\googleVis package~\cite{googleVis},
+\cite{RJournal:2011-2:GesmannCastillo} in August 2010. 
+
+\begin{figure}[t]
+\begin{center}
+\includegraphics[width=\textwidth]{./figures/MotionChart.pdf}
+\caption{
+  Overview of a Google Motion Chart.  Screenshot of the output of
+  \texttt{plot(gvisMotionChart(Fruits, idvar='Fruit', timevar='Year'))}
+}\label{MotionChartGUI}
+\end{center}
+\end{figure}
+%\clearpage
+
+\subsection{Google Chart Tools}\label{sec:GoogleChartTools}
+
+The Google Charts API~\cite{GoogleVisApi}
+allows users to create interactive charts as part of Google
+documents, spreadsheets and web pages. In this text, we will focus 
+on the usage of the API as part of web pages.
+
+The Google Public Data Explorer~\cite{GooglePublicData} provides a
+good example, demonstrating the use of interactive charts and how they can
+help to analyse data. Please note, that all of those charts are
+rendered by the browser.
+
+The charting data can either be embedded into the HTML file or read
+dynamically. The key to the Google Charts is that the data is
+structured in a DataTable~\cite{DataTable}, and this is where the \googleVis
+package helps, as it transforms R data frames into JSON~\cite{json}
+objects, using the \texttt{\textbf{jsonlite}} package~\cite{jsonlite}, as
+the basis for a DataTable. 
+
+As an example we shall look at the html-code of a motion chart from
+Google's visualisation gallery~\cite{GoogleMotionChart}, which
+generates output similar to Figure~\ref{MotionChartGUI}:
+
+\begin{small}\label{motionchartcodeexample}
+\begin{verbatim}
+ 1 <html>
+ 2  <head>
+ 3   <script type="text/javascript" 
+ 4     src="http://www.google.com/jsapi">
+ 5   </script>
+ 6   <script type="text/javascript">
+ 7     google.load('visualization', '1', 
+ 8      {'packages':['motionchart']});
+ 9    google.setOnLoadCallback(drawChart);
+10    function drawChart() {
+11    var data=new google.visualization.DataTable();
+12    data.addColumn('string', 'Fruit');
+13    data.addColumn('date', 'Date');
+14    data.addColumn('number', 'Sales');
+15    data.addColumn('number', 'Expenses');
+16    data.addColumn('string', 'Location');
+17    data.addRows([
+18    ['Apples',new Date(1988,0,1),1000,300,'East'],
+19    ['Oranges',new Date(1988,0,1),1150,200,'West'],
+20    ['Bananas',new Date(1988,0,1),300,250,'West'],
+21    ['Apples',new Date(1989,6,1),1200,400,'East'],
+22    ['Oranges',new Date(1989,6,1),750,150,'West'],
+23    ['Bananas',new Date(1989,6,1),788,617,'West']
+24    ]);
+25    var chart=new google.visualization.MotionChart(
+26      document.getElementById('chart_div'));
+27    chart.draw(data, {width: 600, height:300});
+28   }
+29   </script>
+30  </head>
+31  <body>
+32   <div id="chart_div" 
+33        style="width:600px; height:300px;">
+34   </div>
+35  </body>
+36 </html>
+\end{verbatim}
+\end{small}
+The code and data are processed and rendered by the browser and is
+not submitted to any server\footnote{\url{https://google-developers.appspot.com/chart/interactive/docs/gallery/motionchart.html\#Data\_Policy}}. 
+
+You will notice that the above HTML code has five generic
+parts\footnote{For more details see
+\url{https://google-developers.appspot.com/chart/interactive/docs/index}}:
+\begin{itemize}
+\item references to Google's AJAX (l. 4) and Visualisation
+  API (ll. 7 -- 8),
+%%shown here as \verb=jsapi= and \verb='motionchart'=,
+
+\item data to visualise as a \verb=DataTable= (ll. 11 -- 24),
+
+\item an instance call to create the chart (ll. 25 -- 26),
+
+\item a method call to draw the chart including options, shown
+  here as width and height (l. 27),
+ 
+\item an HTML \verb=<div>= element to add the chart to the page (ll.
+  32 -- 34).
+\end{itemize}
+These principles hold true for most of the interactive charts of the
+Google Chart Tools, see the examples in Figure~\ref{demos}.
+
+However, before you use the API you should read the \href{https://developers.google.com/terms/}{Google
+  Terms of Service}~\cite{GoogleTerms}. 
+
+\section{The \googleVis package}\label{sec:googleVisPackage}
+
+
+The \googleVis package provides an interface between R and the Google
+Chart Tools.  The functions of the package allow the user to
+visualise data stored in R data frames with Google Charts.
+
+Version (\Sexpr{packageDescription("googleVis")[['Version']]}) of the package
+provides interfaces to  Motion Charts, Annotated Time Lines, 
+Maps, Geo Maps, Geo Charts, Intensity Maps, Tables, Gauges, 
+Tree Maps, further Line, Bar, Bubble, Column, Area, Stepped Area, 
+Combo, Scatter, Candlestick, Pie, Sankey, Annotation, 
+Histogram, Timeline, Calendar and Org Charts; see 
+Figure~\ref{demos} for some examples. 
+
+The output of a \googleVis function is HTML code that contains the
+data and references to JavaScript functions hosted by Google. A
+browser with an Internet connection is required to view
+the output, and for Motion Charts, Geo Maps, and Annotated Time Lines
+also Flash. For Geo Maps and Annotated Time Lines HTML5 alternatives are available with Geo Charts and Annotation Charts. 
+
+<<eval=FALSE, echo=FALSE>>=
+## Code for screen shot
+MC <- gvisMotionChart(Fruits, "Fruit", "Year", options=list(width=500, height=300))
+ATL <- gvisAnnotatedTimeLine(Stock, datevar="Date",
+                           numvar="Value", idvar="Device",
+                           titlevar="Title", annotationvar="Annotation",
+                           options=list(
+                             width=300, height=300,
+                             fill=10, displayExactValues=TRUE,
+                             colors="['#0000ff','#00ff00']")
+                           )
+                          
+Map <- gvisMap(Andrew, "LatLong" , "Tip",
+              options=list(showTip=TRUE, showLine=TRUE, enableScrollWheel=TRUE,
+                           mapType='terrain', useMapTypeControl=TRUE,
+                           width=400, height=200))
+Geo <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+                 options=list(dataMode="regions", width=400,height=200)) 
+
+## Table with enabled paging
+Table <- gvisTable(Population, options=list(page='enable', height=200, width=500))
+
+Tree <- gvisTreeMap(Regions,  "Region", "Parent", "Val", "Fac",
+                    options=list(width=300, height=200,
+                                 fontSize=16,
+                                 minColor='#EDF8FB',
+                                 midColor='#66C2A4',
+                                 maxColor='#006D2C',
+                                 headerHeight=20,
+                                 fontColor='black',
+                                 showScale=TRUE))
+
+M <- gvisMerge(gvisMerge(gvisMerge(MC, ATL, TRUE, tableOptions="cellspacing=10"), 
+                         gvisMerge(Map, Geo, TRUE, tableOptions="cellspacing=10")), 
+                         gvisMerge(Table, Tree, TRUE, tableOptions="cellspacing=10"))
+plot(M)
+@ 
+\begin{figure}[t]
+\begin{center}
+\includegraphics[width=\textwidth]{./figures/googleVisDemoPlots.pdf}
+\caption{
+  Screenshot of some of the outputs of \texttt{demo(googleVis)}.
+  Clockwise from top left:
+  \texttt{gvisMotionChart}, \texttt{gvisAnnotatedTimeLine}, 
+  \texttt{gvisGeoMap}, \texttt{gvisTreeMap}, \texttt{gvisTable}, and \texttt{gvisMap}.
+}\label{demos}
+\end{center}
+\end{figure}
+
+\subsection{Installation}\label{sec:Installation}
+You can install \googleVis in the usual way from CRAN, e.g.:
+<<eval=FALSE>>=
+install.packages('googleVis') 
+@
+The installation was successful if the
+command \texttt{library(googleVis)} gives you the following message:
+<<echo=FALSE, quite=TRUE>>=
+library(googleVis)
+@ 
+<<eval=FALSE>>=
+library(googleVis)
+@ 
+<<echo=FALSE>>=
+cat(googleVis:::gvisWelcomeMessage())
+@ 
+
+\subsection{Using the  \googleVis package}\label{sec:UsingGoogleVis}
+
+The individual functions of the \googleVis package are documented in
+the help pages. Here we will cover only the principles of
+the package.
+
+As an example, we will show how to generate a motion chart as displayed in   
+Figure~\ref{MotionChartGUI}. It works similarly for the other
+APIs. Further examples are covered in the demos\footnote{See
+  \texttt{demo(package="googleVis")} for a list of the available demos.} of the \googleVis
+package.
+
+The design of the visualisation functions is fairly generic. The name
+of the visualisation function is \texttt{'gvis' + ChartType}. So for
+the Motion Chart we have: 
+\begin{verbatim}
+gvisMotionChart(data, idvar='id', timevar='date', 
+                options=list(), chartid)
+\end{verbatim}
+Here \texttt{data} is the input \texttt{data.frame} and \texttt{idvar}
+and \texttt{timevar} specify the column names of the id variable and
+time variable for the plot, while display options are set in an
+optional list, which we discuss in more detail on
+page~\pageref{settingoptions}. The options and data requirements
+follow those of the Google Charts API  and are documented in the
+help pages, see 
+<<eval=FALSE>>=
+help('gvisMotionChart')
+@ 
+
+\begin{figure}%{r}{0.35\textwidth}
+\begin{center}
+\includegraphics[width=0.34\textwidth]{./figures/gvisObject.pdf}
+\caption{Schematic structure of a gvis list object.
+}\label{gvisObject}
+\end{center}
+\end{figure}
+
+The argument \texttt{chartid}  allows the user to set a chart id of the
+output chart manually. If the argument is missing a random id using 
+\texttt{tempfile(pattern=\textquotesingle\textquotesingle)}  
+will be generated. Unique chart ids are required to place more than
+one chart on a web page. 
+
+The output of a \googleVis function is a list of lists (a nested list)
+containing information about the chart type, chart id and the HTML
+code in a  sub-list with header, chart, caption and footer, see Figure~\ref{gvisObject}.
+
+The idea behind this concept is that users can get a
+complete web page, while at the same time offer a facility to extract 
+specific parts, such as the chart itself. 
+This is particularly helpful if the package functions
+are used in solutions where the user wants to feed the visualisation
+output into other sites, or would like to embed them into rsp-pages
+(see page~\pageref{rspexample}),  use \rapache (see
+page~\pageref{rapacheexample}) or Google Gadgets.  
+
+The output of a \googleVis function will be of class \texttt{'gvis'}
+and \texttt{'list'}. Generic print (\texttt{print.gvis})  and plot
+(\texttt{plot.gvis}) functions exist to ease the handling of such objects. 
+
+To illustrate the concept we shall create a motion chart using the
+\texttt{Fruits} data set. 
+
+\subsection{Motion Chart Example}\label{sec:MotionChartExample}
+
+Following the documentation of the Google Motion Chart API we need a
+data set which has at least four columns: one identifying the
+variable we would like to plot, one time variable and at least two
+numerical variables, further numerical and character columns are allowed.
+
+As an example we use the \texttt{Fruits} data set:
+<<>>=
+data(Fruits)
+Fruits
+@
+
+Here we will use the columns \texttt{'Fruit'} and
+\texttt{'Year'} as id and time variable respectively. However we could
+have used \texttt{'Date'} instead of \texttt{'Year'} as well. 
+
+<<>>=
+ M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year")
+@
+The structural output of \texttt{gvisMotionChart} is a list of lists as
+described above 
+<<eval=FALSE>>=
+ str(M)
+@ 
+<<echo=FALSE>>=
+## This statement avoids truncation
+cat(paste(substring( capture.output( str(M) ) , 0, 66), sep="\n", collapse="\n"))
+@ 
+The first two items of the list contain information about the chart type
+used and the individual chart id: %generated at run time from the chart
+%type and \texttt{tempfile(pattern=\textquotesingle\textquotesingle)}:
+<<>>=
+M$type
+M$chartid
+@ 
+The html output is a list with header, chart, caption and
+footer. This allows the user to extract only certain parts
+of the page, or to create a complete html page. 
+
+The header part of the html page has only basic html and formatting tags: 
+<<>>=
+print(M, tag='header')
+@ 
+Here we used the \texttt{print} statement with the tag
+\texttt{'header'} instead of \texttt{M\$html\$header} to achieve
+a formatted screen output. This is the same output as
+\texttt{cat(M\$html\$chart)}. 
+
+The actual Google visualisation code is stored with the data
+as a named character vector in the \texttt{chart} item of the HTML
+list. The chart is made up of several JavaScript and  HTML
+statements. Please notice that the JavaScript functions are  
+uniquely named with the information of the chart id.
+This concept allows the user get all the chart code directly or only
+specific parts; see the examples in the help page of \texttt{print.gvis}
+for more details.
+<<>>=
+names(M$html$chart)
+@ 
+The complete chart can be displayed via:
+<<>>=
+print(M, tag='chart')  ## or cat(M$html$chart)
+@
+Similarly you can also access specific components of the chart, e.g. (output  truncated)
+<<eval=FALSE>>=
+cat(M$html$chart['jsChart']) # or print(M, 'jsChart')
+@ 
+<<echo=FALSE>>=
+cat(paste(substring( capture.output( cat(M$html$chart['jsChart']) ) , 0, 66), sep="\n", collapse="\n"))
+@ 
+A basic chart caption and html footer are the final items of the html
+list (output  truncated):
+
+<<eval=FALSE>>=
+print(M, tag='caption')
+@ 
+<<echo=FALSE>>=
+cat(paste(substring( capture.output( cat(M$html$caption) ) , 0, 66), sep="\n", collapse="\n"))
+@ 
+
+<<eval=FALSE>>=
+print(M, tag='footer')
+@ 
+<<echo=FALSE>>=
+cat(paste(substring( capture.output( cat(M$html$footer) ) , 0, 66), sep="\n", collapse="\n"))
+@ 
+
+\subsection{Displaying \texttt{gvis} objects
+  locally}\label{sec:DisplayLocally} 
+
+To display the page locally, type:
+<<eval=FALSE>>=
+plot(M)  # returns invisibly the file name
+@
+
+The plot method for \texttt{gvis}-objects creates HTML files in a temporary folder using
+the type and chart id information of the object and it will display
+the output using the R HTTP help web server locally, usually under
+http://127.0.0.1.   
+
+Note that the chart caption provides a link to the chart code via
+the chart id for copy and paste. 
+
+The R command \texttt{tempdir()}  will show you the path of the
+per-session temporary directory, in which the files were written.  
+You can write the chart into a local html file via the \texttt{print}
+command with the file argument, e.g.
+<<eval=FALSE>>=
+print(M, file="myGoogleVisChart.html")
+@ 
+
+Please note that Flash charts\footnote{Currently the following charts
+  require Flash: motion chart, geo map and
+  annotated time line} may not work when loaded as a local file
+due to security settings, and therefore require to be displayed via a
+web server.  However, you can overcome this issue by changing your Flash security
+settings. Tony Breyal posted the following solution on
+\href{http://stackoverflow.com/questions/8009825/cannot-view-gvismotionchart-from-printed-html-file 
+}{stackoverflow.com}: 
+
+\begin{enumerate}\label{breyal}
+\item Go to \url{http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html}
+\item Click on the dropbox which says 'Edit location' and choose 'add location'
+\item Click 'browse for folder'
+\item Choose the folder in which you saved your HTML file
+\item Click OK
+\end{enumerate}
+
+Now open your \googleVis HTML file and it should display
+successfully. 
+
+Alternatively use the function \texttt{plot.gvis} explicitly,
+e.g. suppose your html file is stored in
+\texttt{/Users/JoeBloggs/myGoogleVisChart.html}. Using the
+\texttt{plot.gvis} the file will be copied into a temporary directory
+and displayed via the R HTTP help server with, in the same way as a
+gvis-object: 
+<<eval=FALSE>>=
+plot.gvis("/Users/JoeBloggs/myGoogleVisChart.html")
+@ 
+
+Please note that this feature of \texttt{plot.gvis} was introduced
+to \googleVis  with version 0.3.2.
+
+\subsection{Setting default behaviour of \texttt{print.gvis} and
+  \texttt{plot.gvis}}\label{sec:Options} 
+
+In \googleVis version 0.3.2 the function \texttt{plot.gvis} gained the
+same argument as \texttt{print.gvis}: \texttt{tag}. By default the
+\texttt{tag} argument is set to \texttt{NULL} in \texttt{plot.gvis}
+and the plot function will display its output in a browser
+window. However, if \texttt{tag} is not \texttt{NULL} the function
+\texttt{plot.gvis} will behave exactly like \texttt{print.gvis}.
+
+The default \texttt{tag} can be set for both functions globally via
+the \texttt{options()} function. On package load \googleVis sets
+\texttt{options(gvis.print.tag='html')} and
+\texttt{options(gvis.plot.tag=NULL)}. 
+
+Suppose you would set \texttt{options(gvis.plot.tag='chart')} then all
+following plot statements would print the chart part of the
+gvis-object only, without opening a browser window. This might
+seem a bit odd at first, yet it becomes helpful when you write R
+Markdown files for \knitr or files for other packages such as
+\textbf{\texttt{R.rsp}}. 
+
+While you draft your file you may want to see the output of \googleVis
+in an interactive way, so you set \texttt{options(gvis.plot.tag=NULL)}
+at the top of the file and you change the setting to \texttt{'chart'}
+before you parse the file, say with \textbf{\texttt{knitr}}. This will
+ensure that all plot statements return the HTML code of the chart,
+rather than opening browser windows. Section~\ref{sec:knitr} on
+page~\pageref{sec:knitr} provides more details and a little \knitr
+example.   
+
+\subsection{Combining charts with \texttt{gvisMerge}}\label{gvisMerge}
+
+The function \texttt{gvisMerge} takes two \texttt{gvis}-objects 
+and merges the underlying components into one page. The charts are
+aligned either horizontally or vertically next to each other in an HTML table. 
+
+\begin{figure}[ht]
+\begin{center}
+\includegraphics[width=0.8\textwidth]{./figures/gvisMerge.pdf}
+\caption{
+  Three charts combined with \texttt{gvisMerge}.
+}\label{gvisMerge}
+\end{center}
+\end{figure}
+
+The output of \texttt{gvisMerge} is a \texttt{gvis}-object again.
+This allows us to apply the same function iteratively to create more complex
+chart layouts.  The following example, see Figure~\ref{gvisMerge}, aligns a geo chart
+and table below each other, and combines the output with a motion chart to the right:
+<<>>=
+G <- gvisGeoChart(Exports, "Country", "Profit", 
+                  options=list(width=200, height=100))
+T <- gvisTable(Exports, 
+                  options=list(width=200, height=270))
+M <- gvisMotionChart(Fruits, "Fruit", "Year",
+                     options=list(width=400, height=370))
+GT <- gvisMerge(G,T, horizontal=FALSE) 
+GTM <- gvisMerge(GT, M, horizontal=TRUE, 
+                 tableOptions="bgcolor=\"#CCCCCC\" cellspacing=10")
+@ 
+<<eval=FALSE>>=
+plot(GTM)
+@ 
+
+\subsection{Setting options}\label{settingoptions}
+
+Setting the various options of a \googleVis objects can be a bit
+cumbersome at first. The options follow those of the Google
+Charts API and can be set via a named list using the argument \texttt{options}.
+In the following example, we create a line chart and set various
+options\footnote{Please refer to the help file of the individual
+  \googleVis functions, as the options can vary from chart to chart.},
+see the output in Figure~\ref{Options}.  
+\begin{figure}[ht]
+\begin{center}
+\includegraphics[width=0.8\textwidth]{./figures/Options.pdf}
+\caption{
+  A line chart with various options set.
+}\label{Options}
+\end{center}
+\end{figure}
+<<eval=FALSE>>=
+df <- data.frame(country=c("US", "GB", "BR"), 
+                        val1=c(1,3,4), val2=c(23,12,32))
+
+Line <-  gvisLineChart(df, xvar="country", yvar=c("val1","val2"),
+                        options=list(
+                          title="Hello World",
+                          titleTextStyle="{color:'red', 
+                                           fontName:'Courier', 
+                                           fontSize:16}",                         
+                          backgroundColor="#D3D3D3",                          
+                          vAxis="{gridlines:{color:'red', count:3}}",
+                          hAxis="{title:'Country', titleTextStyle:{color:'blue'}}",
+		          series="[{color:'green', targetAxisIndex: 0},	
+                                   {color: 'orange',targetAxisIndex:1}]",
+                          vAxes="[{title:'val1'}, {title:'val2'}]",
+                          legend="bottom",
+                          curveType="function",
+                          width=500,
+                          height=300                         
+                          ))
+plot(Line)
+@
+As you can see from the example above, the simpler options can be set by name=value,
+e.g. width=500, while the more complex options with sub-components are
+listed in curly brackets \{\}, and arrays, e.g. to define the two
+axes, use square brackets [ ].
+
+Generally, the following rules apply:
+
+\begin{itemize}
+
+\item parameters with names that do not include a "." are set with a single 
+value, e.g. width and height. Those are set like one would do in R, that is
+\texttt{options=list(}\texttt{width=200,} \texttt{height=300)}. 
+Boolean arguments are set to 
+either \texttt{TRUE} or \texttt{FALSE}, using the R syntax.
+
+\item parameters with names that do not include a "." and are set with 
+multiple values, e.g. \texttt{color}, and are wrapped in "[ ]", e.g. 
+\texttt{options=list(} \texttt{colors="['\#cbb69d',} \texttt{'\#603913',}
+\texttt{'\#c69c6e']")}
+
+\item parameters with names that do include a "." present parameters with 
+several sub-options and have to be set as a string wrapped in "\{ \}".
+The values of those sub-options are set via parameter:value. Boolean values
+have to be stated as \texttt{'true'} or \texttt{'false'}. 
+For example the Google documentaion states the formating options for the 
+vertical axis and states the parameter as \texttt{vAxis.format}. 
+Then this paramter can be set in R as:
+\texttt{options=list(} \texttt{vAxis="\{format:'\#,\#\#\#\%'\}")}. 
+
+\item If several sub-options have to be set, e.g. 
+\texttt{titleTextStyle.color,} \texttt{title\-Text\-Style.\-fontName} and 
+\texttt{titleTextStyle.fontSize}, then those can be combined in one list item 
+such as:
+\texttt{options=list(} \texttt{titleTextStyle="\{color:'red',} 
+\texttt{fontName:'Courier',} \texttt{fontSize:16\}")}
+
+\item paramters that can have more than one value per sub-options are 
+wrapped in "[ ]". For example to set the labels for left and right axes use:
+\texttt{options=list(} \texttt{vAxes="[\{title:'val1'\},} 
+\texttt{\{title:'val2'\}]")}
+
+\end{itemize}
+
+
+The following example set the colour axis of a geo chart, 
+see Figure~\ref{geochart}:
+<<eval=FALSE>>=
+Geo <- gvisGeoChart(CityPopularity, locationvar='City', 
+                    colorvar='Popularity',
+                     options=list(region='US', height=350, 
+                      displayMode='markers',
+            	      colorAxis="{values:[200,400,600,800],
+                       colors:[\'red', \'pink\', \'orange',\'green']}")
+                      ) 
+plot(Geo)
+@ 
+\begin{figure}[ht]
+\begin{center}
+\includegraphics[width=0.8\textwidth]{./figures/gvisGeoChart.pdf}
+\caption{
+A geo chart with options set for a colour axis.}
+\label{geochart}
+\end{center}
+\end{figure}
+
+\subsubsection{Chart Editor}
+A special option for all charts is \texttt{gvis.editor}, which adds an
+edit  button to the page, allowing the user to edit, change and
+customise the chart on the fly, see the following example and
+Figure~\ref{Editor}. The content of the list item \texttt{gvis.editor}
+describes the label of the browser button\footnote{See also
+  \url{https://google-developers.appspot.com/chart/interactive/docs/drawing\_charts\#charteditor}}. 
+<<eval=FALSE>>=
+Editor <- gvisLineChart(df, options=list(gvis.editor='Edit me!'))
+plot(Editor)
+@ 
+\begin{figure}[ht]
+\begin{center}
+\includegraphics[width=0.8\textwidth]{./figures/Editor.pdf}
+\caption{
+Example of \googleVis chart with \texttt{options = list (gvis.editor =
+  'Edit me!')}.
+}\label{Editor}
+\end{center}
+\end{figure}
+
+\subsubsection{Dealing with apostrophes in column names}
+The \googleVis package converts data frames into JSON objects.
+The column names of the resulting JSON tables are encapsulated with
+single speech marks, see lines 12 -- 16 of the code example on
+page~\pageref{motionchartcodeexample}. 
+
+Hence apostrophes in column names of your input data frame have
+to be encapsulated by a double backslash.
+
+Here is a little example, see the output in Figure~\ref{fig:apostrophes}.
+<<>>=
+df <- data.frame("Year"=c(2009,2010), "Lloyd\\'s"=c(86.1, 93.3), 
+                 "Munich Re\\'s R/I"=c(95.3, 100.5),
+                 check.names=FALSE) 
+df
+CR <- gvisColumnChart(df, options=list(vAxis='{baseline:0}', 
+                            title="Combined Ratio %",
+                            legend="{position:'bottom'}"))
+@ 
+<<eval=FALSE>>=
+plot(CR)
+@ 
+\begin{figure}[t]
+  \centering
+  \includegraphics[width=0.5\textwidth]{./figures/Apostrophe.pdf}
+  \caption{Visualising data with apostrophes in column names.}
+  \label{fig:apostrophes}
+\end{figure}
+
+\section{Embedding \googleVis in web sites}
+
+\subsection{Integrating \texttt{gvis} objects in existing sites}
+
+Suppose you have an existing web page and would like to integrate the
+output of a \googleVis function, such as \texttt{gvisMotionChart}. 
+In this case you only need the chart output from
+\texttt{gvisMotionChart}.  So you can either copy and paste the output
+from the R console
+<<eval=FALSE>>=
+print(M, 'chart')  ## or cat(M$html$chart) 
+@ or the browser, see previous section, 
+into your existing html page, or write the content directly into a file
+<<eval=FALSE>>=
+print(M, 'chart', file='myfilename')
+@
+and process it from there.
+
+\subsection{Using \googleVis output with WordPress}
+
+\href{http://wordpress.org/}{WordPress} is a popular web software for
+creating websites and blogs. Here we give some tips about the
+usage with \googleVis output.  
+
+By default WordPress does not allow JavaScript code (and hence \googleVis
+output) to be inserted into a page. However, additional plugins
+allow you to extend the functions of WordPress.
+
+One option of embedding JavaScript code inside a WordPress post is to use
+the ``custom fields shortcode''
+plugin\footnote{\url{http://wordpress.org/extend/plugins/custom-fields-shortcode}}. 
+The plugin allows you to create a custom field for the \googleVis
+code, which can be referred to in your article.
+
+Suppose you created a motion chart in R:
+<<eval=FALSE>>=
+M <- gvisMotionChart(Fruits, "Fruit", "Year",
+		     options=list(width=400, height=370))
+@
+Copy the chart code, e.g. from
+<<eval=FALSE>>=
+print(M, 'chart')
+@ 
+and paste it into the value text area of a custom field in WordPress, e.g.
+with instance name \texttt{Fruits}.  To include the motion chart into your article add
+\texttt{[cf]Fruits[/cf]} into the post, see Figure~\ref{wordpress} for
+an illustration.
+
+\begin{figure}[t]
+  \centering
+  \includegraphics[width=0.8\textwidth]{./figures/CreatePost.pdf}
+  \caption{Including \googleVis output in a WordPress blog entry.}
+  \label{wordpress}
+\end{figure}
+
+
+\subsection{Using \googleVis output with Google Sites, Blogger, etc.}
+
+Google Charts can be used with other Google products such as Google
+Sites, Blogger or Google Code wiki pages. 
+However, in most cases, the chart has to be embedded as a Google Gadget.
+Google Gadgets are written in XML and can have HTML and Javascript components.
+Here is an example of a 'Hello World' program written using Google
+Gadget technology from \href{http://en.wikipedia.org/wiki/Google_Gadgets}{Wikipedia}.
+\begin{verbatim}
+<?xml version="1.0" encoding="UTF-8" ?> 
+<Module>  
+<ModulePrefs title="simple hello world example" />   
+<Content type="html">     
+     <![CDATA[ 
+       Hello, world!
+     ]]>
+</Content> 
+</Module>
+\end{verbatim}
+The \googleVis package comes with the function
+\texttt{createGoogleGadget}, which takes a gvis-object and
+wraps it into an XML gadget file. Here is an example with a motion chart:
+<<>>=
+M <- gvisMotionChart(Fruits, "Fruit", "Year")
+G <- createGoogleGadget(M)
+@ 
+<<eval=FALSE>>=
+cat(G, file="myGadget.xml")
+@ 
+In order to use the gadget, the file \texttt{myGadget.xml} has to be
+hosted online, e.g. using Google Docs. 
+Suppose the URL to the gadget is
+\texttt{http://example.com/myGadget.xml}, than you can embed  the gadget
+
+\begin{itemize}
+
+\item in a Google Site via the menu:
+  
+  "Insert" -> "More gadgets ..." -> "Add gadget URL",
+  
+\item in a Google Code wiki via the \texttt{wiki:gadget} tag, e.g.: 
+  
+  \texttt{<wiki:gadget url="http://example.com/gadget.xml" />},
+
+ \item in Blogger via the design tab, see site gadgets.
+\end{itemize}
+
+However, the situation is different again, if you would like to include the \googleVis
+output into a blogger post.  In this case, a gadget does not
+work. You can either copy and paste the chart directly into your
+post, but then it does not seem to work with MS Internet Explorer, or
+you use an indirect approach. This means that the \googleVis
+chart has to be hosted on a separate page (e.g. in a public web
+folder) and is embedded into the blog post by using the
+\texttt{<iframe>} tag, e.g.: 
+\begin{verbatim}
+<iframe width="100%" height="400px" frameborder="0" 
+src="http://example.com/myGoogleVisChart.html">
+</iframe>
+\end{verbatim}
+For an example see the following blog entry:
+\href{http://www.magesblog.com/2011/09/including-googlevis-output-into-blogger.html}
+{http://www.magesblog.com/2011/09/including-googlevis-output-into-blogger.html}.
+
+
+
+\subsection{Embedding \googleVis in web sites dynamically}
+
+In this section, we provide examples how the \googleVis functions can be
+embedded into web pages dynamically. 
+
+The R packages \rsp~\cite{Rsp} and \brew~\cite{brew2010} are two
+options to integrate R snippets into HTML code. While the \rsp package
+comes with its own internal web server, \brew requires the Apache HTTP
+server~\cite{Apache2.0} with the \rapache~\cite{Rapache} module
+installed. Please note that currently the \rapache module only runs on
+UNIX/Linux and Mac OS X.   
+
+Since version 2.11.0 R ships with its own internal web server and with
+\Rook~\cite{Rook} and \shiny~\cite{shiny} there are also two 
+alternatives that use this facility. Both packages allow users to
+deploy web application locally with very little overhead. The \shiny
+framework is the newest and certainly easiest option to 
+get started with web apps using R and \googleVis.
+
+\subsubsection{Using \googleVis with \rsp}\label{rspexample}
+The \rsp package allows the user to integrate R code into html code.
+The R code is parsed by the \rsp web server and executed
+at run time. 
+
+As an example, we embed a motion chart into a rsp-page: 
+\begin{verbatim}
+<html>
+<body>
+<% library(googleVis)
+   M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year") %>
+<%= M$html$chart %>
+</body>
+</html>
+\end{verbatim}
+The R code included in \texttt{<\%$\dots$\%>} is executed when read by
+the R.rsp HTTP server, but no R output will be displayed. To embed the
+R output into the html code we have to add an equal sign,
+\texttt{<\%=$\dots$\%>}, which acts as a \texttt{cat} statement.
+
+\subsubsection{Using \googleVis with \rapache and \brew}\label{rapacheexample}
+
+\rapache supports web application development using
+R and the Apache HTTP server. The  \rapache module
+embeds the R interpreter into the Apache web server.  However, as we
+would like to mix R and HTML code we also need a parser and
+this is where the R package \brew comes into place. 
+
+Files sitting in a dedicated \brew folder of the HTTP repository are
+parsed by \brew when opened in the browser. The R code is 
+executed with \rapache and the output is embedded into the site.
+Hence the approach is similar to \rsp with the difference that the
+two tasks are split. This has the advantage that R does not have to
+run in a separate window.
+
+Detailed installation instructions for \rapache are available on the
+project site: 
+\href{http://rapache.net/manual.html}{http://\-rapache.\-net/\-manual\-.html},
+for specific comments on Mac OS X see: 
+\href{http://worldofrcraft.blogspot.com/2010/08/installing-rapache-on-mac-os-x-snow.html}{http://\-worldofrcraft\-.blog\-spot\-.com/\-2010/\-08/\-installing\--rapache\--on\--mac\--os\--x\--snow\-.html}  
+
+Following the installation of \rapache you will have to configure Apache.
+Most likely you have to add something along the following lines to your
+\path{apache2.conf} or \path{httpd.conf} file (often found in
+\path{/etc/httpd} or \path{/private/etc/apache2/httpd.conf} on Mac OS X):
+\begin{verbatim}
+LoadModule R_module /usr/lib/apache2/modules/mod_R.so
+## On Mac OS X more likely to be:
+## LoadModule R_module libexec/apache2/mod_R.so
+ROutputErrors
+RSourceOnStartup "/var/www/rapache/R/startup.R"
+## On Mac OS X the www folder is often equivalent to:
+## /Library/WebServer/Documents/
+\end{verbatim}
+The first line loads the R module when the Apache web server is
+started, the second line deals with error handling, while
+the \path{startup.R} file is suitable for initial
+set ups, e.g. libraries and global variables:
+\begin{verbatim}
+## Ensure the packages are installed so that mod_R 
+## has access to them, e.g. not in your home folder
+library{googleVis} 
+library{lattice}
+library{Cairo}
+MyGlobalVar <- 42
+\end{verbatim}
+
+To test that \rapache is working open
+\href{http://localhost/RApacheInfo}{http://\-localhost/\-RApacheInfo} and
+you should find details about your system, an example can be found on
+the \rapache site:
+\href{http://biostat.mc.vanderbilt.edu/rapache/files/RApacheInfo.html}{http://\-biostat.\-mc.\-vanderbilt.\-edu/\-rapache/\-files/\-RApacheInfo\-.html} 
+
+The next step is to install the \brew R package in the usual way:
+<<eval=FALSE>>=
+install.packages('brew')
+@
+Following this we have to tell Apache that files in a specific folder
+should be parsed by \textbf{\texttt{brew}}. Again we edit the \path{apache2.conf} or
+\path{httpd.conf}  and add the connection of the RHandler with the function \path{brew}:
+\begin{verbatim}
+<Directory /var/www/rapache/brew>
+## On Mac OS more likely to be something like:
+## <Directory /Library/WebServer/Documents/rapache/brew>
+      SetHandler r-script
+      RHandler brew::brew
+</Directory>
+\end{verbatim}
+
+That's all. Restart the HTTP daemon and you can start placing files in
+the \brew directory and access them via
+\path{http://localhost/rapache/brew/filename}, e.g. a file containing:  
+\begin{verbatim}
+<html>
+<body>
+<h1>Fruits</h1>
+<% library(googleVis)
+   M <- gvisMotionChart(Fruits, idvar="Fruit", timevar="Year") %>
+<%= M$html$chart %>
+</body>
+</html>
+\end{verbatim}
+
+You will notice that the  \brew syntax is very similar to \texttt{rsp}.
+For more information read the documentation of the \rapache
+module and \brew package. 
+You find two simple examples of brew files in the \googleVis
+package. Again the following R command shows you the 
+folder path:
+<<eval=FALSE>>=
+system.file("brew", package = "googleVis")
+@ 
+
+\subsubsection{Using \googleVis with \Rook}
+
+\Rook~\cite{Rook} is a web server interface for R, written by Jeffrey Horner, the author 
+of rApache and brew. Compared to other web frameworks \Rook appears incredibly lightweight.
+\Rook doesn't need any configuration. It is an R package, which works out of the box with the R HTTP 
+server. That means no configuration files are needed. No files have to be placed 
+in particular folders. Instead, \Rook web applications can be run on a local desktop. 
+However, \Rook requires some knowledge of the HTTP protocol. 
+
+Here is a \Rook app example with \texttt{googleVis}. It displays a little R data frame in a 
+\googleVis table by default. 
+The user can change the visualisation by clicking on the \emph{Edit me!} button 
+and upload her/his own CSV-file, see Figure~\ref{fig:Rook}. 
+
+\begin{figure}[ht]
+  \centering
+  \includegraphics[width=0.8\textwidth]{./figures/Rook.pdf}
+  \caption{Screen shot of a Rook app with \googleVis output.}
+  \label{fig:Rook}
+\end{figure}
+
+<<eval=FALSE>>=
+require(Rook)
+require(googleVis)
+s <- Rhttpd$new()
+s$start(listen='127.0.0.1')
+
+my.app <- function(env){
+ ## Start with a table and allow the user to upload a CSV-file
+  req <- Request$new(env)
+  res <- Response$new()
+
+  ## Provide some data to start with
+  ## Exports is a sample data set of googleVis
+  data <- Exports[,1:2] 
+  ## Add functionality to upload CSV-file
+  if (!is.null(req$POST())) {
+    ## Read data from uploaded CSV-file
+   data <- req$POST()[["data"]]
+   data <- read.csv(data$tempfile)
+  }
+  ## Create table with googleVis
+  tbl <- gvisTable(data, 
+                   options=list(gvis.editor="Edit me!",
+                                height=350),
+                                chartid="myInitialView")
+  ## Write the HTML output and
+  ## make use of the googleVis HTML output.
+  ## See vignette('googleVis') for more details
+  res$write(tbl$html$header) 
+  res$write("<h1>My first Rook app with googleVis</h1>")
+  res$write(tbl$html$chart)
+  res$write('
+Read CSV file:<form method="POST" enctype="multipart/form-data">
+<input type="file" name="data">
+<input type="submit" name="Go">\n</form>')            
+  res$write(tbl$html$footer)
+  res$finish()
+}
+s$add(app=my.app, name='googleVisTable')
+## Open a browser window and display the web app
+s$browse('googleVisTable')
+@
+
+\subsubsection{Using \googleVis with \shiny}
+Shiny\footnote{\url{http://www.rstudio.com/shiny/}} is a package by
+RStudio. Shiny makes it incredibly easy to build interactive web
+applications with R.  
+
+With version 0.4.0 of \googleVis the support for \shiny ~\cite{shiny}
+apps has been added. Joe Cheng contributed the \texttt{renderGvis}
+function which allows users to use \googleVis output in \shiny in a
+similar way to other plotting functions. Note that \shiny version
+$\ge$ 0.4.0 is required.
+
+The following example has been taken from the help file of
+\texttt{renderGvis}. It displays a scatter chart where the user can
+select the data set to be displayed, see also the screen shot in
+Figure~\ref{fig:shiny}. 
+
+<<eval=FALSE>>=
+# server.R
+library(googleVis)
+
+shinyServer(function(input, output) {
+  datasetInput <- reactive({
+    switch(input$dataset,
+           "rock" = rock,
+           "pressure" = pressure,
+           "cars" = cars)
+  })
+  
+  output$view <- renderGvis({
+    gvisScatterChart(datasetInput())
+  })
+})
+
+# ui.R
+shinyUI(pageWithSidebar(
+  headerPanel("googleVis on Shiny"),
+  sidebarPanel(
+    selectInput("dataset", "Choose a dataset:", 
+                choices = c("rock", "pressure", "cars"))
+  ),
+  mainPanel(
+    htmlOutput("view")
+  )
+))
+@ 
+
+\begin{figure}[ht]
+  \centering
+  \includegraphics[width=0.8\textwidth]{./figures/shiny.pdf}
+  \caption{Screen shot a \shiny app with \googleVis output.}
+  \label{fig:shiny}
+\end{figure}
+
+You can run the example locally with the following statement.
+<<eval=FALSE>>=
+library(shiny) ## Version >= 0.4.0 required
+runApp(system.file("shiny/", package="googleVis"))
+@ 
+
+Further examples have been published on Markus' blog:
+\url{http://www.magesblog.co.uk/search/label/shiny} 
+
+\section{Using \googleVis with \knitr}\label{sec:knitr}
+Using \googleVis with
+\knitr\footnote{\url{http://yihui.name/knitr/}}~\cite{knitr} is a
+convenient way of creating interactive reproducible reports. The
+approach taken by \knitr is similar to Sweave, you can combine R
+code with text and formatting tags. However, \knitr can also export to
+HTML, which is required to  embed \googleVis charts.
+
+To include \googleVis output into a \knitr document you have 
+to set the chunk option \texttt{results} to \texttt{'asis'} and print the chart 
+element only, as demonstrated in the following example:
+\begin{verbatim}
+```{r results='asis'}
+M <- gvisMotionChart(Fruits, "Fruit", "Year",
+                     options=list(width=550, height=450))
+print(M, 'chart')
+```
+\end{verbatim}
+A little example was published in a blog post: 
+\url{http://www.magesblog.co.uk/2012/05/interactive-reports-in-r-with-knitr-and.html}
+
+Version 0.3.2 of \googleVis introduced \texttt{'tag'} as a new argument to
+the plot function \texttt{plot.gvis}, see also
+page~\pageref{sec:Options}. This argument is by default set to
+\texttt{NULL} and can be set globally outside the plot function via
+\texttt{options()}.  
+
+The argument \texttt{tag} influences the behaviour of the plot
+function. The \texttt{tag} parameter can be the same as for the print
+function \texttt{print.gvis}. Indeed, setting
+\texttt{options(gvis.plot.tag = 'chart')} will change the behaviour of
+plot to print, so \texttt{plot(x)} will no longer open a browser
+window, but produce the same output as \texttt{print(x, tag='chart')},
+if \texttt{x} is a gvis-object. 
+
+Hence, setting the option \texttt{gvis.plot.tag} in a \knitr markdown
+Rmd-file to \texttt{'chart'} will automatically turn all following
+plot statements into html output, see the example below and Figure~\ref{fig:markdown}. 
+
+\begin{figure}[ht]
+  \centering
+  \includegraphics[width=0.7\textwidth]{./figures/MarkdownExample.pdf}
+  \caption{Screen shot of the markdown  example output} 
+  \label{fig:markdown}
+\end{figure}
+
+\begin{verbatim}
+# Markdown example with knitr and googleVis
+===========================================
+This is a little Markdown example file.
+Set the googleVis options first.
+In this case change the behaviour of plot.gvis
+```{r setOptions, message=FALSE}
+library(googleVis)
+op <- options(gvis.plot.tag='chart')
+```
+The following plot statements will automatically return  the HTML
+required for the 'knitted' output. 
+
+## Combo chart
+```{r ComboExample, results='asis', tidy=FALSE}
+## Add the mean
+CityPopularity$Mean=mean(CityPopularity$Popularity)
+CC <-  (CityPopularity, xvar='City',
+          yvar=c('Mean', 'Popularity'),
+          options=list(seriesType='bars',
+                       width=450, height=300,
+                       title='City Popularity',
+                       series='{0: {type:\"line\"}}'))
+plot(CC)
+```
+Example of gvisComboChart with R code shown above.
+
+## Place two charts next to each other
+```{r gvisMergeExample, results='asis', echo=FALSE}
+Geo <- gvisGeoChart(Exports, locationvar='Country', colorvar='Profit', 
+                    options=list(height=300, width=350)) 
+Tbl <- gvisTable(Exports, options=list(height=300, width=200))
+plot(gvisMerge(Geo, Tbl, horizontal=TRUE))
+``````
+Example of a gvisGeoChart with gvisTable and R code hidden.
+
+## Motion Chart
+```{r MotionChartExample, results='asis', tidy=FALSE}
+M <- gvisMotionChart(Fruits, 'Fruit', 'Year',
+         options=list(width=400, height=350))
+plot(M)
+```
+Please note that the Motion Chart is only displayed when hosted on a
+web server, or is placed in a directory which has been added to the 
+trusted sources in the [security settings of Macromedia]
+(http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html). 
+See the googleVis package vignette for more details. 
+
+```{r resetOptions}
+## Set options back to original options
+options(op)
+```
+\end{verbatim}
+
+Note that you can use the \texttt{options()} command in your \knitr
+file to switch between an interactive mode, where you are likely to
+experiment, via copying and pasting R code into the console and
+running \texttt{knit} on the whole file.
+
+A more comprehensive example is given in the help file to \texttt{?plot.gvis}.
+
+\section{Using \googleVis in presentations}\label{sec:presentations}
+
+The Google Chart Tools are designed for web pages, so it should
+be no surprise that it can be difficult or impossible to embed \googleVis 
+output in traditional presentation software like MS PowerPoint\footnote{For 
+MS PowerPoint on MS Windows the plug-in
+\href{http://skp.mvps.org/liveweb.htm}{liveweb} provides the
+  functionality to insert web pages into a PowerPoint slide and
+  refresh the pages real-time during slide show.}, Google Docs,
+OpenOffice Impress or Apple Keynote. 
+
+The easiest way is to include screen shots into the slide with links to
+the live web pages. But this approach requires the presenter to switch
+between applications during her talk. This can be fun, but quite often
+it is not. 
+
+An alternative would be to build the presentation as a web page itself.  
+
+A popular approach here is the \texttt{slidify} package by Ramnath Vaidyanathan, 
+\cite{slidify} that builds on the knitr Markdown approach of the previous 
+section. An example of a \texttt{slidify} presentation is the \googleVis 
+tutorial given at the useR! conference in 2013, \cite{googleVisTutorial}.
+
+\begin{figure}[h]
+  \centering
+  \includegraphics[width=0.5\textwidth]{./figures/googleVisTutorial2013.png}
+  \caption{\googleVis tutorial at the useR! 2013 conference: \url{http://decastillo.github.io/googleVis_Tutorial}} 
+  \label{fig:slidify}
+\end{figure}
+
+Slidify provides a choice of different layout frameworks and syntax highlighting options. Additionally, slidify slides can be published from R online, e.g. 
+on GitHub.
+% 
+% \section{Using \googleVis with RStudio}
+% 
+% RStudio is popular a free and open source integrated development environment 
+% for R. With verion 0.98.441 RStudio introduced a viewer pane that allows users 
+% to display HTML files within RStudio's IDE.
+% 
+% \googleVis will use the Viewer pane in RStudio (version >= 0.98.441) 
+% to display non-Flash charts by default. Flash charts and merged gvis-objects are
+% displayed in the default browser. The setting is controlled
+% via the option \texttt{googleVis.viewer}. By default it will have
+% the value of \texttt{getOption("viewer")}.
+% 
+% Set \texttt{options("googleVis.viewer"=NULL)} and the googleVis
+% plot function will open all output in the standard browser.
+% 
+
+\section{Beyond R}
+In this section we present ideas which go beyond the usual coding in
+R and are somewhat experimental.
+
+\subsection{Registering to catch events}
+
+Google visualisations can fire and receive
+events~\footnote{\url{http://code.google.com/apis/chart/interactive/docs/reference.html\#addlistener}}. 
+It exposes the following two JavaScript methods: 
+\begin{itemize}
+\item \texttt{google.visualization.events.trigger()} fires an event,
+\item \texttt{google.visualization.events.addListener()} listens for events.
+\end{itemize}
+
+Here is an example of registering to receive the selection event from
+the Google documentation:
+\begin{verbatim}
+var table = new google.visualization.Table(document.getElementById('table_div'));
+table.draw(data, options);
+google.visualization.events.addListener(table, 'select', selectHandler);
+
+function selectHandler() {
+  alert('A table row was selected');
+}
+\end{verbatim}
+
+We will only deal with this special case of a 'select' event of the
+'addListner' method. This event is available for most visualisations
+and acts on user interactions, e.g. user selection clicks.
+
+The 'addListener' method expects JavaScript code, which can be embedded
+into a gvis-object via \texttt{options} as (undocumented) parameter
+\texttt{gvis.listener.jscode}. 
+
+Here are some examples:
+
+Look up the selected item in Wikipedia:
+<<eval=FALSE>>=
+jscode <- "window.open('http://en.wikipedia.org/wiki/' 
+                  + data.getValue(chart.getSelection()[0].row,0)); "
+
+J1 <- gvisGeoMap(Exports, locationvar='Country', numvar='Profit',
+                 options=list(dataMode="regions", gvis.listener.jscode=jscode))
+plot(J1)
+@ 
+In the same way we can use the code in other charts, e.g. org- or line chart:                 
+<<eval=FALSE>>=
+plot(gvisOrgChart(Regions,  options=list(gvis.listener.jscode=jscode)))
+plot(gvisLineChart(Regions[,c(1,3)], options=list(gvis.listener.jscode=jscode)))
+@
+In the following more advanced example the selected value of a table is
+displayed in a message box:
+<<eval=FALSE>>=
+jscode <- "
+       var sel = chart.getSelection();
+       var row = sel[0].row;
+       var text = data.getValue(row,1);
+       alert(text);
+"
+J2 <- gvisTable(Population, options=list(gvis.listener.jscode=jscode))
+plot(J2)
+@ 
+For more details see the \texttt{demo(EventListener)} and
+\href{https://developers.google.com/chart/interactive/docs/reference}{Google
+  Charts Reference}.
+
+\section{Frequent ask questions -- FAQ}
+\subsection{Can I use googleVis output in PDF files?}
+No, not directly. 
+
+The Google Charts API is designed for dynamic web
+output on your screen and not on paper. See also the
+section~\ref{sec:presentations}, page~\pageref{sec:presentations},
+which covers how to use \googleVis in presentations. 
+
+Note that this vignette uses screen shots to include
+examples of \googleVis charts.
+
+For further details see Google's online documentation on 
+\href{https://developers.google.com/chart/interactive/docs/printing}{printing 
+PNG charts}.
+
+\subsection{Can I change the colour of the bubbles in motion charts?}
+
+No, unfortunately not.
+
+The colours are set by the Google Charts API and cannot be changed
+by the user.
+
+\subsection{Can I change the icons in Maps?}
+
+No, not via \texttt{gvisMap}.
+
+However, you can upload your data to a Google Fusion Table and link it
+to a second table which defines the icons. See the Google Fusion Table
+support page for more details: \url{http://support.google.com/fusiontables/answer/2679986?hl=en}
+
+\subsection{Why can't I see motion charts when I open them from a local directory?}
+
+See section~\ref{sec:DisplayLocally} on page~\pageref{sec:DisplayLocally}
+
+\subsection{Why can't I see motion charts on my iPad/iPhone?}
+
+Motion charts (also geo maps and annotated time lines) are rendered in
+your browser using Flash, unlike most other charts which use
+HTML5. Unfortunately, Flash is not directly supported on iOS devices
+such as iPads and iPhones. 
+
+\subsection{How can I set axes limits with googleVis?}
+
+Unfortunately, there are no arguments such as \texttt{ylim} and \texttt{xlim}. 
+Instead, the Google Charts axes options are set via \texttt{hAxes} and 
+\texttt{vAxes}, with h and v indicating the horizontal and vertical axis. 
+More precisely, we have to set  \texttt{viewWindowMode : 'explicit'} and set 
+the \texttt{viewWindow} to the desired min and max values. 
+Additionally, we have to wrap all of this in $[\{\}]$ brackets as those 
+settings are sub-options of \texttt{h/vAxes}. 
+There are also options \texttt{minValue} and \texttt{maxValue}, 
+but they only allow you to extend the axes ranges.
+
+Here is a minimal example, setting the y-axis limits from 0 to 10:
+<<eval=FALSE>>=
+library(googleVis)
+dat <- data.frame(x=LETTERS[1:10], 
+                  y=c(0, 4, -2, 2, 4, 3, 8, 15, 10, 4))
+area1 <- gvisAreaChart(xvar="x", yvar="y", data=dat,
+    	options=list(vAxes="[{viewWindowMode:'explicit',
+			viewWindow:{min:0, max:10}}]",
+                        width=500, height=400, 
+                        title="y-limits set from 0 to 10"),
+			chartid="area1ylim")
+plot(area1)
+@
+
+\subsection{How can I change the look and feel of the charts?}
+
+The charts have a lot of options which allow you to change the look
+and feel of the output, see the help files for more details. However,
+\googleVis provides only an interface to the Google Charts API. If
+you have specific questions to the charts then please join the Google
+Visualisation API newsgroup: 
+\url{http://groups.google.com/group/google-visualization-api}.
+
+For frequent ask questions regarding the API check: 
+\url{https://developers.google.com/chart/interactive/faq}.
+
+\subsection{Is it possible to use \googleVis in corporate work?}
+Review the Google Terms of Service
+(\url{https://developers.google.com/terms/}) and get in touch with
+your colleagues in IT / Legal. If in doubt contact Google
+directly. 
+
+\subsection{Bugs and issues}
+
+Should you find any issues or bugs with googleVis, then please drop
+us a line or add them to our issues list: 
+\url{https://github.com/mages/googleVis/issues}
+
+
+\subsection{Citation}
+Please cite R and \googleVis if you use it in your work or publications. Use
+<<eval=FALSE>>=
+citation("googleVis")
+@
+and
+<<eval=FALSE>>=
+citation()
+@ 
+for  bib-entries and information on how to cite the software.
+
+%%\clearpage
+
+\bibliographystyle{alpha}
+\bibliography{googleVis}
+\addcontentsline{toc}{section}{References} 
+
+\end{document}
diff --git a/vignettes/googleVis.bib b/vignettes/googleVis.bib
new file mode 100644
index 0000000..8dd45c2
--- /dev/null
+++ b/vignettes/googleVis.bib
@@ -0,0 +1,382 @@
+
+ at misc{JuiceAnalytics,
+	Author = {Juice Inc. },
+	Date-Added = {2010-07-27 21:38:39 +0100},
+	Date-Modified = {2010-10-17 09:13:51 +0100},
+	Keywords = {Motion Chart},
+	Lastchecked = {2010/07/27},
+	Title = {Juice Analytics},
+	Howpublished = {\url{http://www.juiceanalytics.com/writing/better-know-visualization-motion-charts/}},
+	Year = {2010}}
+
+ at Article{jsonlite,
+    title = {The jsonlite Package: A Practical and Consistent Mapping
+      Between JSON Data and R Objects},
+    author = {Jeroen Ooms},
+    journal = {arXiv:1403.2805},
+    year = {2014},
+    url = {http://arxiv.org/abs/1403.2805},
+  }
+
+ at misc{GapminderData,
+	Author = {Gapminder},
+	Date-Added = {2010-07-27 21:37:06 +0100},
+	Date-Modified = {2010-10-17 09:11:57 +0100},
+	Keywords = {Gapminder, data},
+	Lastchecked = {2010/07/27},
+	Title = {Gapminder Data},
+	Howpubished = {\url{https://www.gapminder.org/data/}},
+	Year = {2010}
+	}
+
+ at misc{Gapminder,
+	Author = {Gapminder Foundation},
+	Date-Added = {2010-07-27 21:36:12 +0100},
+	Date-Modified = {2010-10-17 09:11:47 +0100},
+	Keywords = {Gapminder},
+	Lastchecked = {2010/07/27},
+	Title = {Gapminder},
+	Howpublished = {\url{http://www.gapminder.org}},
+	Year = {2010}
+	}
+
+ at misc{HansRoslingTedTalk,
+	Author = {Hans Rosling},
+	Keywords = {Hans Rosling, Gapminder, Ted Talk},
+	Organization = {TED Talk},
+	Title = {{TED} {T}alk: Hans {R}osling shows the best stats you've ever seen},
+	Howpublished = {\url{http://www.ted.com/talks/hans_rosling_shows_the_best_stats_you_ve_ever_seen.html}},
+	Year = {2006}}
+
+ at misc{GoogleVisApi,
+	Author = {Google Inc.},
+	Date-Added = {2010-07-27 21:33:19 +0100},
+	Date-Modified = {2010-10-17 09:12:06 +0100},
+	Keywords = {Google, Visualisation, API},
+	Lastchecked = {2010/07/27},
+	Title = {Google {C}hart {T}ools},
+	Howpublished = {\url{https://google-developers.appspot.com/chart/interactive/docs/gallery}},
+	Year = {2012}}
+
+ at misc{GoogleMotionChart,
+	Author = {Google Inc.},
+	Keywords = {Google, Motion Chart, Api},
+	Title = {Google {M}otion {C}hart {A}{P}{I}},
+	Howpublished = {\url{https://google-developers.appspot.com/chart/interactive/docs/gallery/motionchart.html}},
+	Year = {2012}}
+
+
+ at misc{GoogleGeoMap,
+	Author = {Google Inc.},
+	Keywords = {Google, Geo Map, Api},
+	Title = {Google {G}eo {M}ap {A}{P}{I}},
+	Howpublished = {\url{https://google-developers.appspot.com/chart/interactive/docs/gallery/geomap.html}},
+	Year = {2012}}
+
+ at misc{GoogleMap,
+	Author = {Google Inc.},
+	Keywords = {Google, Map, Api},
+	Title = {Google {G}eo {A}{P}{I}},
+	Howpublished = {\url{https://google-developers.appspot.com/chart/interactive/docs/gallery/map.html}},
+	Year = {2012}}
+
+ at misc{GoogleTable,
+	Author = {Google Inc.},
+	Keywords = {Google, Table, Api},
+	Title = {Google {T}able {A}{P}{I}},
+	Howpublished = {\url{https://google-developers.appspot.com/chart/interactive/docs/gallery/table.html}},
+	Year = {2012}}
+
+ at misc{GoogleTreeMap,
+	Author = {Google Inc.},
+	Keywords = {Google, Tree Map, Api},
+	Title = {Google {T}ree {M}ap {A}{P}{I}},
+	Howpublished = {\url{https://google-developers.appspot.com/chart/interactive/docs/gallery/treemap.html}},
+	Year = {2012}}
+
+ at misc{GoogleAnnotatedTimeLine,
+	Author = {Google Inc.},
+	Keywords = {Google, Annotated Time Line, Api},
+	Title = {Google {A}nnotated {T}ime {L}ine {A}{P}{I}},
+	Howpublished = {\url{https://google-developers.appspot.com/chart/interactive/docs/gallery/annotatedtimeline}},
+	Year = {2012}}
+
+
+ at misc{GooglePublicData,
+	Howpublished = {\url{http://www.google.com/publicdata/directory}},
+	Author = {Google Inc.},
+	Date-Added = {2010-07-27 21:30:53 +0100},
+	Date-Modified = {2010-10-17 09:12:16 +0100},
+	Keywords = {public, data},
+	Lastchecked = {2010/07/27},
+	Title = {Google {P}ublic {D}ata {E}xplorer},
+	Year = {2012}}
+
+ at misc{DataTable,
+	Author = {Google Inc.},
+	Date-Modified = {2010-10-17 09:12:24 +0100},
+	Keywords = {Data},
+	Title = {Google {V}isualisation {R}eference},
+	Howpublished = {\url{https://developers.google.com/chart/interactive/docs/reference}},
+	Year = {2012}
+	}
+
+ at misc{Rapache,
+	Author = {Jeffrey Horner},
+	Date-Modified = {2011-01-12 16:57:00 +0100},
+	Keywords = {R, rapache},
+	Title = {{RA}pache: {W}eb application development with {R} and {A}pache.},
+	Howpublished = {\url{http://rapache.net}},
+	Year = {2011}
+	}
+
+ at misc{Rsp,
+	Author = {Henrik Bengtsson},
+	Date-Modified = {2010-10-17 09:08:26 +0100},
+	Keywords = {R, Rsp},
+	Note = {R package version 0.8.2},
+	Title = {R.rsp: R Server Pages},
+	Howpublished = {\url{https://CRAN.R-project.org/package=R.rsp}},
+	Year = {2012}
+	}
+
+ at misc{RJSONIO,
+	Author = {Duncan Temple Lang},
+	Date-Modified = {2010-10-17 09:06:48 +0100},
+	Keywords = {json, R},
+	Note = {R package version 1.0-1},
+	Title = {{RJSONIO}: Serialize {R} objects to {J}{S}{O}{N}, {J}ava{S}cript {O}bject {N}otation},
+	Howpublished = {\url{http://www.omegahat.net/RJSONIO/}},
+	Year = {2012},
+	Bdsk-Url-1 = {http://www.omegahat.net/RJSONIO/}}
+
+ at manual{Saaibi2010,
+	Address = {https://www.rmetrics.org/},
+	Author = {Sebasti\'{a}n P\'{e}rez Saaibi},
+	Date-Modified = {2010-10-17 09:07:55 +0100},
+	Keywords = {Talk },
+	Note = {Meielisalp, Lake Thune Switzerland, June 27 - July 1, 2010},
+	Organisation = {Curriculum for Scientific Computing, ETH Zurich, CH},
+	Title = {{R}/{RMETRICS} {G}enerator {T}ool for {G}oogle {M}otion {C}harts},
+	Year = {2010}
+	}
+
+ at manual{Roosen2010,
+	Author = {Charles Roosen},
+	Date-Modified = {2010-10-17 09:06:37 +0100},
+	Keywords = {Talk, Rsp},
+	Note = {Meielisalp, Lake Thune Switzerland, June 27 - July 1, 2010},
+	Organisation = {Mango Solutions, Chippenham, UK},
+	Title = {Mainstream Application Development with R/RMETRICS},
+	Year = {2010}
+	}
+
+ at misc{Flash,
+	Author = {Adobe Systems Incorporated},
+	Date-Modified = {2010-10-17 09:11:29 +0100},
+	Keywords = {Flash},
+	Title = {Adobe {F}lash {P}layer},
+	Howpublished = {\url{http://get.adobe.com/flashplayer/}}
+	}
+
+ at misc{json,
+	Author = {JSON.org},
+	Date-Modified = {2010-10-17 09:12:39 +0100},
+	Keywords = {json},
+	Note = {RFC 4627 application/json},
+	Title = {{JSON}},
+	Howpublished = {\url{http://www.json.org/}},
+	Year = {2006}
+	}
+
+ at misc{d3js,
+  Author = {Mike Bostock},
+  Title = {{D}ata-{D}riven {D}ocuments (D3.js), a visualization framework for internet browsers running {JavaScript}},
+  Howpublished = {\url{http://d3js.org}},
+  Year = {2012}
+  }
+  
+ at misc{GoogleTerms,
+	Author = {Google Inc},
+	Keywords = {Terms of Use},
+	Title = {Google  {A}{P}{I} {T}erms of {S}ervice},
+        Year = {2012},
+	Howpublished = {\url{https://developers.google.com/terms/}}
+}
+
+ at misc{googleVis,
+	title = {google{V}is: Using the {G}oogle {C}harts {API} with {R}},
+	author = {Markus Gesmann and Diego de Castillo},
+	year = {2014},
+	note ={R package version 0.5.8},
+	Howpublished = {\url{http://github.com/mages/googleVis}}
+}
+
+ at misc{brew2010,
+    title = {brew: Templating Framework for Report Generation},
+    author = {Jeffrey Horner},
+    year = {2011},
+    note = {R package version 1.0-6},
+    Howpublished = {\url{https://CRAN.R-project.org/package=brew}}
+  }
+
+
+
+ at inproceedings{Sweave2002,
+  author = {Friedrich Leisch},
+  title = {Sweave: Dynamic Generation of Statistical Reports Using
+		  Literate Data Analysis},
+  booktitle = {Compstat 2002 --- Proceedings in Computational
+		  Statistics},
+  pages = {575--580},
+  year = 2002,
+  editor = {Wolfgang H{\"a}rdle and Bernd R{\"o}nz},
+  publisher = {Physica Verlag, Heidelberg},
+  note = {ISBN 3-7908-1517-9},
+  url = {\url{http://www.stat.uni-muenchen.de/~leisch/Sweave}}
+}
+
+
+ at misc{Rinstall,
+	title = {R Installation and Administration},
+	author = {R Development Core Team},
+	year = {2012},
+	Howpublished = {\url{https://cran.r-project.org/doc/manuals/R-admin.html}}
+}
+
+ at misc{ManyEyes,
+	title = {Many Eyes},
+	author = {IBM Research and the IBM Cognos software group},
+	year = {2010},
+	Howpublished = {\url{http://www-958.ibm.com/software/data/cognos/manyeyes/}}
+}
+
+ at misc{OpenFlashChart,
+	title = {Open Flash Chart},
+	author = {John Glazebrook and Guenther Harrasser and George Neusse},
+	year = {2010},
+	Howpublished = {\url{http://teethgrinder.co.uk/open-flash-chart/}}
+}
+
+ at misc{OpenLayers,
+	title = {OpenLayers: Free Maps for the Web},
+	author = {Open Source Geospatial Foundation},
+	year = {2010},
+	Howpublished = {\url{http://www.openlayers.org/}}
+}
+
+ at misc{Processing,
+	title = {Processing an open source programming language and environment to create images, animations, and interactions},
+	author = {Ben Fry and Casey Reas},
+	year = {2010},
+	Howpublished = {\url{http://processing.org/}}
+}
+
+
+ at misc{Flare,
+	title = {flare: {D}ata visualisation for the web},
+	author = {{UC} Berkeley Visualization Lab.},
+	year = {2010},
+	Howpublished = {\url{http://flare.prefuse.org}}
+}
+
+ at Misc{Apache2.0,
+  key =  	{Apache2.2},
+  author =	{Apache {F}oundation},
+  title =	{Apache {HTTP S}erver 2.2},
+  year = 	{2010},
+  Howpublished = {\url{http://httpd.apache.org}},
+}
+
+ @Manual{gridSVG,
+    title = {gridSVG: Export grid graphics as SVG},
+    author = {Paul Murrell},
+    year = {2011},
+    note = {R package version 0.9-1},
+    url = {\url{https://CRAN.R-project.org/package=gridSVG}},
+  }
+
+  @Manual{webvis,
+    title = {webvis: Create graphics for the web from R.},
+    author = {Shane Conway},
+    year = {2011},
+    note = {R package version 0.0.2},
+    url = {\url{https://CRAN.R-project.org/package=webvis}},
+  }
+
+  @Manual{animation,
+    title = {animation: A Gallery of Animations in Statistics and Utilities to Create
+Animations},
+    author = {Yihui Xie},
+    year = {2012},
+    note = {R package version 2.0-6},
+    url = {https://CRAN.R-project.org/package=animation},
+  }
+
+  @Manual{RgoogleMaps,
+    title = {RgoogleMaps: Overlays on Google map tiles in R},
+    author = {Markus Loecher},
+    year = {2012},
+    note = {R package version 1.2.0},
+    url = {https://CRAN.R-project.org/package=RgoogleMaps},
+  }
+
+ @Manual{deck.js,
+    title = {deck.js: Modern {H}{T}{M}{L} Presentations},
+    author = {Caleb Troughton},
+    year = {2011},
+    note = {j{Q}uery framework for creating {HTML} presentations},
+    url = {http://imakewebthings.github.com/deck.js},
+  } 
+
+ at article{RJournal:2011-2:GesmannCastillo,
+  author = {Markus Gesmann and Diego de Castillo},
+  title = {{Using the Google Visualisation API with R}},
+  journal = {The R Journal},
+  year = 2011,
+  volume = 3,
+  number = 2,
+  pages = {40--44},
+  month = {December},
+  url = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Gesmann+de~Castillo.pdf}
+}
+
+ at Manual{knitr,
+    title = {knitr: A general-purpose package for dynamic report generation in R},
+    author = {Yihui Xie},
+    year = {2013},
+    note = {R package version 1.1},
+    url = {https://CRAN.R-project.org/package=knitr},
+  }
+
+ at Manual{Rook,
+    title = {Rook: Rook - a web server interface for R},
+    author = {Jeffrey Horner},
+    year = {2013},
+    note = {R package version 1.0-9},
+    url = {\url{https://CRAN.R-project.org/package=Rook}},
+  }
+
+  @Manual{shiny,
+    title = {shiny: Web Application Framework for R},
+    author = {{RStudio} and {Inc.}},
+    year = {2013},
+    note = {R package version 0.4.0},
+    url = {\url{http://www.rstudio.com/shiny/}},
+  }
+
+ at Manual{slidify,
+    title = {slidify: Generate reproducible html5 slides from R markdown},
+    author = {Ramnath Vaidyanathan},
+    year = {2012},
+    note = {R package version 0.3.3},
+    url = {http://ramnathv.github.com/slidify/},
+  }
+
+ at Manual{googleVisTutorial,
+  author = {Markus Gesmann and Diego de Castillo},
+  institution = {useR! 2013, University of Castilla-La Mancha, Albacete, Spain},
+  title = {googleVis Tutorial},
+  uowpublished = {\url{http://decastillo.github.io/googleVis_Tutorial}},
+  Year = {2013},
+  }
\ No newline at end of file
diff --git a/vignettes/googleVis_examples.Rmd b/vignettes/googleVis_examples.Rmd
new file mode 100644
index 0000000..629af3e
--- /dev/null
+++ b/vignettes/googleVis_examples.Rmd
@@ -0,0 +1,184 @@
+<!--
+%\VignetteEngine{knitr::knitr}
+%\VignetteIndexEntry{Demonstration of googleVis}
+-->
+# googleVis examples 
+===========================================
+
+It may take a little while to load all charts. Please be patient.
+All charts require an Internet connection.
+
+These examples are taken from the googleVis demo. 
+You can execute the demo via
+```{r demo, eval=FALSE}
+library(googleVis)
+demo(googleVis)
+```
+
+For more details about the charts and further examples see the 
+helpfiles of the individual googleVis function and review the 
+[Google Charts API documentation](https://developers.google.com/chart/interactive/docs/gallery) and [Terms of Service](https://developers.google.com/terms).
+
+## Line chart
+```{r setOptions, message=FALSE, echo=FALSE}
+library(googleVis)
+library(knitr)
+op <- options(gvis.plot.tag='chart')
+read_demo('googleVis', 'googleVis')
+```
+```{r testData, tidy=FALSE}
+```
+```{r LineChart, results='asis', tidy=FALSE}
+```
+
+### Line chart with two axis
+```{r TwoAxis, results='asis', tidy=FALSE}
+```
+
+## Bar chart
+```{r BarChart, results='asis', tidy=FALSE}
+```
+
+## Column chart
+```{r ColumnChart, results='asis', tidy=FALSE}
+```
+
+## Area chart
+```{r AreaChart, results='asis', tidy=FALSE}
+```
+
+## Stepped Area chart
+```{r SteppedAreaChart, results='asis', tidy=FALSE}
+```
+
+## Combo chart
+```{r ComboChart, results='asis', tidy=FALSE}
+```
+
+## Scatter chart
+```{r ScatterChart, results='asis', tidy=FALSE}
+```
+
+## Bubble chart
+```{r BubbleChart, results='asis', tidy=FALSE}
+```
+
+### Customizing Lines
+```{r CustomizingLines, results='asis', tidy=FALSE}
+```
+
+
+## Customizing points
+```{r ScatterChartPoints, results='asis', tidy=FALSE}
+```
+
+### Add edit button for on the fly customisation
+```{r EditButton, results='asis', tidy=FALSE}
+```
+The same option is available for all other charts as well.
+
+### A chart with many options set
+```{r SettingOptions, results='asis', tidy=FALSE}
+```
+
+## Candlestick chart
+```{r CandlestickChart, results='asis', tidy=FALSE}
+```
+
+## Pie chart
+```{r PieChart, results='asis', tidy=FALSE}
+```
+
+## Gauge
+```{r Gauge, results='asis', tidy=FALSE}
+```
+
+## Intensity Map
+```{r IntensityMap, results='asis', tidy=FALSE}
+```
+
+## Geo Chart
+```{r GeoChart, results='asis', tidy=FALSE}
+```
+
+### Example showing US data by state 
+```{r USStateData, results='asis', tidy=FALSE}
+```
+
+### Show Hurricane Andrew (1992) storm track with markers
+```{r GeoChartHurricaneAndrew, results='asis', tidy=FALSE}
+```
+
+## Google Maps
+```{r GoogleMapHurricaneAndrew, results='asis', tidy=FALSE}
+```
+
+## Table
+```{r Table, results='asis', tidy=FALSE}
+```
+Click on the column header to sort the rows 
+
+### Table with pages
+```{r TableWithPages, results='asis', tidy=FALSE}
+```
+
+## Org chart
+```{r OrgChart, results='asis', tidy=FALSE}
+```
+Double click on a parent to collapse all its children.
+
+## Tree Map 
+```{r TreeMap, results='asis', tidy=FALSE}
+```
+Left mouse-click to drill down, right mouse-click to move up a level.
+
+## Annotation chart 
+```{r AnnotationChart, results='asis', tidy=FALSE}
+```
+
+## Sankey chart
+```{r SankeyChart, results='asis', tidy=FALSE}
+```
+
+## Histogram
+```{r Histogram, results='asis', tidy=FALSE}
+```
+
+## Calendar chart
+```{r CalendarChart, results='asis', tidy=FALSE}
+```
+
+## Timeline chart
+```{r Timeline, results='asis', tidy=FALSE}
+```
+
+## Merging charts
+```{r gvisMerge, results='asis', tidy=FALSE}
+```
+
+# Flash charts
+All the following charts require a Flash player. 
+
+## Motion chart
+```{r MotionChart, results='asis', tidy=FALSE}
+```
+
+You can change some of displaying settings via the browser,
+e.g. the level of opacity of non-selected items, or the chart type.
+The state string from the 'Advanced' tab can be used to set those
+settings via R. Just copy and past the string from the browser into
+the argument state of the options list.
+Here is an example of a motion chart, with an initial line chart
+displayed. 
+
+```{r MotionChartSettings, results='asis', tidy=FALSE}
+```
+
+
+## Geo Map
+```{r GeoMap, results='asis', tidy=FALSE}
+```
+
+## Annotated time line chart
+```{r AnnotatedTimeLine, results='asis', tidy=FALSE}
+```
diff --git a/vignettes/mystyle.css b/vignettes/mystyle.css
new file mode 100644
index 0000000..ae86939
--- /dev/null
+++ b/vignettes/mystyle.css
@@ -0,0 +1,270 @@
+/* Based on mystyle.css by Winston Chang
+https://github.com/wch/R6/blob/master/vignettes/mystyle.css
+*/
+body {
+  background-color: #fff;
+  margin: 0 auto;
+  max-width: 800px;
+  float: center;
+  margin-left: auto;
+  margin-right: auto;
+  overflow: visible;
+}
+  body #header {
+    clear: both;
+    margin-bottom: 8px;
+    border-bottom: 2px solid #999;
+    font-size: 20px;
+    padding: 2px 10px 2px 25px;
+  }
+  body #content {
+    background-color: white;
+    clear: both;
+    float: left;
+    overflow: visible;
+    padding: 10px;
+    border: 1px solid #BBBBBB;
+    border-radius: 5px;
+    width: 780px;
+  }
+  body #footer {
+    background-color: #99BBDD;
+    clear: both;
+    float: left;
+    margin: 8px 0;
+    border: 1px solid #6688AA;
+    border-radius: 5px;
+    padding: 0 10px;
+    width: 780px;
+  }
+body .clear {
+  clear: both;
+  border-width: 0;
+  margin: 0;
+  visibility: hidden;
+}
+
+#TOC {
+  clear: both;
+  margin: 0 0 10px 10px;
+  padding: 4px;
+  width: 400px;
+  border: 1px solid #CCCCCC;
+  border-radius: 5px;
+
+  background-color: #f6f6f6;
+  font-size: 13px;
+  line-height: 16px;
+}
+  #TOC .toctitle {
+    font-weight: bold;
+    font-size: 15px;
+    margin-left: 5px;
+  }
+
+  #TOC ul {
+    padding-left: 40px;
+    margin-left: -1.5em;
+    margin-top: 5px;
+    margin-bottom: 5px;
+  }
+  #TOC ul ul {
+    margin-left: -2em;
+  }
+  #TOC li {
+    line-height: 16px;
+  }
+
+table {
+  margin-left: 25px;
+  border-width: 1px;
+  border-spacing: 0px;
+  border-style: outset;
+  border-color: gray;
+  border-collapse: collapse;
+}
+table th {
+  border-width: 1px;
+  padding: 5px;
+  border-style: inset;
+  border-color: #DDDDDD;
+  background-color: white;
+}
+table td {
+  border-width: 1px;
+  border-style: inset;
+  border-color: #DDDDDD;
+  background-color: white;
+  line-height: 18px;
+  padding: 2px 5px;
+}
+
+p {
+  margin-left: 15px;
+  margin-bottom: 5px;
+}
+
+blockquote {
+  background-color: #f6f6f6;
+  padding: 13px;
+  padding-bottom: 1px;
+}
+
+hr {
+  border-style: solid;
+  border: none;
+  border-top: 1px solid #777;
+  margin: 28px 0;
+}
+
+dl {
+  margin-left: 0;
+}
+  dl dd {
+    margin-bottom: 13px;
+    margin-left: 13px;
+  }
+
+ul {
+  margin-top: 0;
+}
+  ul li {
+    list-style: circle outside;
+  }
+  ul ul {
+    margin-bottom: 0;
+  }
+
+code {
+  font-family: Consolas, Monaco, 'Courier New', monospace;
+  color: #000;
+  padding: 0px;
+}
+
+p > code, li > code {
+  color: #333;
+  border: 1px solid #ddd;
+  border-radius: 3px;
+  background-color: #f8f8f8;
+  font-size: 80%;
+  padding: 0px 2px;
+}
+
+
+pre {
+  font-size: 12px;
+  line-height: 16px;
+  white-space: pre-wrap;    /* Wrap long lines */
+}
+
+pre.r {
+  background-color: #F3F5F7;
+  padding: 4px 10px;
+  border: 1px solid #AEBDCC;
+  border-radius: 5px;
+  margin: 5px 5px 10px 20px;
+}
+
+img {
+  background-color: #FFFFFF;
+  padding: 2px;
+  border: 1px solid #DDDDDD;
+  border-radius: 3px;
+  border: 1px solid #CCCCCC;
+  box-shadow: 2px 2px 12px -5px #999999;
+  margin: 0 5px;
+}
+
+body {
+  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 15px;
+  line-height: 22px;
+}
+  body #header {
+  }
+
+
+h1 {
+  margin-top: 0;
+  font-size: 35px;
+  line-height: 40px;
+}
+
+h2 {
+  border-bottom: 2px solid #ccc;
+  width: 85%;
+  padding-top: 10px;
+  font-size: 22px;
+}
+
+h3 {
+  border-bottom: 2px solid #ccc;
+  width: 75%;
+  padding-top: 10px;
+  font-size: 18px;
+}
+
+h4 {
+  border-bottom: 1px solid #ccc;
+  width: 60%;
+  margin-left: 8px;
+  font-size: 16px;
+}
+
+h5, h6 {
+  border-bottom: 1px solid #ccc;
+  width: 60%;
+  margin-left: 15px;
+  font-size: 16px;
+}
+
+a {
+  color: #0033dd;
+  text-decoration: none;
+}
+  a:hover {
+    color: #6666ff; }
+  a:visited {
+    color: #800080; }
+  a:visited:hover {
+    color: #BB00BB; }
+  a[href^="http:"] {
+    text-decoration: underline; }
+  a[href^="https:"] {
+    text-decoration: underline; }
+
+dl dt {
+  font-weight: bold;
+}
+
+
+pre .operator,
+pre .paren {
+  color: #888;
+}
+
+pre .literal {
+ color: #990073;
+}
+
+pre .number {
+ color: #0080C0;
+}
+
+pre .comment {
+ color: #008000;
+ font-style: italic
+}
+
+pre .keyword {
+ color: #900;
+ font-weight: bold
+}
+
+pre .identifier {
+ color: #000;
+}
+
+pre .string {
+ color: #b44;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-googlevis.git



More information about the debian-med-commit mailing list