Author: Wenbin Guo
Last Update: 2024 Fall
This advanced workshop provides a comprehensive introduction to data visualization in R, with a focus on mastering ggplot2
(https://ggplot2.tidyverse.org/) to create effective, insightful graphics. Tailored for participants with a foundational knowledge of R
, the workshop covers topics like data wrangling, visualization principles, and advanced techniques to customize and expand visualizations. Participants will gain hands-on experience and explore the art and science of visualization, learning to manipulate data and create plots that are clear, accurate, and visually engaging. For registration information, please refer to this link
The workshop is taught every quarter (3-day workshop, 3 hours per day).
Day 1: Introduction to data wrangling and visualization
- R/RStudio environment setup
- Overview of data visualization: key concepts and workflow
- Data manipulation and transformation with
dplyr
- Introduction to
ggplot2
and the grammar of graphics - Hands-on exercises with
dplyr
andggplot2
Day 2: In-depth exploration of ggplot2
- Aesthetics, visual elements, and geometric objects
- Layer components and varous types of plots
- Scales (size, shape, colour, position) control
- Coordinate systems and facets
- Creating basic plots with
ggplot2
: histogram, bar chart, boxplot, scatter plot, etc.
Day 3: Customization and advanced topics in ggplot2
- Customizing titles, axes, legends, and themes
- Principles of data visualization and best practices
- Exploring
ggplot2
extension packages - Building and customizing complex visualizations with
ggplot2
R/RStudio
Participants should have basic knowledge and experience with R programming. Familiarity with R data structures, such as factors, vectors, and data frames will be beneficial.
slides
: slides for each day of the workshopdayN
: example code and exercises for each day’s topics