4.3 Summary

ds4psy: (4) Exploring data

The goal of EDA is to discover patterns in data. (…)
The role of the data analyst is to listen to the data in as many ways as possible
until a plausible “story” of the data is apparent, even if such a description
would not be borne out in subsequent samples.

John T. Behrens (1997, p. 132)

As we have seen, conducting an explanatory data analysis (EDA) is not like cooking a meal according to a fixed recipe, but more like actively engaging in detective work: We need to query our data and increase our understanding by iteratively asking and answering questions.32

Although the process of EDA is tailored to the constraints and demands of a particular dataset, the attitude and mindest of EDA can still be practised and taught. As any actual EDA depends not just on the data, but also on the background and interests of the data analyst, we cannot distill a single sequence of steps that is always applicable. Nevertheless, skilled data detectives are not proceeding randomly, but organize the process by honoring a set of principles.

4.3.1 The principles of EDA

As a quick summary, here are the ten principles of EDA mentioned above:

  1. Start with a clean slate and explicitly load all data and all required packages.

  2. Structure, document, and comment your analysis.

  3. Make copies (and copies of copies) of your data.

  4. Know your data (variables and observations).

  5. Know and deal with unusual variables and unusual values.

  6. Inspect the distributions of variables.

  7. Use filter variables to identify and select sub-sets of observations.

  8. Inspect relationships between variables.

  9. Inspect trends over time or repeated measurements.

  10. Create graphs that convey their messages as clearly as possible.

Taking into account these principles does not guarantee any results, but provides valuable insights into the structure and contents of a dataset. Gaining such insights before embarking on statistical tests minimizes the risk of missing something important or violating key assumptions. But before getting carried away by discovering some pattern in your data, always keep in mind:

  • Science 101: To really find something, we need to predict it — and ideally replicate it under different conditions.

4.3.2 Learning goals

After working through this chapter, you are able to conduct an explanatory data analysis (EDA), which includes:

  1. knowing the difference between exploratory and confirmatory data analysis,
  2. initializing and organizing a new project,
  3. screening your data (observations and variables),
  4. checking for unusual values and distributions,
  5. inspecting trends (over time or multiple measurements),
  6. inspecting relationships between variables,
  7. structuring and commenting your analysis and results.

From a technical viewpoint, we combined two core components of the tidyverse (Wickham, 2019c) to quickly answer questions about our data:

Although conducting an EDA requires many skills and tools, the process and its results are primarily driven by the nature and properties of the data and your intellectual curiosity. You can assess your current knowledge and skills by completing the following exercises.

  1. If we wanted to stick with our cooking metaphor: EDA is like improvising a quick dish out of the ingredients and tools available, but with the goal of creating a more elaborate and refined meal soon.↩︎