This lesson is being piloted (Beta version)

ggplot Extension Course

Data Carpentry’s aim is to teach researchers basic concepts, skills, and tools for working with data so that they can get more done in less time, and with less pain. The lessons below were designed for those interested in working with social sciences data in R.

This is an introduction to plotting in R with ggplot is designed for participants with some experience in using R. These lessons can be taught in a day (~ 6 hours). They start with some basic information about RStudio interface and how it can be used to interact with GitHub. The main focus is on an introduction to ggplot and a discussion of good practices in data visualisation.

Getting Started

Data Carpentry’s teaching is hands-on, so participants are encouraged to use their own computers to ensure the proper setup of tools for an efficient workflow.

These lessons assume basic familiarity with R.

To get started, follow the directions in the “Setup” tab to download data to your computer and follow any installation instructions.

Prerequisites

This lesson requires a working copy of R and RStudio as well as an active GitHub account.
To most effectively use these materials, please make sure to install everything before working through this lesson.

For Instructors

If you are teaching this lesson in a workshop, please see the Instructor notes.

Schedule

Setup Download files required for the lesson
00:00 1. Before we Start How do you get a GitHub account?
How do you use Git with RStudio?
00:40 2. Visualising continuous data with ggplot2 What are the components of a ggplot?
How do I create histograms, density plots, and scatterplots?
How can I change the aesthetics (ex. colour, transparency) of my plot?
02:10 3. Plotting categorical data with ggplot2 How do I create bar charts and box plots?
What are potential pitfalls when using bar charts and box plots?
03:40 4. Customising plots created with ggplot2 How can I add custom titles and labels to my plot?
How can I combine multiple panels into a single plot?
How can I change the overall appearance of a plot?
05:10 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.