Posts

Showing posts with the label tidy

The Grammar of Graphics and Tidy Data

The Grammar of Graphics and Tidy Data Grammar of Graphics If you have used R you have probably used ggplot2, the go-to plotting package. This package was created by Hadley Wickham. He describes ggplot in depth in this paper "A grammar of graphics is a tool that enables us to concisely describe the components  of a graphic. Such a grammar allows us to move beyond named graphics (e.g., the “scatterplot”) and gain insight into the deep structure that underlies statistical graphics." It builds on the paper by Wilkinson, Anand, and Grossman (2005)  and implements the ideas to create superior graphs. I highly recommend reading both of these.  Thinking in terms of a grammar of graphics helps you intuit how to visualize what you want. It will save you time and effort trying to memorize the syntax for creating a bar chart vs a stacked bar chart with a dual axis. One downside, though, is you will start seeing all the limitations of your current 'all in one' graphing so...