Learn R Programming

googleVis (version 0.4.4)

gvisGeoChart: Google Geo Chart with R

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. 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.

Usage

gvisGeoChart(data, locationvar = "", colorvar="", 
             sizevar="", hovervar="", options = list(), chartid)

Arguments

data
a data.frame. The data has to have at least one column with location name (locationvar), value to be mapped to location. The format of the data varies depending on which display mode that you use: Regions or Markers.
locationvar
column name of data with the geo locations to be analysed. The locations can be provide in two formats: [object Object],[object Object]
colorvar
column name of data with the optional numeric column used to assign a color to this marker, based on the scale specified in the colorAxis.colors property. If this column is not present, all markers will be the same co
sizevar
only used for displayMode='markers'. Column name of 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
hovervar
column name of data with the additional string text displayed when the user hovers over this region.
options
list of configuration options for Google Geo Chart. [object Object] Further possible components are, taken from https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart.html#Configuration_Options: [obje