Interactive bubble chart



This post explains how to build an interactive bubble chart with R, using ggplot2 and the ggplotly() function of the plotly package.

Bubble section Data to Viz

Most basic bubble chart with geom_point()


This post follows the previous step by step description of building bubble chart with ggplot2.

The idea is to turn the chart interactive:

  • You can zoom by selecting an area of interest
  • Hover a circle to get information about it
  • Export to png
  • Slide axis
  • Double click to re-initialize.

This is done thanks to the ggplotly() function of the plotly package that turn any ggplot2 chart object interactive. Note the little trick to custom the tooltip content.

Related chart types


Scatter
Heatmap
Correlogram
Bubble
Connected scatter
Density 2d



Contact

This document is a work by Yan Holtz. Any feedback is highly encouraged. You can fill an issue on Github, drop me a message on Twitter, or send an email pasting yan.holtz.data with gmail.com.