What is GoogleVis?

Athul Anish
3 min readOct 30, 2020

--

GoogleVis is a package which acts as a link or an interactive platform between R and Google Charts API.

In R we can find a lot of visualization methods such as the histogram, bar plot, scatter plot etc.

GoogleVis provides us with more better, advanced charts such as the most common, motion chart, which can be utilized without even uploading our data's into the google server.

Photo by Clay Banks on Unsplash

The output of googleVis is an HTML code that contains the data and references to JavaScript functions hosted by Google. GoogleVis makes use of the R HTTP server to display the output locally. An internet connection, flash player and modern browser is required for displaying the output.

Why GoogleVis?

GoogleVis is one of the oldest existing visualization technique. It has been around for a while and is one of the best implementation of JavaScript based charting packages.

GoogleVis is also one of the easiest tools to learn as it is very interactive and helps you build great models.

Photo by Carlos Muza on Unsplash

It is an open source free tool, includes some beautiful motion maps, and works on almost all modern browsers.

Installation

Installation of googleVis is as usual from the CRAN package, i.e.,

Installation Code

The googleVis package

As discussed earlier, the googleVis package forms a connection or link between data in R and google chart tools.

The package provides us with various google chart resources such as Motion Charts, Annotated Time
Lines, Maps, Geo Maps, Intensity Maps, Tables, Gauges, Tree Maps,
Bar, Bubble, Area, Scatter, Candlestick,
Pie, Annotation, Histogram, Timeline, Calendar and Org Charts.

Where data is the name of the dataset we are using, idvar and timevar specify the column names of the id variable and time variable for the plot while chartid is an argument that allows the user to set chart id for the output chart. If not set, a temporary random ID would be automatically set to it.

Now lets see some examples for a simple line chart and bar chart:

Eg:

Line Chart Code
Line Chart
Bar Chart Code
Bar Chart

The other most commonly used functions include bubbles, maps and motion chart.

Eg:

Bubble Chart Code
Bubble Chart
Geo Map Code
Geo Map

--

--

Athul Anish

Robotics Engineer | Data Analyst.