liveBook · Manning

Data cleaning

As explained in Everyday Data Visualization

Data cleaning is the process of detecting and correcting inaccurate, inconsistent, or improperly formatted data.

Data cleaning makes existing data usable by detecting mismatched formats, inconsistent values, and other obstacles to combining information. It can be a quick formatting adjustment—or reveal that the data needs a human-created mapping. section 9.3.1

Use data cleaning to:

  • Standardize values when two systems describe the same thing differently but preserve a comparable structure. section 9.3.1
  • Create or request a mapping key when values are structured so differently that software cannot reliably match them. section 9.3.1

When team names refuse to join

One system stores team names in uppercase without spaces; another uses inconsistent formats. A direct table join may return only a few matches. Light cleaning might fix formatting, but fundamentally different names require a mapping table linking each version. section 9.3.1

Figure 9.9 System A stores team names in the format on the left, uppercase with no spaces, while system B on the right doesn’t follow any particular format. If you try to join these tables on System A’s team name equals system B’s team name, you might, at best, get a few results, but certainly not all of them. You’ll need to find some way to link them.
09-09

Compare the two team-name formats to see why an apparently simple join can fail. section 9.3.1

How Everyday Data Visualization covers it

How deep it goes
Explains formatting cleanup and mapping keys, but stops short of prescribing a detailed cleaning workflow.
Examples
Uses team names stored differently across two systems and a mapping table for linking unmatched values.
What it assumes
Assumes familiarity with tables and joins while emphasizing that data availability does not guarantee usable data.
What you can do after
Diagnose/debug with it whether mismatched values need formatting cleanup or a manually maintained mapping key.
How it connects
Connects database joins with requirements gathering and data integration.

Also explained in

Compare how 14 books explain data cleaning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Everyday Data Visualization. The section links point to the parts of the book it draws on.