Learn R: Fundamentals of Data Visualization with ggplot2
Learn the basics of how to create visualizations using the popular R package ggplot2.
StartKey Concepts
Review core concepts you need to learn to master this subject
Geom Aesthetics
Grammar of Graphics with ggplot2
ggplot2 Bar Chart
ggplot2 Aesthetics
ggplot2 Labels
ggplot() Initializes a ggplot Object
Geom Aesthetics
Geom Aesthetics
In ggplot2 geom aesthetics are data-driven instructions that determine the visual properties of an individual geom.
Geom aesthetics allow individual layers of a visualization to have their own aesthetic mappings. These aesthetic mappings can vary depending on the geom.
For example, the geom_point()
geom can color-code the data points on a scatterplot based on a property with the following code:
viz <- ggplot(data=airquality, aes(x=Ozone, y=Temp)) + geom_point(aes(color=Month)) + geom_smooth()
The code above would only change the color of the point layer, it would not affect the color of the smooth layer since the aes()
aesthetic mapping is passed at the point layer.
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory