Visually displaying data through figures is a critical part of producing high quality science. The amount of information you can glean from a well-designed figure is impressive, and so today we will learn how to make basic figures in R.
In this lecture we will explore a specific dataset and learn some basic data visualization literacy:
- Discrete versus continuous data
- Basic principles of graphs, including data:ink ratio
- Basic plot synatax in ggplot2 and base plot
Readings and Resources
See this resource for basic plotting: http://r4ds.had.co.nz/data-visualisation.html
ggplot2 cheat sheet: https://www.rstudio.com/wp-content/uploads/2015/03/ggplot2-cheatsheet.pdf
R base plot cheat sheet: http://publish.illinois.edu/johnrgallagher/files/2015/10/BaseGraphicsCheatsheet.pdf
Details - Week 4
I drive a plug-in hybrid electric car and I track all details about each trip we take. The dataset contains many different types of data and requires some basic data manipulation to be usable.
We will step through some basic graphs, using both ggplot and base plot.
Code and Data
Slides available via speakerdeck