New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong date parsed in crossref API #191
Comments
No new? |
Thanks, @andrawaag ! |
The incorrect date was indeed parsed and used. The issue was that the crossref API use a data model for timestamps that includes standardized timestamps for all included dates, except for the publication date. There the timestamp is only presented as a list within a list where the dates might have different forms. I assumed the date in that list follows the "year-month-day order", and that the list within the list does actually only have one date. |
Thank you very much indeed! |
@Daniel-Mietchen Do you know if there will be a bot taking care of the correction of the already created dates? |
…d day value to function. When crossref does not provide those values the function fails. The fix is to add precision to the script for month and year and in those case where the month and/or the day values are missing the middle values are provided. ie. middle of the year July 2nd and middle of the month the 15th
…d day value to function. When crossref does not provide those values the function fails. The fix is to add precision to the script for month and year and in those case where the month and/or the day values are missing the middle values are provided. ie. middle of the year July 2nd and middle of the month the 15th
@Adafede I'm not aware of anyone running such a bot job. Given the scale of the edits, it should also probably be done by a dedicated account. Will think about it. |
Hi, I'm currently looking at fixing this issue on Wikidata. I first want to elaborate on the conversation so far. The example given in the OP of this issue is:
Listed are all the dates associated with this paper:
Originally the publication date used Now lets look at this example:
Listed are all the dates associated with this paper:
Wikidata has the correct date for this paper (2002, source), however using the now preferred
|
Hi @carlinmack...sorry for not replying earlier, could you find out more? |
I haven't looked thoroughly through the mismatches but I haven't find any other similar cases since. I found some documentation in the API for these dates:
So I think |
I just started a batch of 48k corrections: https://quickstatements.toolforge.org/#/batch/225537 (and 20 next ones) |
Hi,
Thanks to @Daniel-Mietchen, we noticed we had an error in our bot, which was taking the wrong date from crossref API.
My first reflex was to look how you are doing it and it looks like we are doing it the same way...
WikidataIntegrator/wikidataintegrator/wdi_helpers/publication.py
Line 362 in f2c92d2
This is the date the entry was created in CrossRef and not the date of publication, see http://api.crossref.org/works/10.1016%2Fs0031-9422%2800%2994305-x for an example.
This might imply some heavy curation of the article dates on WD...
Also tagging @bjonnh in case!
Happy to help!
The text was updated successfully, but these errors were encountered: