8  Visualize data

Data visualization is an art. The purposes of visualizing data are manifold. You can emphasize facts, get known to data, detect anomalies, and communicate a large amount of information simply and intuitive. Whatever your goal is, thousand of appropriate ways exist to visualize data. Many decisions to take are simply a matter of taste. However, there are some conventions and guidelines that help you to make on average better decisions when designing a visualization:

Figure 8.1: Pie charts are problematic

Source: https://en.wikipedia.org/wiki/Pie_chart

More tips

A great resource to learn how to visualize data is Wickham & Grolemund (2023). As I cannot do that any better, I refer to that source and refrain from writing section myself. It introduces the ggplot function which is part of the ggplot2 package which, in turn, is part of the tidyverse package. Thus, if you’ve installed and loaded tidyverse, you automatically have access to ggplot. Creating beautiful and informative graphs is easy with ggplot. To proof that claim, study the chapter (Data visualization) of Wickham & Grolemund (2023). Another good resource on modern data visualization is Kabacoff (2024).