Lesson 4 Visualize: ggplot2, plotly, tmap

4.1 Plot

Inspiring people:

4.1.2 Interactive: plotly

ggplot2 | plotly

Your Turn: Expand the interactive scatterplot to include all the other bells and whistles of the previous plot in one continuous set of code (no in between setting of s).

4.1.3 Interactive: Exploding Boxplot

4.1.4 Interactive: Motion Plot

The googleVis package ports most of the Google charts functionality.

For every R chunk must set option results='asis', and once before any googleVis plots, set op <- options(gvis.plot.tag='chart').

## Creating a generic function for 'toJSON' from package 'jsonlite' in package 'googleVis'

Your Turn: Repeat the motion chart with the country having the highest gdpPercap filtered out.

4.2 Map

Thematic maps tmap:

4.2.2 Interactive