# Data Quality Toolkit

**URL:** <https://speciforum.org/t/data-quality-toolkit/1781>\
**Category:** Data Cleanup\
**Tags:** Specify-7\
**Created:** [May 31, 2024, 3:46pm UTC](https://speciforum.org/t/data-quality-toolkit/1781 "2024-05-31T15:46:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bronwyn](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/bronwyn/32/5742_2.png) [@bronwyn](https://speciforum.org/u/bronwyn)\
**Post date:** [May 31, 2024, 3:46pm UTC](https://speciforum.org/t/data-quality-toolkit/1781/1 "2024-05-31T15:46:01Z")

</div>

> 📖 This guide explains how to handle common data quality issues in a database. It breaks down each problem, explains where it occurs in the database, and provides a solution for each.

## Catalog Numbers and Other Identifiers

### Duplicate Catalog Numbers

Catalog numbers have a uniqueness rule at the Collection level by default, preventing the creation of records with duplicate catalog numbers.

## Dates

### Date Hasn’t Happened Yet

Any date field can be queried on to find dates that have not yet happened. Using the relative date function, a query can be set to look for dates that occur any number of days, months, or years in the future. A simple query showing all records that show a date greater than 0 days in the future will return all records with dates that have not happened yet.

 ![Query for a date greater than 0 days in the future](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/36620519228772ef2b3a4bdbab0ad49b910e5bc6.png)

To sort all dates in descending order, with the most recent or future dates appearing first, you could also build the following query:

 ![Query mapping for dates in descending order](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/c/ca5b7b19dde746062f0a764c046237115e263f5c.png)

### Date is Suspiciously Old

 ![Query for a date greater than 50 years in the past](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/d/db066bea0d13eea75d7641761547c4fbbd98aaba.png)

To sort all dates in ascending order, with the earliest dates appearing first, you could also build the following query:

 ![Query mapping for dates in ascending order](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/4/4fc20f06b178f2e188c73381977896d511359025.png)

### Identified Date Earlier than Collected Date

Requires two queries.

### Year, Month, and Day Values Do Not Match Date

Specify combines these fields into a single field.

## Geography

### Coordinates are Zero

When building a query on the Locality table, you can select the latitude and longitude fields from the list of fields.

In Custom Field 1, select Decimal Latitude from the first dropdown menu, select EQUALS from the second dropdown menu, and enter 0 into the blank field.

Either individually edit erroneous records by clicking the link in the Symbiota ID column (far left), or batch edit all entries using the Batch Editing Tool.

Repeat steps 2 and 3 for the Decimal Longitude field. Alternatively, you can search for records with 0 for both latitude and longitude by adding another custom search term. To do so, click the pencil icon to the right of Custom Field 1 and adjust the fields of Custom Field 2 accordingly.

 ![Query where latitude1 equal 0](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/d/d52d3851eea5a55cfbfc24f9490be4c874375744.png)

### Coordinates Do Not Fall Within Named Geographic Unit

Queries can be built for a particular geography and mapped to find outliers that fall beyond the chosen political boundary.

 ![GeoMap example](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/9/9d252a95479c2bc3cdb30c7a76bd8f0825de6b3a.jpeg)

### Georeference Metadata with no Associated Georeference

 ![Query for localities without geo ref date](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/2/29271ce744e6204120874f4fbfa98803e1829b73.png)

A query can be built to return all localities that do not have geography coordinate detail records which capture the georeferencing work done for a particular locality.

### Improperly Negated Latitudes/Longitudes

Repeat the query used in the ‘Coordinates are Zero’ section, but use LESS THAN instead of EQUALS. Compare results to their geographies.

### Invalid Coordinates

Specify prevents the creation of records with invalid coordinates during both manual data entry and WorkBench data imports.

 ![Invalid coordinate error in WorkBench](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/3/3331afa68d39d6037dfc702d3e1b77a336eb6490.png)

### Lower Geography Values are Provided, but No Higher Geography

Specify’s trees (geography, taxonomy, chronostratigraphy, lithostratigraphy, and storage) are built with data validation in mind.

Ranks can be set to be “required”, where a node must exist at a given rank (such as Country, State, County) before a lower node can be created. For example, if “State” were required as a rank in the tree, you could not enter “Douglas County” under the United States unless there was a node named “Kansas” present at the “State” rank.

If for any reason it is not possible to enforce these requirements due to the current state of the data or for any other reason, there are a couple of ways to find if there are missing nodes at intermediate ranks.

You can use the tree viewer to see if there are children without the desired parents:

 ![Geography tree viewer with missing rank](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/1/16296093afe0a86175b8e33516023939f2fc00c2.jpeg)

A query can also be built to return nodes in the tree that have missing intermediate ranks systematically to make sure ranks are not skipped.

 ![Missing Geography rank query](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/4/4851f18c5625224c19f7dc8ece3f95adfcf4fbb2.png)

 ![Query results with missing ranks](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/1/14a3dc0ef8b99aaaca1cfe6c0d7b170e64187839.png)

### Minimum and Maximum Elevation Values Mismatched

First, a query can be built in Specify to return all Localities that include the maximum and minimum elevation fields:

 ![Query to return localities with max and min elevation values](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/6/6ac4c7c543269f2ec221c62865163afcf0a9f831.png)

 ![Query results with min and max elevation values](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/f/f5e489416c9e3b7bd4f45c7a26e7c54eabcd7dd6.png)

Using a spreadsheet software, the two columns can be compared to each other using a simple formula to identify any issues with the data:

 ![](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/9/90365eabbac7fc4301630100861adf4ba0e05c72.png)

After this formula is set up, the rows can be filtered to show only cases where this comparison is “TRUE”:

 ![](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/d/dde49e1d66d11e70edd82b1ce21980029c315c37.png)

Including the GUIDs in the query

### Mismatched Country and CountryCode Values

To compare all country codes to associated country in database:

 ![All Country Code query](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/c/cc0f6cb4d1d1733a8df405cfbccab5227ef5356b.png)

To view geography (country) codes for a specific country:

 ![Query showing all codes when country equals United States](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/7/70e98d1413b4bdfc930dfc1c4c728b82ec01c31c.png)

To ensure country codes for a specific country all contain the correct value:

 ![Query for codes for a country containing correct value](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/1/11faf3c57266a006bc2b5a12cf2003c5ae0860f0.png)

Conversely, for the same purpose:

 ![Query for codes for a country not containing correct value](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/4/481e7d1023812ba8948ffd787bc2f4210a08c401.png)

### Mismatched Geographic Terms

Ex. name of a city or county has rank of state or province

Solution: lowest rank not empty, scan results to ensure ranks are accurate

- Feature request potential: interface with logic to detect same spelling of nodes with differing ranks

 ![Query for not empty lowest rank](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/5/5889e0ba419589fdae2e9eb8f2cb72b23ce94d7f.png)

### Missing Geodetic Datum

> **[Darwin Core Quick Reference Guide](https://dwc.tdwg.org/terms/#dwc:geodeticDatum)**

 ![Query for empty Datum](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/1/1719a08e3542b6cafdc51f2f4fbc3265815ea4fc.png)

### Missing Latitudes/Longitudes

 ![Query for empty Latitude1 and Longitude1](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/5/5d12ae450130963c520768b17d9c577f6b738e67.png)

### Misspelled Geographic Unit Names

When using Specify’s data entry forms, existing Geography records can be selected using the Geography query combo box, avoiding the need to enter existing Geography names manually.

To find existing names that are misspelled, query with LIKE.

- % represents zero or more characters. For example, d%t will find any word that begins with d and ends with t (dot, dust, dealt, etc.). Tes% will find any word that starts with Tes.

- \_ represents a single character. It differs from ‘%’ in that is only ever a single character. c\_t will only find words that start with c, contain one of any other character, and end in t (cat, cot). sp\_\_\_\_y will find any word that starts with sp, has 4 of any other character, and end in y (specify).

- The wildcards can be used in conjunction. For example, to find all words that must be at least 3 characters in length: \_\_\_%

- To find all words that start with C and must have at least two following characters, and end with any single character followed by el (such as Caramel): C\_\_%\_el

 ![Query for Taxon using % wildcard](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/9/92d8e8165d7e29eb62de8d1ea0a6b1044efcc8e4.png)

## Taxonomy

### Misspelled or Invalid Taxonomic Names

When importing data, users can configure matching behavior

**Ignore when blank:**

This means that blank values are considered “null”. This means no value in the cell indicates to the WorkBench that it can be ignored for matching purposes when looking for existing records

**Ignore always:**

If the “Author” value differs slightly from an existing Taxon record in your database but matches other mapped fields like “Name,” it won’t stop it from matching existing records during the WorkBench upload. This helps avoid unnecessary duplication!

When importing new taxonomy data or collection object records, it’s advisable to skip non-essential matching fields with potentially slightly different non-essential data (think Taxon authors or common names) to prevent duplication.

**Never ignore:**

Field value is never ignored and even if blank requires that the matching record also has a blank field

**Allow null:**

Specifies whether blank cells are errors or not during validation

Default value

> [@The Specify 7 WorkBench](https://speciforum.org/t/the-specify-7-workbench/540#matching-behavior-5):
>
> open_book This guide introduces the WorkBench, a tool for importing, creating, and editing large datasets. It details the workflow from importing dataset and mapping columns using the AutoMapper, to validating data and solving matching ambiguities. The documentation also covers advanced grid features and saving upload plans for frequent imports. Get started by clicking WorkBench workbench_ in the navigation bar. The WorkBench offers the following features: You can import data from …

### Unknown Higher Taxonomy

Specify Network can retrieve higher taxonomic information for each record individually!

 ![Specify Network Information](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/0/06180834f41193b1e7aca2f284d398eb3add3418.jpeg)

## Other Issues

### Incorrect Character Encodings

 ![WorkBench import file](https://canada1.discourse-cdn.com/flex029/uploads/specifysoftware/original/2X/5/5a1cb1a186ee7ab727f27908d32bc6e08a33caf3.png)

You can select the character encoding and delimiter when creating a new data set from an imported file to prevent any character encoding issues.

---

<div class="post-metadata">

**Author:** ![Grant](https://yyz1.discourse-cdn.com/flex029/user_avatar/speciforum.org/grant/32/4255_2.png) [@Grant](https://speciforum.org/u/Grant)\
**Post date:** [October 29, 2025, 9:27pm UTC](https://speciforum.org/t/data-quality-toolkit/1781/2 "2025-10-29T21:27:04Z")

</div>

Pinned on October 29, 2025, 9:27pm UTC


