Chapter 4 Building Data Visualization Tools

The data science revolution has produced reams of new data from a wide variety of new sources. These new datasets are being used to answer new questions in ways never before conceived. Visualization remains one of the most powerful ways draw conclusions from data, but the influx of new data types requires the development of new visualization techniques and building blocks. This section provides you with the skills for creating those new visualization building blocks. We focus on the ggplot2 framework and describe how to use and extend the system to suit the specific needs of your organization or team.

The objectives for this section are:

  • Create data graphics using the ggplot2 package
  • Build graphics by combining multiple geoms
  • Recognize the differences between different geom_* functions
  • Recall the difference between mapping an aesthetic to a constant and mapping an aesthetic to a variable
  • Create a scatterplot or a histogram using ggplot2
  • Build plots using the six guidelines for good graphics
  • Create simple maps using ggplot2
  • Create dynamic maps using the ggmap package
  • Build maps that have external data overlaid
  • Create chloropleth maps of US counties
  • Recognize the different graphical objects presented by the grid package
  • Build build simple graphics using the grid package
  • Create a ggplot2 theme by modifying an existing theme
  • Build a new geom function to implement a new feature or simplify a workflow