Data Visualization teaches the reader how to think about good data visualization, and how to do it. It begins with a discussion of some core ideas about how we see graphs, what makes some of them better than others, and how to begin cultivating good judgment about visualization. Then, through a series of worked examples, the book shows you how to build plots piece by piece, beginning with scatterplots and summaries of single variables, then moving on to more complex graphics. Topics covered include plotting continuous and categorical variables, layering information on graphics; faceting grouped data to produce effective “small multiple” plots; transforming data to easily produce visual summaries on the graph such as trend lines, linear fits, error ranges, and boxplots; creating maps, and also some alternatives to maps worth considering when presenting country- or state-level data. Plotting estimates from statistical models and from complex survey designs are also covered. The book then explores the process of refining plots to accomplish common tasks such as highlighting key features of the data, labeling particular items of interest, annotating plots, and changing their overall appearance. Finally, it discusses some strategies for presenting graphical results in different formats, and to different sorts of audiences.
Teaching and Learning Materials
socvizR package provides datasets, functions, and a course packet to use as you work through the book yourself or for use in the classroom. You can learn more about it at its website.
- The code for almost all the figures in the book (along with other examples and supplementary material) is included in a series of R Markdown notebooks contained in the
socvizpackage. But this material is also available separately. You can get it via GitHub or by downloading a zip file of all the material directly.
By Kieran Healy