Word trees with googleVis 0.6.4

It’s been while since the last update on googleVis. Well, the Google Chart Tools are fairly settled now, but some time ago Google added Word Trees: A word tree depicts multiple parallel sequences of words. It could be used to show which words most often follow or precede a target word (e.g., “Cats are…”) or to show a hierarchy of terms (e.g., a decision tree). Google word trees are able to process large amounts of text quickly.

googleVis 0.6.1 on CRAN

We released googleVisversion 0.6.1 on CRANlast week. The update fixes issues with setting certain options, following the switch from RJSONIOto jsonlite. Screen shot of some of the Google ChartsNew to googleVis? The package provides an interface between Rand the Google Charts Tools, allowing you to create interactive web charts from R without uploading your data to Google. The charts are displayed by default via the R internal help browser. To lean more see the examplesof googleVis charts on CRANand read the introduction vignette.

googleVis version 0.5.8 released

We released googleVisversion 0.5.8 on CRANlast week. The update is a maintenance release for the forthcoming release of R 3.2.0. Screen shot of some of the Google ChartsNew to googleVis? The package provides an interface between Rand the Google Charts Tools, allowing you to create interactive web charts from R without uploading your data to Google. The charts are displayed by default via the R internal help browser. Visit the examplesof all googleVis charts on CRANand review the vignettes.

googleVis 0.5.6 released on CRAN

Zoom, zoom, googleVis

The Google Charts APIis quite powerful and via googleVisyou can access it from R. Here is an example that demonstrates how you can zoom into your chart. In the example below I set the maximum zoom level to 5% of the chart. Drag and pan with a left mouse button to zoom in; use a right mouse click to zoom out again. The functionality is available in other core charts as well, such as line, column and bar charts. For more configuration options of the explorer settings visit the Google documentation.LoadingR code

googleVis 0.5.5 released

Earlier this week we released googleVis0.5.5 on CRAN. The package provides an interface between Rand Google Charts, allowing you to create interactive web charts from R. This is mainly a maintenance release, updating documentation and minor issues.Screen shot of some of the Google ChartsNew to googleVis? Review the examplesof all googleVis charts on CRAN. Perhaps the best known example of the Google Chart API is the motion chart, popularised by Hans Roslingin his 2006 TED talk.

googleVis 0.5.3 released

Recently we released googleVis0.5.3 on CRAN. The package provides an interface between Rand Google Charts, allowing you to create interactive web charts from R.Screen shot of some of the Google ChartsAlthough this is mainly a maintenance release, I'd like to point out two 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 vignettefor more details.

Customising lines and points with googleVis

At the end of March Google released a new versionof the Chart Tools API with new options for point shapesand line brushes. The arguments are called pointShapeand lineDashStyleand can be set directly via googleVis. We published googleVis 0.5.2 on CRANyesterday with added examplesfor those new options in gvisLineChartand gvisScatterChart. Note, these options can be used with most chart types as well, also in combination. Visit the Google documentationfor more details.Customising PointsLoadingCustomising LinesLoadingSession InfoR version 3.

googleVis 0.5.1 released on CRAN

GoogleVis 0.5.1 was released on CRANyesterday. New FeaturesNew functions gvisSankey, gvisAnnotationChart, gvisHistogram,gvisCalendarand gvisTimelineto support the new Google charts of the same names (without ‘gvis’).New demo Trendlinesshowing how trend-lines can be added to Scatter-, Bar-, Column-, and Line Charts.New demo Rolesshowing how different column roles can be used in core charts to highlight data.New vignettes written in R Markdown showcasing googleVis examplesand how the package works with knitr.ChangesThe help files of gvis charts no longer show all their options, instead a link to the online Google APIdocumentation is given.

Annotation charts and histograms with googleVis

After my posts on timeline, Sankeyand calendarcharts, this will be the last to introduce new chart types of the developer version of googleVis. Today I will give examples for the new annotation charts and histograms.Annotation chartsAnnotation charts have been part of the Google Chart tools for a long time and googleVis as well. However, in the past only a flash based versionwas available (gvisAnnotatedTimeLinein googleVis). With the new Google Charts Toolsversion also a HTML5 version was released.

Calendar charts with googleVis

My little series of posts about the new googleVischarts continues with calendar charts. Google's calendar chartsare still in beta, but they provide already a nice heat map visualisation of calendar year data. The current development version of googleVis supports this new function via gvisCalendar. Here is an example displaying daily stock price data.LoadingFor the code below to run you will require the developer version (≥ 0.5.0-4) of googleVis from GitHuband R ≥ 3.

Sankey diagrams with googleVis

Sankey diagrams are great for visualising flows from one set of data values to another. Although named after Irish Captain Matthew Henry Phineas Riall Sankey, who used this type of diagram in 1898 to show the energy efficiency of a steam engine, the best know Sankey diagram is probably Charles Minard's Map of Napoleon's Russian Campaign of 1812, which he actually produced in 1869.Thomas Rahlf: Datendesign mit RThe above example from Thomas Rahlf's book Datendesign mit Rshows that Minard's plot can be reproduced with base graphics in R.

Timeline charts with googleVis

Last year at the Google I/Oconference Mitchell Foley presented new developments of the Google Chart Tools APIand one of the new features he mentioned were timeline charts(about 6 min into the talk). Timeline charts are a great way of visualising different dates/events over time and are now also supported by googleVisfrom version 0.5.0 onwards (currently only available from GitHub). Here is an example, showing classroom allocation in the afternoon. The exact times and durations are given when you hover over the bars.

googleVis code development moved to GitHub

After nearly 4 years of developing googleVison Google Codewith SVN we decided to move to GitHub. The main reason was that Google stopped the facility of hosting pre-CRAN builds of the package for user testing. The devtoolspackage on the other hand makes it really easy to install packages from source hosted on GitHub. Additionally, we hope that GitHub will make collaboration with others more effective. Thus, bookmark shot of some of the new features in googleVis 0.

googleVis 0.4.7 with RStudio integration on CRAN

In my previous post, I presented a preview version of googleVisthat provided an integration with RStudio'sViewer pane(introduced with version 0.98.441).Over 80% in my little survey favoured the new default output mechanism of googleVis within RStudio. Hence, I uploaded googleVis 0.4.7 on CRANover the weekend. However, there were also some thoughtful comments, which suggested that the RStudio Viewer pane is not always the best option. Indeed, Flash charts and gvisMerge output will still be displayed in your default browser, but also if you work on larger charts and with smaller screen, then the browser might still be the better option compared to the Viewer pane - of course you can launch the browser from the Viewer pane as well.

Display googleVis charts within RStudio

The preview version 0.98.441 of RStudio introduced a new viewer paneto render local web content and with that it allows me to display googleVischarts within RStudio rather than in a separate browser window. I think this is a rather nice feature and hence I have updated the plot method in googleVis to use the RStudio viewer pane as the default output. If you use another editor, or if the plot is using one of the Flash based charts, then the browser is still the default display.

Changing the width of bars and columns in googleVis

Changing the plotting width in bar-, column- and combo-charts of googleVisworks identical and is defined by the bar.groupWidthargument. The dot in the argument means that it has to be split in R into bar=”{groupWidth:‘10%'}“. Examplelibrary(googleVis)cc <- gvisColumnChart(head(Population,10), xvar="Country”, yvar="Population”,options=list(seriesType="bars”, legend="top”,bar=”{groupWidth:‘10%'}",width=500, height=450),chartid="thincolumns”)plot(cc)Your browser doesn't support iframes.Session InfoR version 3.0.1 (2013-05-16)Platform: x86_64-apple-darwin10.8.0 (64-bit)locale:[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8attached base packages:[1] stats graphics grDevices utils datasets methods base other attached packages:[1] googleVis_0.4.5loaded via a namespace (and not attached):[1] RJSONIO_1.

Doughnut chart in R with googleVis

The guys at Google continue to update and enhance the Chart Tools API. One new recent feature is a pie chartwith a hole, or as some call them: donut charts.Thankfully the new functionality is being achieved through new options for the existing pie chart, which means that those new features are available in R via googleVisas well, without the need of writing new code. Doughnut chart exampleWith the German election coming up soon, here is the composition of the current parliament.

googleVis 0.4.4 released with new formatting options for tables

Over the weekend googleVis0.4.4 found its way to CRAN. The function gvisTablegained a new argument formatsthat allow users to define the formats numbers displayed in tables. Thanks to J. Buros, who contributed the code.ExampleLoadingSession InfoR version 3.0.1 (2013-05-16)Platform: x86_64-apple-darwin10.8.0 (64-bit)locale:[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8attached base packages:[1] stats graphics grDevices utils datasets methods [7] base other attached packages:[1] googleVis_0.4.4loaded via a namespace (and not attached):[1] RJSONIO_1.0-3 tools_3.0.1

Setting axes limits with googleVis

I posted about the various googleVisaxis options for base charts, such as line, bar and area charts earlier, but I somehow forgot to mention how to set the axes limits.Unfortunately, there are no arguments such as ylimand xlim. Instead, the Google Chartsaxes options are set via hAxesand vAxes, with hand vindicating the horizontal and vertical axis. More precisely, I have to set viewWindowMode : ‘explicit'and set the viewWindowto the desired minand maxvalues.

googleVis tutorial at useR!2013

Today Diego and I will give our googleVis tutorial at useR!2013 in Albacete, Spain.googleVis Tutorial at useR! 2013We will cover:Introduction and motivationGoogle Chart ToolsR package googleVisConcepts of googleVisCase studiesgoogleVis on shiny

googleVis 0.4.3 released with improved Geocharts

The Google Charts Tools provide two kinds of heat map charts for geographical data, the Flash based Geomapand the HTML5/SVG based Geochart. I prefer the Geochart as it doesn't require Flash, but so far there have been two shortcomings with it: I couldn't add additional tooltip information and the default Mercator projection shows Greenland the size of Africa. Both of those issues seemed to have been resolved by Google. Although the features aren't officially documented and released yet, Mitchell Foleyfrom the Google Chart Tools team presented the new developments at the Google I/O 2013 conference in May already.

How to set axis options in googleVis

Setting axis options in googleVischarts can be a bit tricky. Here I present two examples where I set several options to customise the layout of a line and combo chart with two axes. The parameters have to be set in line with the Google Chart Tools API, which uses a JavaScript syntax. In googleVis chart options are set via a list in the optionsargument. Some of the list items can be a bit more complex, often wrapped in {}brackets, e.

First steps of using googleVis on shiny

The guys at RStudiohave done a fantastic job with shiny. It is really easy to build web apps with Rusing shiny. With the help of Joe Cheng from RStudio we figured out a way to make googleViswork on shiny as well. This allows you to make use of the Google Charts Toolsin your shiny app directly from R. What I present here are three initial examples which seem to work in most browsers.

googleVis 0.3.3 is released and on its way to CRAN

I am very grateful to all who provided feedback over the last two weeks and tested the previous versions 0.3.1and 0.3.2, which were not released on CRAN. I hope this version will not cause too much trouble. And on that note, here is a picture I took earlier today, walking down the stairs of Montée-Nicolas-de-Langein Lyon. I like the message, though I am not sure if it was meant in relation to the empty red wine bottle on the ground.

googleVis 0.3.2 is released: Better integration with knitr

googleVis 0.3.0/0.3.1 is released: It's faster!

Version 0.3.0 of the googleVispackage for Rhas been released on CRAN on 20 October 2012. With this version we have been able to speed up the code considerably. The transformation of R data frames into JSON works significantly faster. The execution of the gvisMotionChartfunction in the World Bank demois over 35 times faster. Thanks to ideas by Wei Luoand in particular to Sebastian Kranzfor providing the code.Further, the plot function plot.

Interactive web graphs with R - Overview and googleVis tutorial

Today I feel very lucky, as I have been invited to the Royal Statistical Society conferenceto give a tutorial on interactive web graphs with R and googleVis. I prepared my slides with RStudio, knitr, pandocand slidy, similar to my Cambridge R talk. You can access the RSS slides online hereand you find the original R-Markdown file on github. You will notice some HTML code in the file, which I had to use to overcome my knowledge gaps of Markdown or its limitations.

googleVis 0.2.17 is released: Displaying earth quake data

Applying a function successively in R

Interactive HTML presentation with R, googleVis, knitr, pandoc and slidy

Tonight I will give a talk at the Cambridge R user groupabout googleVis. Following my good experiencewith knitrand RStudioto create interactive reports, I thought that I should try to create the slides in the same way as well. Christopher Gandrud's recent postreminded me of deck.js, a JavaScript library for interactive html slides, which I have used in the past, but as Christopher experienced, it is currently not that straightforward to use with R and knitr.

Changes in life expectancy animated with geo charts

German train monitor provides access to train delay data

googleVis 0.2.15 is released: Improved geo and bubble charts

googleVis 0.2.14 is released

Credit rating by country

The financial crisis has put a lot of pressure on countries’ long-term foreign currency credit ratings, with France recently being downgraded by S&P. Wikipedia provides a list of countries by credit ratingsas report by US rating agencies S&P, Fitch, Moody's and Dagong, a Chinese rating agency.So, what does the world look like today through the eyes of those rating agencies?I use the R packages XMLand googleVisto read and display the data from Wikipedia with just a few lines.

googleVis 0.2.13: new stepped area chart and improved geo charts

Setting the initial view of a motion chart in R

Following on from my article about accessing and plotting World Bank data with RI want to talk about how to change the initial view of a motion chart.Over the last couple of weeks I have been asked a view times how to do this. For instance Stephen O'Gradywanted to create a motion chart, which shows initially a line chart, rather than a bubble chart. Changing the initial settings of a motion chart is actually quite easy, if you know how to.

Accessing and plotting World Bank data with R

Over the past couple of days I played around with the data sets of the World Bank, and I have to admit that I am blown away by it. It is amazing, to see what is available on their web siteand it is worth visiting their Data Visualisation Toolspage. It is fantastic that they provide an APIto their data. They have used it to build an iPhone Appwhich is pretty cool.

Including googleVis output in a blogger post

It seems that you cannot include Google Visualisation Charts into a blog post directly. So, I tried to include the output of a googleVis function as a gadget, but also unsuccessfully. Although you can include gadgets into your site template, it doesn’t seem to work with blog posts. So, here is the trick which works for me: the iframe tag. The following geo map is included as // jsData function gvisDataGeoChartIDe67b54187fe6 () { var data = new google.

googleVis 0.2.9

Today we published googleVis 0.2.9 on CRAN. The new version updates the package for the new features of the Google Visualisation API and brings a new in-page editor option. Here is a simple example, displaying the participants of the R user Conference 2011 in Warwick by country. Notice the ‘Edit me’ button in the top left corner of the chart, which allows you to change and customise the graph.