R ggplot2

Resize the browser window to see the effect.

Visualization in R with ggplot2

taught by Randall Pruim

Aim of Course:

In this online course, “Visualization in R with ggplot2,” participants will learn how to use the ggplot R Project to make, format, label and adjust graphs using R. The ggplot2 Project, created by Hadley Wickham, is named after the term "Grammar of Graphics," which was coined by Leland Wilkinson (creator of Systat) and won the 2006 John Chambers Award for Statistical Computing. This "grammar of graphics" is a system of describing and organizing the fundamental components of a graph and the process of creating a graph. Using ggplot2, participants will learn how to design and implement graphs in an efficient, elegant and systematic manner, following principles of general good graphing practice.


(1) On the two courses "R Graphics" and "Visualization in R with ggplot2:" Visualization in R with ggplot2 is more about the use of the ggplot2 package to easily produce high quality plots.  R Graphics covers the the core R graphics functions and the lattice package for producing plots and also looks at lower-level tools for customising plots.

(2) We acknowledge the contributions of Hadley Wickham, who pioneered this and other courses at Statistics.com.

This course may be taken individually (one-off) or as part of a certificate program.

Course Program:

WEEK 1: Introduction to ggplot2

  • How to create basic plots (scatterplots, histograms, and barcharts) using qplot()
  • Setting vs. mapping
  • How to add extra variables with aesthetics (like color, shape, and size) or faceting

WEEK 2: Digging Deeper into ggplot2

  • The ggplot system: geoms, stats, and all that jazz
  • How to display data in other forms (densityplots, boxplots, etc.) using geoms
  • Techniques for overcoming overplotting with drawing scatterplots of large datasets

WEEK 3: Data Manipulation for Plotting, dplyr

  • Group-wise summaries and transformations to add extra information to your plots
  • How to visualize time series

WEEK 4: Polishing Your Plots

  • Tweaking your plots for maximum presentation impact
  • Introduction to color theory
  • Labels, legends, and axes
  • Using and adjusting the plot themes


Homework in this course consists of guided exercises in writing code for producing graphs.

In addition to assigned readings, this course also has discussion tasks, and supplemental readings available online.

Visualization in R with ggplot2

Who Should Take This Course:

Statistical analysts who use R and need to create or modify graphs.



While ggplot2 is a mini-language specifically tailored for producing graphics, you will need some familiarity with data handling in R before taking this course. For this, we recommend you take R Programming - Introduction 1.

Organization of the Course:

This course takes place online at the Institute for 4 weeks. During each course week, you participate at times of your own choosing - there are no set times when you must be online. Course participants will be given access to a private discussion board. In class discussions led by the instructor, you can post questions, seek clarification, and interact with your fellow students and the instructor.

At the beginning of each week, you receive the relevant material, in addition to answers to exercises from the previous session. During the week, you are expected to go over the course materials, work through exercises, and submit answers. Discussion among participants is encouraged. The instructor will provide answers and comments, and at the end of the week, you will receive individual feedback on your homework answers.

Time Requirement:
About 15 hours per week, at times of  your choosing.

Students come to the Institute for a variety of reasons. As you begin the course, you will be asked to specify your category:

  1. You may be interested only in learning the material presented, and not be concerned with grades or a record of completion.
  2. You may be enrolled in PASS (Programs in Analytics and Statistical Studies) that requires demonstration of proficiency in the subject, in which case your work will be assessed for a grade.
  3. You may require a "Record of Course Completion," along with professional development credit in the form of Continuing Education Units (CEU's).  For those successfully completing the course,  CEU's and a record of course completion will be issued by The Institute, upon request.
This course is also recognized by the Institute for Operations Research and the Management Sciences (INFORMS) as helpful preparation for the Certified Analytics Professional (CAP®) exam, and can help CAP®analysts accrue Professional Development Units to maintain their certification .

Course Text:

The required text is ggplot2: Elegant Graphics for Data Analysis by Hadley Wickham.  The text may be purchasedhere


Participants should be familiar with and have access to R, and should download and install the ggplot2 Projectbefore the course starts.

Visualization in R with ggplot2

July 21, 2017 to August 18, 2017January 12, 2018 to February 09, 2018July 20, 2018 to August 17, 2018

Course Fee: $549