googleVis 0.2.15 is released: Improved geo and bubble charts

March 4, 2012
By

(This article was first published on mages' blog, and kindly contributed to R-bloggers)

The guys behind the Google Visualisation API don't seem to rest. On 22 February 2012 they released an update of their API. Google added options for a gradient colour axis to bubble chart and a magnifying glass to geo chart, which opens when the user hovers over cluttered markers (excluding IE<=8). Those updates have been incorporated into version 0.2.15 of the googleVis package for R.

Examples of new features

Here are two examples demonstrating the new features.

Bubble chart with gradient colour mode

Example of a bubble chart with a colour gradient axis.


The following geo chart shows the CRAN mirrors by location around the world and for how many years they have been active since 2004. I extracted the information from the R SVN-server and the CRAN_mirrors.csv file, which is placed in the /doc folder since R version 2.0.1. Not necessarily the nicest code I have ever written, but it does the job. The cities are not geo coded (no lat/long coordinates), so it takes a little time to show them all, as Google needs to figure out where they are. Hover over a cluttered marker area to bring up the magnifying glass.

Number of years cities are hosting a CRAN mirror since 2004





NEWS

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.

To leave a comment for the author, please follow the link and comment on his blog: mages' blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , , , ,

Comments are closed.