useR

Tutorial: Data visualization with ggplot2


Garrett Grolemund , RStudio, Inc - garrett at rstudio.com

Overview

In this class, you’ll learn the basics of visualizing data with R and ggplot2. We’ll look at two datasets, one on fuel economy and one on diamond prices, and explore how to create a variety of plot types, focusing on the two most important statistical graphics: the scatterplot and the histogram. You’ll get a flavor of the theory that underlies ggplot2, and see how to create a surprisingly wide range of graph types with just a few simple commands.

Goals

Outline

The class will be a mixture of lecture and hands on activities.

Prerequisites

You don’t need any programming knowledge to get the most out of this class, but before you come, make sure you have installed R and ggplot2 on your computer. The easiest way to get R is to follow the in- structions at http://cran.r-project.org. Once you’ve installed R, open it and run the following R code: in- stall.packages(“ggplot2”).

Intended Audience

Workshop Materials

Please download the workshop materials here.

Related Links