bdq
bdq copied to clipboard
TG2-AMENDMENT_EVENTDATE_FROM_YEARMONTHDAY
| TestField | Value |
|---|---|
| GUID | 3892f432-ddd0-4a0a-b713-f2e2ecbd879d |
| Label | AMENDMENT_EVENTDATE_FROM_YEARMONTHDAY |
| Description | Proposes an amendment to the value of dwc:eventDate from values in dwc:year, dwc:month and dwc:day. |
| TestType | Amendment |
| Darwin Core Class | dwc:Event |
| Information Elements ActedUpon | dwc:eventDate |
| Information Elements Consulted | dwc:year |
| dwc:month | |
| dwc:day | |
| Expected Response | INTERNAL _PREREQUISITES_NOT_MET if dwc:eventDate is not EMPTY or dwc:year is EMPTY or is not interpretable as an integer; FILLED_IN the value of dwc:eventDate if an ISO 8601 date was interpreted from the values in dwc:year, dwc:month and dwc:day; otherwise NOT_AMENDED |
| Data Quality Dimension | Completeness |
| Term-Actions | EVENTDATE_FROM_YEARMONTHDAY |
| Parameter(s) | |
| Source Authority | |
| Specification Last Updated | 2024-09-15 |
| Examples | [dwc:eventDate="", dwc:year="1420", dwc:month="10", dwc:day="29": Response.status=FILLED_IN, Response.result=dwc:eventDate="1420-10-29", Response.comment="dwc:year, dwc:month and dwc:day are interpretable, even if pre-Linnaeus"] |
| [dwc:eventDate="", dwc:year="2024", dwc:month="2", dwc:day="30": Response.status=NOT_AMENDED, Response.result=, Response.comment="Not a valid date"] | |
| Source | TG2-Gainesville |
| References |
|
| Example Implementations (Mechanisms) | Kurator:event_date_qc |
| Link to Specification Source Code | https://github.com/FilteredPush/event_date_qc/blob/5f2e7b30f8a8076977b2a609e0318068db80599a/src/main/java/org/filteredpush/qc/date/DwCEventDQ.java#L1003 unit tests at https://github.com/FilteredPush/event_date_qc/blob/5f2e7b30f8a8076977b2a609e0318068db80599a/src/test/java/org/filteredpush/qc/date/DwcEventDQTest.java#L493 |
| Notes | An attempt to populate dwc:eventDate from dwc:verbatimEventDate and from dwc:startDayOfYear and dwc:endDayOfYear should be made before this test is run. If dwc:year and dwc:day are present and interpretable, but dwc:month is not supplied or is not interpretable, then just the year should be given as the proposed amendment. This test assumes that that dwc:year, dwc:month, dwc:day are in a Gregorian calendar, and that only those three pieces of information are needed to produce a dwc:eventDate (explicitly in ISO 8601-1 format, and thus using the Gregorian calendar). When running the test, the original precision, e.g. dwc:year=1980, dwc:month=1 should be retained, e.g. dwc:eventDate should become 1980-01, not 1980-01-01/1980-01-3. |
Comment by Lee Belbin (@Tasilee) migrated from spreadsheet: Added post scoring for completeness
Comment by Arthur Chapman (@ArthurChapman) migrated from spreadsheet: Cf #89B . Added following discussion with @JW
Noted in call 2022 Feb 13: Need to be explicit about cases where year is provided by month/date contain values not interpretable to a day or a month.
Example cases to be explicit about in the test data:
dwc:year="2021", dwc:month="", dwc:day="29"
dwc:year="2021", dwc:month="X", dwc:day="29"
Specification so as both of these result in dwc:eventDate="2021" (or 2021-01-29/2021-12-29).
Per discussion on TG2 call 2022 Mar 6, added word unambiguous to expected response, such that X is not interpreted as 10, as it could be [missing data], and per suggestion by @tucotuco added guidance to use only year if just day and year are present.
To handle the issues we've been having fitting an implementation from the specification to the test data, I suggest adding aome clauses about interpretability to the notes.
From:
An attempt to populate dwc:eventDate from dwc:verbatimEventDate and from dwc:startDayOfYear and dwc:endDayOfYear should be made before this test is run. If dwc:year and dwc:day are present, but dwc:month is not supplied, then just the year should be given as the proposed amendment.
To:
An attempt to populate dwc:eventDate from dwc:verbatimEventDate and from dwc:startDayOfYear and dwc:endDayOfYear should be made before this test is run. If dwc:year and dwc:day are present and interpretable, but dwc:month is not supplied or is not interpretable, then just the year should be given as the proposed amendment.
Notes amended accordingly.
Changed "AMENDED" to "FILLED_IN" in accordance with discussions April 16.
Based on @chicoreus email August 31, then
INTERNAL _PREREQUISITES_NOT_MET if dwc:eventDate is not EMPTY or dwc:year is EMPTY or is uninterpretable as a valid year; FILLED_IN the value of dwc:eventDate if an unambiguous ISO 8601-1:2019 date can be interpreted from the values in dwc:year, dwc:month and dwc:day; otherwise NOT_AMENDED |
becomes
INTERNAL _PREREQUISITES_NOT_MET if dwc:eventDate is not EMPTY or dwc:year is EMPTY or is uninterpretable as a valid year; FILLED_IN the value of dwc:eventDate if an ISO 8601-1:2019 date can be interpreted from the values in dwc:year, dwc:month and dwc:day; otherwise NOT_AMENDED |
?
Expected Response updated as per above with minor edit-
INTERNAL _PREREQUISITES_NOT_MET if dwc:eventDate is not EMPTY or dwc:year is EMPTY or is not interpretable as a valid year; FILLED_IN the value of dwc:eventDate if an ISO 8601-1:2019 date can be interpreted from the values in dwc:year, dwc:month and dwc:day; otherwise NOT_AMENDED
More discussion today on this suggests we can interpret dwc:month from Roman numerals and @ArthurChapman said that using Roman numerals for month is not unusual, so we have amended the examples to illustrate this principle. The test data records have been changed accordingly and we will add a Vocabulary item for "Roman numerals".
I've edited the Expected Response according to @tucotuco suggestion:
From
INTERNAL _PREREQUISITES_NOT_MET if dwc:eventDate is not EMPTY or dwc:year is EMPTY or is not interpretable as a valid year; FILLED_IN the value of dwc:eventDate if an ISO 8601-1:2019 date can be interpreted from the values in dwc:year, dwc:month and dwc:day; otherwise NOT_AMENDED
to
INTERNAL _PREREQUISITES_NOT_MET if dwc:eventDate is not EMPTY or dwc:year is EMPTY or is not interpretable as a valid ISO 8601-1 year; FILLED_IN the value of dwc:eventDate if an ISO 8601-1 date was interpreted from the values in dwc:year, dwc:month and dwc:day; otherwise NOT_AMENDED
and updated the References
I have updated the ISO Reference link
The reference to "a valid ISO 8601-1 year" is problematic. Without prior agreement between the parties in an information interchange, under ISO 8601-1, years can only go back to 1582.
This raises a larger problem of moving the lower bound for dates from 1600 to 1500, as this also brings in dates prior to the start of the Gregorian calendar on 1582-11-15.
For this test, I suggest we remove the reference to ISO 8601-1 with respect to year:
INTERNAL _PREREQUISITES_NOT_MET if dwc:eventDate is not EMPTY or dwc:year is EMPTY or is not interpretable as a valid year; FILLED_IN the value of dwc:eventDate if an ISO 8601-1 date was interpreted from the values in dwc:year, dwc:month and dwc:day; otherwise NOT_AMENDED.
Fixed extraneous space: s/INTERNAL _PREREQUISITES_NOT_MET/INTERNAL_PREREQUISITES_NOT_MET/
I agree we are talking about dwc:year not an ISO date. Amended Expected Response and Specification last updated.
There is a hidden assumption here that dwc:year, dwc:month, dwc:day are in a gregorian calendar, and that only those three pieces of information are needed to produce a dwc:eventDate (explicitly in ISO 8601-1 format, and thus gregorian). Do we need to make this assumption explicit in the notes?
I guess we do. That transition to eventDate carries that baggage.
Added to Notes: "When running the test, the original precision, e.g. dwc:year=1980, dwc:month=1 should be retained, e.g. dwc:eventDate should become 1980-01, not 1980-01-01/1980-01-3."
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"