Email updates

Keep up to date with the latest news and content from IJHG and BioMed Central.

Open Access Highly Accessed Research

Displaying R spatial statistics on Google dynamic maps with web applications created by Rwui

Richard Newton1*, Andrew Deonarine2 and Lorenz Wernisch1

Author Affiliations

1 MRC Biostatistics Unit, Robinson Way, Cambridge, UK

2 MRC Laboratory of Molecular Biology, Hills Road, Cambridge, UK

For all author emails, please log on.

International Journal of Health Geographics 2012, 11:41  doi:10.1186/1476-072X-11-41

Published: 24 September 2012



The R project includes a large variety of packages designed for spatial statistics. Google dynamic maps provide web based access to global maps and satellite imagery. We describe a method for displaying directly the spatial output from an R script on to a Google dynamic map.


This is achieved by creating a Java based web application which runs the R script and then displays the results on the dynamic map. In order to make this method easy to implement by those unfamiliar with programming Java based web applications, we have added the method to the options available in the R Web User Interface (Rwui) application. Rwui is an established web application for creating web applications for running R scripts. A feature of Rwui is that all the code for the web application being created is generated automatically so that someone with no knowledge of web programming can make a fully functional web application for running an R script in a matter of minutes.


Rwui can now be used to create web applications that will display the results from an R script on a Google dynamic map. Results may be displayed as discrete markers and/or as continuous overlays. In addition, users of the web application may select regions of interest on the dynamic map with mouse clicks and the coordinates of the region of interest will automatically be made available for use by the R script.


This method of displaying R output on dynamic maps is designed to be of use in a number of areas. Firstly it allows statisticians, working in R and developing methods in spatial statistics, to easily visualise the results of applying their methods to real world data. Secondly, it allows researchers who are using R to study health geographics data, to display their results directly onto dynamic maps. Thirdly, by creating a web application for running an R script, a statistician can enable users entirely unfamiliar with R to run R coded statistical analyses of health geographics data. Fourthly, we envisage an educational role for such applications.