Get access to all lessons in this course.
-
RMarkdown
- Why Use RMarkdown?
- RMarkdown Overview
- YAML
- Text
- Code Chunks
- Wrapping Up
-
Data Wrangling and Analysis
- Getting Started
- The Tidyverse
- select
- mutate
- filter
- summarize
- group_by
- count
- arrange
- Create a New Data Frame
- Crosstabs
- Wrapping Up
-
Data Visualization
- An Important Workflow Tip
- The Grammar of Graphics
- Scatterplots
- Histograms
- Bar Charts
- color and fill
- scales
- Text and Labels
- Plot Labels
- Themes
- Facets
- Save Plots
- Wrapping Up
-
Wrapping Up
- You Did It!
Fundamentals of R
The Grammar of Graphics
This lesson is locked
This lesson is called The Grammar of Graphics, part of the Fundamentals of R course. This lesson is called The Grammar of Graphics, part of the Fundamentals of R course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Your Turn
Nothing for this lesson. Don't worry, though, there will be exercises from here on out!
Learn More
The paper in which Hadley Wickham originally discussed the grammar of graphics and how it applies to ggplot2 can be found here.
There is a section of Kieran Healy’s book Data Visualization: A Practical Introduction that discusses the application of the grammar of graphics to ggplot2. Claus Wilke also talks about the grammar of graphics in his book.
General ggplot2 Resources
Start with chapter 3 of R for Data Science by Hadley Wickham, which shows the basics of ggplot2. The RStudio primers on visualizing data provide another great place to get started.
To see ggplot2 in action, check out the ggplot2 flipbook by Gina Reynolds, which shows each step in building various plots. Both the R Graph Gallery and From Data to Viz show examples of plots and provide code to make them.
Two great books on the fundamentals of data visualization that include ggplot2 code are Fundamentals of Data Visualization by Claus Wilke and Data Visualization: A Practical Introduction by Kieran Healy.
Another good reference book is the R Graphics Cookbook by Winston Chang, which has “more than 150 recipes to help you generate high-quality graphs quickly, without having to comb through all the details of R’s graphing systems.”
Finally, I recommend you print out and keep the ggplot cheatsheet handy. I have one by my desk and use it all the time!
You need to be signed-in to comment on this post. Login.
Sara Cifuentes
April 6, 2022
Hi Charlie and David, I wondered how long we would have access to all the material in this course after this course is over. Is it because you have a lot of valuable information that you show us in the "learn more" part, and I don't know if I should review everything in one moment or review it as questions arise in my learning journey with R? Thanks!
Charlie Hadley
April 6, 2022
Hi Sara!
You'll have access to the course for as long as R for The Rest of Us continues to exist, and we have no plans on stopping.
Thanks,
Charlie
Hatem Kotb
September 18, 2022
The resources you share are so useful. Thank you!