5 Assessing and cleaning data
In data analytics, finding a dataset is not the same as finding a dataset that deserves to be analyzed. A file can open perfectly in Excel, contain thousands of rows, and appear rich in information while still being unsuitable for the managerial question at hand. Its observations may be too old, its variables may not correspond to the concepts we want to study, its origin may be unclear, its measures may be poorly documented, or the data may have been collected for a purpose that limits the conclusions we can reasonably draw. For this reason, evaluating a dataset should happen before significant effort is invested in cleaning, transforming, visualizing, or modelling it.
5.1 Assessing data with the CRAAP test
The CRAAP Test provides a memorable structure for doing this evaluation. Developed as an information-evaluation tool at Meriam Library, California State University, Chico, the framework asks users to consider five dimensions: Currency, Relevance, Authority, Accuracy, and Purpose. The original guidance treats these criteria as questions for evaluating information sources and explicitly notes that the relative importance of the criteria depends on the information need.The same five ideas can be adapted to datasets by focusing on when the observations were collected, whether the dataset fits the business question, who produced it, how its measurements were generated and documented, and why the data were collected in the first place.
5.1.1 Currency: Are the data timely enough?
Currency refers to the timeliness of information. The original CRAAP guidance asks when information was published or posted, whether it has been revised or updated, and whether the topic requires current information or whether older material will work. Applied to data, the first question should normally be even more specific: when were the observations actually collected? A dataset can be downloaded today while describing conditions from many years ago. The date on a webpage or file therefore does not necessarily tell us the period represented by the data.
For a management problem, currency should be evaluated relative to the decision rather than according to a universal rule that newer is always better. Imagine a manager deciding where to open a new retail location. Population figures from a much earlier census may accurately describe that historical period, but they may provide weak evidence about the current size and composition of a fast-changing community. In contrast, if the analytical question concerns how a market changed over the previous decade, older observations are not a defect: they are essential evidence. The important question is whether the temporal coverage of the dataset matches the temporal scope of the question.
It is helpful to identify at least three different dates where possible:
- the period during which observations were collected
- the date on which the dataset was released
- the date on which it was most recently updated.
It is also helpful to ask whether the source is updated periodically. A dataset that is refreshed regularly may be useful for recurring managerial decisions, while a one-time survey may be appropriate for a particular analysis but unsuitable for monitoring change over time.
5.1.2 Relevance: Do the data fit the business question?
Relevance is the importance of information for a particular need. In the original CRAAP framework, users are asked whether information relates to the topic or answers the question and whether it is appropriate for the intended audience and purpose. For datasets, relevance becomes a concrete exercise in matching a business question to the structure and coverage of the data.
A useful dataset should contain the right population or market, geography, time period, variables, and unit of observation. The unit of observation is especially important. It describes what one row represents. A row might represent an individual customer, a transaction, a company, a neighbourhood, a province, or a month. Two datasets can concern exactly the same topic while supporting very different analyses because their units of observation differ.
Consider the question: “Where should a company open a new coffee shop in Nova Scotia?” A provincial table containing Nova Scotia’s total population is related to the topic, but it is unlikely to be sufficiently granular for choosing among locations. A community-level dataset would be more relevant. Useful variables might include population, population growth, household income, business locations, commuting patterns, or other indicators justified by the proposed decision. A variable may be interesting without being analytically necessary. Relevance means asking what the business question requires, not collecting every field that happens to be available.
The same principle applies when assessing a dataset title or description. A dataset labelled “Halifax Housing Data” may sound ideal for a question about housing prices, but closer inspection might reveal that each row represents an annual provincial average rather than an individual sale or neighbourhood. Alternatively, it might contain property characteristics without any price variable. The dataset is topically related yet analytically inadequate.
Before downloading a large file, it is helpful to inspect its documentation, preview, variable list, or data dictionary and ask: What does each row represent? Which variables are present? What population is included? What geography is available? Which years are covered? Answering those questions often eliminates unsuitable datasets before time is spent cleaning them.
5.1.4 Accuracy: How were the values produced?
In the original CRAAP framework, Accuracy concerns reliability, truthfulness, and correctness. The guidance asks where the information comes from, whether it is supported by evidence, whether it has been reviewed, and whether it can be verified against another source. For datasets, accuracy assessment begins by asking how observations and variables were produced and what the values actually mean.
Good data documentation can be as important as the data values. Analysts should look for the collection methodology, variable definitions, units of measurement, coding conventions, sampling information where applicable, and metadata describing the dataset. Without this information, even apparently simple numbers can be ambiguous. A field labelled “Income” with the value 72, for example, is uninterpretable without context. Does 72 mean $72, $72,000, monthly income, annual income, individual income, or household income? A technically clean column can remain conceptually unusable.
Accuracy also involves examining whether important values can be checked. This does not mean manually validating every observation. It means asking whether the source explains how values were generated and whether key figures or patterns can be compared with credible benchmarks when appropriate. Documentation may also reveal estimation, suppression, rounding, sampling, or other characteristics that affect interpretation.
It is easy to confuse accuracy assessment with data cleaning. Some issues do overlap, but the distinction is important. If one date appears as “2026-03-01” and another as “03/01/2026,” the analyst has a formatting and cleaning problem. If the analyst does not know whether a date column represents transaction date, reporting date, or data-entry date, the problem is one of definition and documentation. Standardizing the format cannot solve uncertainty about what the variable signifies.
This distinction reinforces a broader lesson: cleaning improves the consistency of the representation of data; it does not establish that the underlying observations are valid measures of what the analyst intends to study.
5.1.5 Purpose: Why were the data collected?
Purpose is the reason information exists. The original CRAAP guidance asks whether a source is intended to inform, teach, sell, entertain, or persuade, whether the source makes its intentions clear, and whether a point of view or bias may affect the information. For datasets, the parallel question is: Why were these observations collected in the first place?
Data may be collected for administration, service delivery, billing, regulatory reporting, research, marketing, public information, advocacy, or many other reasons. The original purpose shapes what variables are captured and how they are defined. A gym’s membership system, for example, may contain excellent information about membership type, payment status, visits, and cancellations because those fields support routine operations. The same database may contain little information about why members value the gym because understanding attitudes was not the system’s operational purpose.
Purpose therefore helps analysts understand both strengths and absences. A dataset created for billing may have precise payment records but limited behavioural context. A survey created to study customer satisfaction may contain detailed attitudes but rely on responses from only those who participated. Neither purpose automatically makes the data good or bad. The point is to consider how the collection purpose may influence what was measured, what was omitted, how categories were created, and what conclusions the dataset can support.
It is also helpful to consider whether their proposed analytical use is compatible with the evidence present in the dataset. Data often become attractive simply because they are available. The CRAAP framework encourages the analyst to reverse that logic: begin with the decision and evaluate whether the source was produced in a way that makes it suitable evidence for that decision.
5.1.6 CRAAP assessment is not data cleaning
The distinction between dataset assessment and dataset cleaning is one of the most important lessons. CRAAP asks, “Should we use this dataset for this question?” Data cleaning asks, “What must we standardize, correct, reshape, or document before we analyze the dataset?”
Typical cleaning issues include duplicate records, inconsistent category labels, missing values, leading or trailing spaces, dates represented in multiple formats, and numbers stored as text. These are important technical problems. But successfully fixing them does not answer questions about currency, relevance, provenance, methodology, or purpose. You can spend an hour producing an immaculate spreadsheet that still cannot answer the managerial question.
Conversely, CRAAP assessment does not mean that a suitable dataset will be clean. An authoritative and highly relevant administrative dataset may contain awkward codes, structural blanks, duplicated exports, or hierarchical fields that require substantial transformation. Dataset assessment and cleaning are complementary rather than competing processes. Evaluation determines whether the source deserves further investment; cleaning prepares an accepted source for analysis.
5.1.7 Using CRAAP in the analytics workflow
CRAAP fits naturally between finding a candidate source and retrieving it for detailed work. A practical sequence is: define the business question; identify the observations and variables that would answer it; search for candidate datasets; apply the CRAAP criteria; decide whether the evidence is suitable; then retrieve, clean, analyze, and communicate the results.
This ordering prevents a common inefficiency. We often download the first promising file we find, spend substantial effort repairing columns and formats, and only later discover that the file covers the wrong period, geography, population, or unit of observation. A short evaluation at the beginning can prevent extensive work on data that were never suitable.
The process is also iterative. A CRAAP review may reveal that one dataset is useful for population but lacks business-location information. Rather than rejecting it entirely, an analyst might retain it as one component of a multi-source analysis and search for another authoritative dataset that fills the missing requirement. Evaluation therefore supports thoughtful source combination as well as source rejection.
The CRAAP Test gives beginning analysts a straightforward vocabulary for asking difficult but necessary questions about evidence. Currency asks whether the observations are timely enough. Relevance asks whether the dataset fits the population, geography, period, variables, and unit of observation required by the question. Authority asks who stands behind the data. Accuracy asks how the values were produced, defined, documented, and verified. Purpose asks why the observations were collected and how that purpose may shape what the dataset can tell us.
The central lesson is that data quality cannot be reduced to tidy rows and columns. Before analysts worry about duplicates, formatting, formulas, charts, or models, they should establish that the dataset is a defensible source of evidence for the decision being made. CRAAP provides a practical checkpoint: evaluate first, clean second, analyze third.
The habit to develop is simple: when a promising file appears in a search result, resist the urge to download immediately. Ask what period it represents, whether its structure matches the question, who created it, how its measurements were produced, and why those measurements exist. Then make an explicit decision: use the dataset, use it while acknowledging limitations, or keep searching. That judgment is not separate from analytics. It is one of the first analytical decisions a manager or analyst makes.
5.2 Cleaning data
Finding and evaluating a dataset are only the beginning of an analytics project. Once an analyst has decided that a dataset is sufficiently relevant and credible for a business question, the next task is to make the data usable. Real organizational data rarely arrive as a perfectly structured table with consistent categories, complete observations, correct data types, and one unambiguous record for every entity. Instead, analysts encounter duplicated records, blank cells, inconsistent spelling and capitalization, multiple date formats, numbers stored as text, impossible values, and variables whose structure does not match the analysis they want to perform.
Data cleaning is the systematic process of identifying and addressing these kinds of problems before analysis. IBM describes data cleaning as identifying and correcting errors and inconsistencies in raw datasets so that the data are more accurate, complete, consistent, and usable for analysis or decision-making. Common problems include duplicates, missing values, inconsistencies, syntax errors, irrelevant data, and structural errors. This definition is useful because it emphasizes that cleaning is not cosmetic. The objective is not a prettier spreadsheet. The objective is a dataset whose structure and values can support dependable analysis.
At the same time, cleaning requires judgment. Not every unusual value is an error, not every blank should be filled, and not every repeated observation is a duplicate. An analyst who mechanically “fixes” everything that looks unusual can damage valid information. Good data cleaning therefore combines technical operations with an understanding of what each row and variable mean.
5.2.1 Begin by understanding the structure of the data
Before changing anything, the analyst should understand the dataset as it currently exists. Start with the unit of observation: what does one row represent? A row may represent a customer, a transaction, a product, a gym visit, a month, or a geographic area. Next identify what each column represents and what type of value should appear there. This step sounds simple, but many cleaning decisions depend on it.
Consider the Harbour Fitness exercise used in class. If each row represents a gym member, then CustomerID should identify a member, MembershipType should contain a membership category, VisitsLast30Days should represent a count, and CancellationDate should contain a date only when a cancellation has occurred. Once the intended structure is clear, potential problems become easier to distinguish from legitimate variation.
A first inspection should look for unexpected blanks, repeated identifiers, surprising minimum or maximum values, inconsistent category names, and columns whose apparent data type does not match their meaning. The goal is diagnosis, not immediate correction. Keeping an untouched copy of the raw data is a sound classroom and workplace habit because it preserves the original evidence and makes cleaning decisions traceable.
5.2.2 Duplicates: repeated data are not always duplicate data
Duplicate records are a common cleaning issue. IBM includes duplicate records among typical forms of dirty data, and Microsoft Power Query provides transformations for identifying, keeping, and removing duplicate rows. Microsoft also notes that duplicate comparison in Power Query is case-sensitive, an important detail when categories differ only in capitalization.
The central question is not simply “Does this value appear twice?” but “Should these rows represent one observation or two?” Two customers may have the same name. Two transactions may have the same amount. Neither situation necessarily represents duplication. By contrast, if every field in two member records is identical because the same export row was appended twice, the analyst may have good reason to treat one as an accidental duplicate.
A first step is to identify the fields that establish uniqueness. In a customer file, CustomerID may be more informative than customer name. In a transaction file, a transaction identifier may be required. If no reliable key exists, duplicate detection becomes a substantive judgment based on combinations of fields and business knowledge.
Order also matters. If “Nova Scotia” and “nova scotia” are intended to be the same value, case differences can prevent otherwise identical rows from matching. Microsoft explicitly warns that Power Query is case-sensitive when working with duplicates and suggests applying an uppercase or lowercase transformation first when case should not matter. This illustrates why cleaning should be planned as a sequence rather than as a random list of fixes.
5.2.3 Standardizing text and categories
Categorical variables often contain several textual representations of the same concept. A membership field may contain “Monthly,” “monthly,” and “MONTHLY.” A province could appear as “NS,” “ns,” “N.S.,” or “Nova Scotia.” If those differences are not meaningful, software may treat them as separate categories, producing misleading counts and fragmented summaries.
Standardization means choosing a consistent representation for values that are known to mean the same thing. The analyst might map all legitimate Nova Scotia variants to “NS,” all monthly membership variants to “Monthly,” and Y/Yes/yes to “Yes.” The important phrase is “known to mean the same thing.” Standardization should be based on semantics, documentation, or business rules rather than visual similarity alone.
Text also frequently contains leading or trailing spaces or inconsistent capitalization. These problems can be difficult to see while still interfering with joins, filtering, grouping, and duplicate detection. Cleaning text may therefore include trimming unnecessary spaces and applying a consistent case convention. Names require particular care, because automated capitalization rules can produce incorrect results for legitimate names. A useful teaching principle is that automation should standardize what is genuinely standardized and flag what requires review.
5.2.4 Missing values: blank does not always mean missing
Missing data are often introduced as empty cells, but an empty cell can have several meanings. It may represent information that was not collected, a value that is unknown, a value that does not apply, or a data-entry or import problem. Treating these situations as equivalent can distort an analysis.
The Harbour Fitness dataset provides a useful example. For a member whose MembershipStatus is Active, a blank CancellationDate and CancellationReason are structurally appropriate: the member has not cancelled. Those cells should not be “fixed” by inserting a date or a cancellation reason. By contrast, a Cancelled member whose CancellationDate is blank may have genuinely missing information that requires investigation. The visible symptom is the same, a blank cell, but the meaning is different.
This distinction leads to an important rule: do not impute or replace missing values simply because an Excel cell is empty. First determine what the blank signifies. Depending on the context, an analyst may leave missing values as missing, retrieve the information from another source, exclude affected observations from a particular analysis, create an explicit category such as “Unknown” when conceptually appropriate, or apply a justified statistical imputation method. The correct approach depends on why the information is missing and how the variable will be used.
A second important distinction is between zero and missing. Zero is a value. Blank means the value is absent or not recorded unless documentation says otherwise. Replacing an unknown number of gym visits with zero asserts that the member made no visits. That assertion requires evidence.
5.2.5 Data types and formats
A value can look correct to a person while being stored incorrectly for analysis. A monthly fee displayed as “$59.99” might be text rather than a numeric value. A date might be a recognizable string rather than an Excel date. A customer identifier composed of digits may be an identifier, not a number on which arithmetic makes sense.
Cleaning therefore includes assigning appropriate data types. Numeric measures should normally be stored as numeric values if they will be calculated or summarized. Dates should be represented consistently as actual dates when time-based analysis is required. Text categories should remain text. Identifiers should preserve their intended representation, including leading zeros when those zeros are part of the identifier.
Mixed date representations are particularly instructive: “2026-03-10,” “03/10/2026,” and “Mar 10 2026” may refer to the same day, but ambiguous regional formats can also lead to misinterpretation. The analyst should first establish what the source convention means, convert valid values into a true date type, and then apply a consistent display format. Changing how a date looks is not the same as correcting an incorrectly interpreted date.
5.2.6 Invalid, impossible, and suspicious values
Cleaning also involves finding values that violate known rules. Some invalid values are easy to recognize: negative quantities in a field that cannot logically be negative, impossible dates, or text in a numeric field. Others require domain knowledge. A value of 200 might be impossible for age but unremarkable for monthly sales.
Range checks and business rules are useful because consistency alone cannot reveal all errors. If MembershipStatus is “Active” but CancellationDate contains a recent date, the row may violate the logical relationship among variables even though every individual cell has a valid format. Similarly, an annual membership fee recorded as $6.99 might be numerically valid but suspicious relative to known pricing rules.
Suspicious does not mean wrong. Outliers are especially important here. A very large sales transaction may represent an error, or it may be the most important transaction in the dataset. Analysts should investigate unusual observations before deleting or replacing them. Cleaning should preserve legitimate variation rather than force the data to look ordinary.
5.2.7 Documenting the cleaning process
A cleaned dataset should not become a mysterious replacement for the raw data. Good practice is to preserve the source, document transformations, and make important decisions reproducible. A simple cleaning log can identify the field, the problem found, the action taken, and the reason for the action.
For example, a data cleaning log might state that province variants “NS,” “ns,” “N.S.,” and “Nova Scotia” were standardized to “NS” because they refer to the same province.
Documentation is particularly valuable when cleaning requires judgment. It allows another analyst, instructor, manager, or future version of the same analyst to understand why a transformation was made. It also makes limitations explicit instead of silently hiding uncertainty.
5.2.8 A practical cleaning workflow
data cleaning can be organized into a manageable sequence. The precise order will vary by dataset, but the following workflow encourages deliberate decisions rather than ad hoc editing:
- Preserve an untouched copy of the source data.
- Identify the unit of observation and understand every important variable.
- Inspect data types, categories, blanks, duplicates, ranges, and obvious structural problems.
- Standardize text, categories, units, and data types when equivalence is known.
- Investigate duplicates using the fields that establish uniqueness.
- Distinguish structural blanks from genuinely missing data before deciding how to handle them.
- Check business rules and relationships among variables for invalid or suspicious values.
- Reshape the table if the current structure does not match the intended analysis (see chapter 6).
- Document transformations and unresolved limitations.
- Inspect the cleaned result before beginning analysis.
This workflow is intentionally conservative. The objective is not to maximize the number of changes. It is to make only the changes that can be justified. A good cleaning decision should be explainable in plain language: what problem was identified, what was changed, and why the change preserves or improves the meaning of the data.
Data cleaning is not a preliminary chore that can be separated from analytical thinking. It is the process of making raw observations consistent and usable while protecting their meaning. The analyst must recognize duplicates without deleting legitimate repetition, standardize categories without collapsing meaningful differences, handle blanks without inventing information, convert data types without misinterpreting values, investigate anomalies without automatically removing them, and reshape data in a way that matches the intended unit of analysis.
A useful approach is to treat every cleaning operation as a claim. Replacing “N.S.” with “NS” claims that the two labels mean the same thing. Removing a row claims that it does not represent a distinct observation. Replacing a blank with zero claims that the true value is zero. Converting a date claims that its original representation has been interpreted correctly. Each claim should be supported by evidence, documentation, or a defensible business rule.
The broader analytics sequence is therefore: define the business question, find candidate data, evaluate the source, retrieve the data, clean and transform the observations, analyze them, and communicate the result. The CRAAP Test helps decide whether the dataset deserves to enter that process. Data cleaning then ensures that the accepted dataset is represented in a form that supports analysis. Neither stage can substitute for the other.
5.3 Sources
IBM. (2024, November 29). What is data cleaning? https://www.ibm.com/think/topics/data-cleaning
Jones, M. (2017, December 14). Working with messy data. IBM Developer. https://developer.ibm.com/tutorials/ba-cleanse-process-visualize-data-set-1/
Meriam Library, California State University, Chico. Evaluating Information — Applying the CRAAP Test. The source describes the CRAAP criteria as Currency, Relevance, Authority, Accuracy, and Purpose and provides guiding questions for evaluating information.
Microsoft. (2026, August 10). Working with duplicate values: Power Query. Microsoft Learn. https://learn.microsoft.com/en-us/power-query/working-with-duplicates