Corrado Lanera has completed
Data Visualization with ggplot2 (Part 1)
Start course For Free5 hours
5,250 XP

Loved by learners at thousands of companies
Course Description
The ability to produce meaningful and beautiful data visualizations is an essential part of a data scientist skill set. This course, the first R data visualization course in the series, introduces you to the principles of good visualizations and the grammar of graphics plotting concepts implemented in the ggplot2 package. ggplot2 has become the go-to tool for flexible and professional plots in R. We’ll examine the first three essential layers for making a plot: data, aesthetics, and geometries. By the end of the course you will be able to make complex exploratory plots.
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.- 1
Introduction
FreeAs a communications tool, visualizations require you to think about your audience first. You’ll be introduced to the basics of ggplot2—the seven different grammatical elements (layers) and aesthetic mappings.
Introduction50 xpExplore and Explain50 xpExploring ggplot2, part 1100 xpExploring ggplot2, part 2100 xpGrammar of Graphics50 xpExploring ggplot2, part 3100 xpUnderstanding Variables50 xpggplot250 xpExploring ggplot2, part 4100 xpExploring ggplot2, part 5100 xpUnderstanding the grammar, part 1100 xpUnderstanding the grammar, part 2100 xp - 2
Data
The structure of your data will dictate how you construct plots in ggplot2. In this chapter, you’ll explore the iris dataset from several different perspectives. You’ll understand why conforming your data structure to match the plot will make visualization much easier by reviewing several data visualization examples.
Objects and Layers50 xpbase package and ggplot2, part 1 - plot100 xpbase package and ggplot2, part 2 - lm100 xpbase package and ggplot2, part 3100 xpggplot2 compared to base package50 xpProper Data Format50 xpPlotting the ggplot2 way50 xpTidy Data50 xpVariables to visuals, part 1100 xpVariables to visuals, part 1b100 xpVariables to visuals, part 2100 xpVariables to visuals, part 2b100 xp - 3
Aesthetics
Aesthetic mappings are the cornerstone of the grammar of graphics plotting concept. This is where the magic happens—converting continuous and categorical data into visual scales that provide access to a large amount of information in a very short time. In this chapter, you’ll understand how to choose the best aesthetic mappings for your data.
Visible Aesthetics50 xpAll about aesthetics, part 1100 xpAll about aesthetics, part 2100 xpAll about aesthetics, part 3100 xpAll about attributes, part 1100 xpAll about attributes, part 2100 xpGoing all out100 xpAesthetics for categorical and continuous variables50 xpModifying Aesthetics50 xpPosition100 xpSetting a dummy aesthetic100 xpAesthetics Best Practices50 xpOverplotting 1 - Point shape and transparency100 xpOverplotting 2 - alpha with large datasets100 xp - 4
Geometries
A plot’s geometry dictates what visual elements will be used. In this chapter, we’ll familiarize you with the geometries used in the three most common plot types you’ll encounter: scatter plots, bar charts, and line plots.
Scatter Plots50 xpScatter plots and jittering (1)100 xpScatter plots and jittering (2)100 xpBar Plots50 xpHistograms100 xpPosition100 xpOverlapping bar plots100 xpOverlapping histograms100 xpBar plots with color ramp, part 1100 xpBar plots with color ramp, part 2100 xpOverlapping histograms (2)100 xpLine Plots - Time Series50 xpLine plots100 xpPeriods of recession100 xpMultiple time series, part 1100 xpMultiple time series, part 2100 xp - 5
qplot and wrap-up
In this chapter, you'll learn about qplot, which is a quick and dirty version of ggplot2. It’s not as intuitive as the full-fledged ggplot() function, but may be useful in specific instances. This chapter also features data visualization exercises.
Training 2 or more people?
Get your team access to the full DataCamp platform, including all the features.collaborators


prerequisites
Intermediate R
Rick Scavetta is a co-founder of Scavetta Academy.
Rick Scavetta is a biologist, workshop trainer, freelance data scientist and co-founder of Scavetta Academy, a company dedicated to helping scientists better understand and visualize their data. Rick's practical, hands-on exposure to a wide variety of datasets has informed him of the many problems scientists face when trying to visualize their data.
Join over 16 million learners and start Data Visualization with ggplot2 (Part 1) today!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.