An introduction to data visualization
by Erin Dillon & Broc Kokesh
Adapted from materials from William Gearty
2025 Paleontological Society Short Course
1:30 - 2:00 PM: Theory of data visualization
2:00 - 3:15 PM: Data visualization practical
The representation of data through the use of graphs and figures.
Often the data are complex, but the representation should be approachable and easy-to-understand.
Marks and channels to visually represent groups in the data:
Names (see cheat sheet)
HEX codes
{eyedroppeR}The more color contrast the better!
Tahoma
Calibri
Helvetica
Arial
Find more at Google Fonts
sysfonts packageplot()barplot()hist()boxplot()axis()legend()lines(), segments(), rect(), text(), etc.{plotrix}{rgl}: for 3D interactive graphics{gplots}{scatterplot3d}: 3D scatterplots{palaeoverse}!{lattice}: trellis graphics{vcd}: for categorical data{ggplot2}: “grammar of graphics”{hexbin}: hexagonal bins{patchwork}: combine (ggplot2) plots{deeptime}!{sf}: basic objects and methods for vector data{terra}: basic objects and methods for raster data{ggplot2}: works for plotting spatial data, too{raster}: plotting raster dataYou can export plots from R in many file formats (we’ll mostly use ggsave()):
| File format | Image type | Notes |
|---|---|---|
| .jpg | Raster | Can’t have transparent parts |
| .png | Raster | Can also have transparent parts |
| .svg | Vector | Can edit in Inkscape/Illustrator |
| Vector | Not actually an image file type, but can be used |