Chapter 3
Getting Graphical
IN THIS CHAPTER
Letting patterns lead you right
Exploring base R graphics
Data visualization is an important part of statistics. A good graph enables you to spot trends and relationships you might otherwise miss if you look only at numbers. Graphics are valuable for another reason: They help you present your ideas to groups.
This concept is especially important in the data science field. Organizations rely on data scientists to make sense of huge amounts of data so that decision-makers can formulate strategy. Graphics enable data scientists to explain patterns in the data to managers and to nontechnical personnel.
Finding Patterns
Data often resides in long, complex tables. Often, you have to visualize only a portion of the table to find a pattern or a trend. A number of good examples reside in the MASS
package, so download this package into your R library by selecting the check box next to MASS
on the Packages tab.
This chapter uses the Cars93
data frame, which holds data on 27 variables for 93 car models that were available in 1993.
Figure 3-1 shows part of the data frame in the Data Editor window that opens after you type
> edit(Cars93)
Close the Data Editor window, and you can move on to visualizing the data.
Get Data Analytics & Visualization All-in-One For Dummies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.