tdwg / bdq

Biodiversity Data Quality (BDQ) Interest Group
https://github.com/tdwg/bdq
43 stars 7 forks source link

TG2-VALIDATION_COUNTRYCODE_NOTEMPTY #98

Open iDigBioBot opened 6 years ago

iDigBioBot commented 6 years ago
TestField Value
GUID 853b79a2-b314-44a2-ae46-34a1e7ed85e4
Label VALIDATION_COUNTRYCODE_NOTEMPTY
Description Is there a value in dwc:countryCode?
TestType Validation
Darwin Core Class dcterms:Location
Information Elements ActedUpon dwc:countryCode
Information Elements Consulted
Expected Response COMPLIANT if dwc:countryCode is bdq:NotEmpty; otherwise NOT_COMPLIANT
Data Quality Dimension Completeness
Term-Actions COUNTRYCODE_NOTEMPTY
Parameter(s)
Source Authority
Specification Last Updated 2023-09-18
Examples [dwc:countryCode="Australia": Response.status=RUN_HAS_RESULT, Response.result=COMPLIANT, Response.comment="dwc:countryCode is bdq:NotEmpty"]
[dwc:countryCode="": Response.status=RUN_HAS_RESULT, Response.result=NOT_COMPLIANT, Response.comment="dwc:countryCode is bdq:Empty"]
Source
References
Example Implementations (Mechanisms) FilteredPush:geo_ref_qc
Link to Specification Source Code geo_ref_qc DwCGeoRefDQ,validationCountrycodeNotempty()
Notes
iDigBioBot commented 6 years ago

Comment by Lee Belbin (@Tasilee) migrated from spreadsheet: Added post scoring for consistency

cgendreau commented 6 years ago

This test should probably use the same word "EMPTY" as https://github.com/tdwg/bdq/issues/20 instead of NULL.

ArthurChapman commented 4 years ago

Need to add somewhere (Expected Response) a reference to ISO 3166. I have added a reference in the References.

Tasilee commented 4 years ago

Edited your comment (odd that you can) to 3166.

ArthurChapman commented 4 years ago

Thanks @Tasilee - was just about to make that correction.

Tasilee commented 4 years ago

Looking at this one again, we aren't checking for a valid dwc:countryCode, only that it is not EMPTY. A reference to ISO 3166 is fine, but isn't needed in Expected response.

tucotuco commented 4 years ago

Agreed.

Tasilee commented 12 months ago

Splitting bdqffdq:Information Elements into "Information Elements ActedUpon" and "Information Elements Consulted".

Also changed "Field" to "TestField", "Output Type" to "TestType" and updated "Specification Last Updated"

chicoreus commented 1 month ago

By including this test in CORE we are asserting that any data from the high seas is not fit for any of the use cases that include this test.

We need some specific recommendation for handling data from the High Seas. Country code, using the ISO list, should be empty for data from the high seas. This test needs some way to accomodate that to allow for data from the high seas being fit for use.

Tasilee commented 4 weeks ago

I agree @chicoreus: CORE suggests a universal use case. Does this raise the need for two other use cases - terrestrial and marine ecology?

We could set this test as Supplementary for terrestrial domain, and optionally generate an equivalent for the marine domain (using dwc:waterBody?).

As you suggest, we may be able to accommodate by trying to detect marine domains (dwc:waterBody, dwc:decimalLatitude and dwc:decimalLongitude, dwc:minimumDepthInMeters and dwc:maximumDepthInMeters....or ?). The simplest ER would be something like

"COMPLIANT if dwc:countryCode is NOT_EMPTY, or if any of wc:waterBody, dwc:minimumDepthInMeters or dwc:maximumDepthInMeters are NOT_EMPTY..."?

ArthurChapman commented 4 weeks ago

dwc:waterBody includes rivers and lakes etc. which are inside countries. I think we also decided sometime earlier, that waterbody in TGN was unworkable.

chicoreus commented 4 weeks ago

On Tue, 13 Aug 2024 15:57:56 -0700 Lee Belbin @.***> wrote:

"COMPLIANT if dwc:countryCode is NOT_EMPTY, or if any of wc:waterBody, dwc:minimumDepthInMeters or dwc:maximumDepthInMeters are NOT_EMPTY..."?

dwc:waterBody does not help us. Parts of the Atlantic Ocean are high seas, parts are within the EEZs of various countries, similarly for many marine water bodies at many heirarchical levels...

tucotuco commented 3 weeks ago

The UN/LOCODE system uses "XZ" to represent international waters or high seas. This is not an official ISO country code but is commonly used in logistics and transportation systems. I think this could be a good solution for covering fitness for use of data from the high seas.

tucotuco commented 3 weeks ago

Also, ZZ is an often used user-defined ISO code taken to mean "unknown". This would apply to situations where the location is unknown (i.e., not found or explicitly stated as unknown) as well as situations where the location is known, but can not be assigned to a single country code (e.g., "Argentina/Uruguay").