bdq icon indicating copy to clipboard operation
bdq copied to clipboard

TG2-AMENDMENT_EVENTDATE_FROM_YEARMONTHDAY

Open iDigBioBot opened this issue 7 years ago • 53 comments

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
  • ISO (2019) ISO 8601-1:2019(en) Date and time — Representations for information interchange — Part 1: Basic rules. https://www.iso.org/obp/ui/
  • Wikipedia (2020) ISO 8601. https://en.wikipedia.org/wiki/ISO_8601
  • Library of Congress (2019) Extended Date/Time Format (EDTF). https://www.loc.gov/standards/datetime/
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.

iDigBioBot avatar Jan 05 '18 16:01 iDigBioBot

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

iDigBioBot avatar Jan 05 '18 16:01 iDigBioBot

Comment by Arthur Chapman (@ArthurChapman) migrated from spreadsheet: Cf #89B . Added following discussion with @JW

iDigBioBot avatar Jan 12 '18 16:01 iDigBioBot

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.

chicoreus avatar Feb 13 '22 20:02 chicoreus

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).

chicoreus avatar Feb 13 '22 20:02 chicoreus

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.

chicoreus avatar Mar 06 '22 20:03 chicoreus

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.

chicoreus avatar Mar 21 '22 01:03 chicoreus

Notes amended accordingly.

Tasilee avatar Mar 21 '22 20:03 Tasilee

Changed "AMENDED" to "FILLED_IN" in accordance with discussions April 16.

Tasilee avatar Apr 18 '22 22:04 Tasilee

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 |

?

Tasilee avatar Aug 31 '22 21:08 Tasilee

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

Tasilee avatar Sep 04 '22 21:09 Tasilee

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".

Tasilee avatar Dec 11 '22 23:12 Tasilee

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

Tasilee avatar Mar 26 '23 22:03 Tasilee

I have updated the ISO Reference link

Tasilee avatar Mar 29 '23 22:03 Tasilee

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.

chicoreus avatar Jun 09 '23 21:06 chicoreus

Fixed extraneous space: s/INTERNAL _PREREQUISITES_NOT_MET/INTERNAL_PREREQUISITES_NOT_MET/

chicoreus avatar Jun 10 '23 15:06 chicoreus

I agree we are talking about dwc:year not an ISO date. Amended Expected Response and Specification last updated.

Tasilee avatar Jun 14 '23 21:06 Tasilee

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?

chicoreus avatar Jun 16 '23 16:06 chicoreus

I guess we do. That transition to eventDate carries that baggage.

tucotuco avatar Jun 16 '23 16:06 tucotuco

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."

Tasilee avatar Jun 26 '23 21:06 Tasilee

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"

Tasilee avatar Sep 18 '23 02:09 Tasilee