Hi Antonin
Is the appended .0 a bug or is there a logic to it? I regularly have to remove it and I keep meaning to find out why.
Thanks
Graham
-----Original Message-----
From:
openr...@googlegroups.com <
openr...@googlegroups.com> On Behalf Of Antonin Delpeuch (lists)
Sent: 07 May 2021 08:25
To:
openr...@googlegroups.com
Subject: Re: [OpenRefine] Help with dates not uploading from OpenRefine to Wikidata
Hi Jeannette,
Could it be that your years are input as numbers (displayed in green) rather than as strings (displayed in black)? I suspect this could be the cause. You could try converting your column to strings first (and possibly removing the `.0`) that is appended at the end with value.replace('.0', '')
Best,
Antonin
On 07/05/2021 04:21, Jeannette Ho wrote:
> I am learning to use the tool in OpenRefine to reconcile data and
> upload it to Wikidata.
>
> A month ago, I was able to create a schema and successfully upload
> data to automatically generate items in Wikidata. This month, I tried
> it again and everything uploaded fine EXCEPT for any statements
> involving dates.
>
> in the spreadsheet , the date values are recorded in YYYY format as
> single years (e.g., 2020). I get an error message saying they are
> incorrectly formatted:
>
>
> Invalid date formats.
>
> Some dates are incorrectly formatted, such as 2016.0. See the allowed
> formats
> <
https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FWikidata%3ATools%2FOpenRefine%2FEditing%2FSchema_alignment%23Dates&data=04%7C01%7C%7C44031a9c1cbf4c31e72a08d911294b7a%7C21a44cb7f9c34f009afabd1e8e88bcd9%7C0%7C0%7C637559691319202364%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CQ0Hi629Gmzy2ACWn6fzxgchFQSG1lAgbYyD3FLblqs%3D&reserved=0>.
>
>
> I think I got the same error message last month but it let me upload
> the dates that appear in new Wikidata items that were created anyway.
> So I don't know why it would be affecting it now.
>
>
> I tried cleaning up the dates in the spreadsheet prior to putting it
> in OpenRefine (getting rid of decimal places) as well as cleaning
> whitespaces afterwards, but it didn't help.
>
>
> I also tried reconciling them against the years existing on Wikidata.
> But when I ran it again,l the dates still don't appear in the
> Wikidata items. They are also skipped in the "Preview" tab prior to
> uploading to Wikidata.
>
>
> Can someone help with this? Again, the dates uploaded successfully
> last month, so I'm not sure what changed.
>
>
> Jeannette
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenRefine" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
openrefine+...@googlegroups.com
> <mailto:
openrefine+...@googlegroups.com>.
> To view this discussion on the web visit
>
https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrou
>
ps.google.com%2Fd%2Fmsgid%2Fopenrefine%2FCAM7SnMKO970d%253DkcRP1Bu6N5z
> m0DJKmrKV0uxuP0ccLsroSBRVQ%
2540mail.gmail.com&data=04%7C01%7C%7C44
> 031a9c1cbf4c31e72a08d911294b7a%7C21a44cb7f9c34f009afabd1e8e88bcd9%7C0%
> 7C0%7C637559691319202364%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
> CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=fe8b9e2
> fM%2FoQbtxygwfaTwi7f3LpRvZlGNeN52%2Bu%2Brs%3D&reserved=0
> <
https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fopenrefine%2FCAM7SnMKO970d%253DkcRP1Bu6N5zm0DJKmrKV0uxuP0ccLsroSBRVQ%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7C%7C44031a9c1cbf4c31e72a08d911294b7a%7C21a44cb7f9c34f009afabd1e8e88bcd9%7C0%7C0%7C637559691319202364%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4hTP5Q955zXKxgJJ0JBR2%2FF6rMFgChRf8Ri4ZbDbFpc%3D&reserved=0>.
--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
openrefine+...@googlegroups.com.
To view this discussion on the web visit
https://gbr01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fopenrefine%2Ff523ab72-f1f0-00e2-fc2b-eb27b9122acc%2540antonin.delpeuch.eu&data=04%7C01%7C%7C44031a9c1cbf4c31e72a08d911294b7a%7C21a44cb7f9c34f009afabd1e8e88bcd9%7C0%7C0%7C637559691319212319%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=v4trfF7nSwz3W2%2B93RMPaVJ1OcFtR8DGXeZiiiJ2C%2Fs%3D&reserved=0.
******************************************************************************************************************
Experience the British Library online at
www.bl.uk<
http://www.bl.uk/>
The British Library’s latest Annual Report and Accounts :
www.bl.uk/aboutus/annrep/index.html<
http://www.bl.uk/aboutus/annrep/index.html>
Help the British Library conserve the world's knowledge. Adopt a Book.
www.bl.uk/adoptabook<
http://www.bl.uk/adoptabook>
The Library's St Pancras site is WiFi - enabled
*****************************************************************************************************************
The information contained in this e-mail is confidential and may be legally privileged. It is intended for the addressee(s) only. If you are not the intended recipient, please delete this e-mail and notify the
postm...@bl.uk<mailto:
postm...@bl.uk> : The contents of this e-mail must not be disclosed or copied without the sender's consent.
The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the British Library. The British Library does not take any responsibility for the views of the author.
*****************************************************************************************************************
Think before you print