Score four quality dimensions on the raw customer file
Task
Turn four data quality dimensions into numbers for the raw customer file, each defined precisely enough that anyone would calculate the same score.
Steps
- Completeness: rows with a non-empty email, divided by all rows. Validity: rows whose signup_date is YYYY-MM-DD, divided by all rows.
- Consistency: rows whose region is exactly North, South, East or West, divided by all rows. Uniqueness: distinct lower-cased emails divided by non-empty emails.
- Record them in
lab/quality/scores.txtascompleteness: N,validity: N,consistency: Nanduniqueness: N, percentages to one decimal place.
Verify
These checks run in a POSIX shell with Python 3: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. On Windows, python3 is often a Microsoft Store placeholder that prints “Python was not found”; run alias python3=py in Git Bash first.
grep -E '^(completeness|validity|consistency|uniqueness): ' lab/quality/scores.txt
Completeness 93.6, validity 90.4, consistency 87.3 and uniqueness 95.2. Each is one planted defect measured: 20 blank emails, 30 day-first dates, 40 region variants and 14 duplicated customers. A score is useful only with its definition; "90% valid" means nothing until it says valid how.
This is an independent study companion for CompTIA Data+ DA0-002 and is not produced by or endorsed by CompTIA.