Skip to Main Content
Data Analytics & Visualization All-in-One For Dummies
book

Data Analytics & Visualization All-in-One For Dummies

by Jack A. Hyman, Luca Massaron, Paul McFedries, John Paul Mueller, Lillian Pierson, Jonathan Reichental, Joseph Schmuller, Alan R. Simon, Allen G. Taylor
April 2024
Beginner content levelBeginner
832 pages
20h 32m
English
For Dummies
Content preview from Data Analytics & Visualization All-in-One For Dummies

Chapter 4

Kicking It Up a Notch to ggplot2

IN THIS CHAPTER

Bullet Graduating to ggplot2

Bullet Wrapping things up

The base R graphics toolset will get you started, but if you want to shine at visualization, it’s a good idea to learn ggplot2. Created by R megastar Hadley Wickham, the gg in the package name stands for “grammar of graphics,” and that’s a good indicator of what’s ahead. That’s also the title of the book (by Leland Wilkinson) that is the source of the concepts for this package.

In general, a grammar is a set of rules for combining things. In the grammar that people are most familiar with, the things happen to be words, phrases, and clauses. The grammar of our language tells you how to combine these components to produce valid sentences.

So, a “grammar of graphics” is a set of rules for combining graphics components to produce graphs. Wilkinson proposed that all graphs have underlying common components — like data, a coordinate system (the x- and y-axes you know so well, for example), statistical transformations (like frequency counts), and objects within the graph (dots, bars, lines, or pie slices, for example — to name just a few).

Just as combining words and phrases produces grammatical sentences, combining graphics components produces graphs. And just as some sentences are grammatical ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Science For Dummies

Data Science For Dummies

Lillian Pierson
Data Science For Dummies, 2nd Edition

Data Science For Dummies, 2nd Edition

Lillian Pierson, Jake Porway

Publisher Resources

ISBN: 9781394244096Purchase Link