Skip to Main Content

DSS Social Sciences Workshop Resources


Email this link:

Data Visualization with ggplot2

Objectives:

1. Produce scatter plots, boxplots, and barplots using ggplot.
2. Set universal plot settings.
3. Describe what faceting is and apply faceting in ggplot.
4. Modify the aesthetics of an existing ggplot plot (including axis labels and colour).
5. Build complex and customized plots from data in a data frame.

Key Points:

1. ggplot2 is a flexible and useful tool for creating plots in R.
2. The data set and coordinate system can be defined using the ggplot function.
3. Additional layers, including geoms, are added using the + operator.
4. Boxplots are useful for visualizing the distribution of a continuous variable.
5. Barplots are useful for visualizing categorical data.
6. Faceting allows you to generate multiple plots based on a categorical variable.

Recommended Guides

Online Forums

Recommended Books

Online Tutorials