Your Turn
Complete the scatterplot sections of the data-visualization-exercises.Rmd file.
Solutions
Video
Code
Learn More
Scatterplot Resources
Claus Wilke talks about scatterplots in Chapter 12 of his book Fundamentals of Data Visualization. Michael Toth also has a long blog post about all of the ins and outs of making scatterplots in ggplot.
You can also find examples of code to make scatterplots on the Data to Viz website, the R Graph Gallery website, and in Chapter 5 of the R Graphics Cookbook.
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!
Questions about the lesson? Put them below.