Google spreadsheet API to Wikidata, replicate in OpenRefine?

21 views
Skip to first unread message

j s

unread,
Jun 24, 2021, 4:34:17 PM6/24/21
to openr...@googlegroups.com
Hi all,

I have made used of a function available to Google spreadsheet to output “Description” from Wikidata for an item. Please see Column E of this test spreadsheet. Syntax below:

=IF(LEN(B2)>0,INDEX(WIKIDATADESCRIPTIONS(B2),0,2),”")

Is it possible to extract “Description”? How about "Aliases” from Wikidata?  Where may I found instruction to do the same using OpenRefine? 

Thanks so much for any tip!

—Jackie 

Thad Guidry

unread,
Jun 24, 2021, 5:17:11 PM6/24/21
to openr...@googlegroups.com
Yes you can Jackie!

See our updated docs for Reconciliation.
https://docs.openrefine.org/manual/reconciling

In particular, you are asking about Fetching more data (description, alises) after you have reconciled a column.

Ask again if you need further assistance!



--
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://groups.google.com/d/msgid/openrefine/85C4870E-BDD7-4693-968E-CB00721ECCF4%40gmail.com.

Antonin Delpeuch (lists)

unread,
Jun 24, 2021, 11:08:47 PM6/24/21
to openr...@googlegroups.com
In particular, to fetch descriptions or aliases, you can use the "Add
columns from reconciled values" with the following properties:
- Dfr for descriptions in French
- Ait for aliases in Italian

Antonin

On 24/06/2021 23:16, Thad Guidry wrote:
> Yes you can Jackie!
>
> See our updated docs for Reconciliation.
> https://docs.openrefine.org/manual/reconciling
> <https://docs.openrefine.org/manual/reconciling>
>
> In particular, you are asking about Fetching more data (description,
> alises) after you have reconciled a column.
> That's discussed further down here:
> https://docs.openrefine.org/manual/reconciling#fetching-more-data
> <https://docs.openrefine.org/manual/reconciling#fetching-more-data>
>
> Ask again if you need further assistance!
>
> Thad
> https://www.linkedin.com/in/thadguidry/
> <https://www.linkedin.com/in/thadguidry/>
> https://calendly.com/thadguidry/ <https://calendly.com/thadguidry/>
>
>
> On Thu, Jun 24, 2021 at 3:34 PM j s <aa35...@gmail.com
> <mailto:aa35...@gmail.com>> wrote:
>
> Hi all,
>
> I have made used of a function available to Google spreadsheet to
> output “Description” from Wikidata for an item. Please see Column E
> of this test spreadsheet
> <https://docs.google.com/spreadsheets/d/1Ouwtgr4Tcz54jOsGh4yWJ3sOZwF2w4Jl9REiVb7iiKs/edit?usp=sharing>.
> Syntax below:
>
> =IF(LEN(B2)>0,INDEX(WIKIDATADESCRIPTIONS(B2),0,2),”")
>
> Is it possible to extract “Description”? How about "Aliases” from
> Wikidata?  Where may I found instruction to do the same using
> OpenRefine? 
>
> Thanks so much for any tip!
>
> —Jackie 
>
> --
> 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>.
> <https://groups.google.com/d/msgid/openrefine/85C4870E-BDD7-4693-968E-CB00721ECCF4%40gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> 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://groups.google.com/d/msgid/openrefine/CAChbWaO7ux7otG8KaWcqhbu90vT64g%2BYRDj93xEtVQMMNMWJqA%40mail.gmail.com
> <https://groups.google.com/d/msgid/openrefine/CAChbWaO7ux7otG8KaWcqhbu90vT64g%2BYRDj93xEtVQMMNMWJqA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thad Guidry

unread,
Jun 24, 2021, 11:40:33 PM6/24/21
to openr...@googlegroups.com
Antonin,

We seemed to have lost the documentation that described all that nicely?  I say it before, but it's gone? moved?
I cannot find it on any of the pages linked on here:  https://www.wikidata.org/wiki/Wikidata:Tools/OpenRefine/Editing



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://groups.google.com/d/msgid/openrefine/744ff22d-f118-bffd-fd96-10c517b33061%40antonin.delpeuch.eu.

Antonin Delpeuch (lists)

unread,
Jun 25, 2021, 12:09:37 AM6/25/21
to openr...@googlegroups.com
It's true that it could be listed a bit more explicitly here:
https://docs.openrefine.org/manual/wikidata#reconciling-with-wikidata
which currently points to:
https://wikidata.reconci.link/#documentation

Antonin

On 25/06/2021 05:40, Thad Guidry wrote:
> Antonin,
>
> We seemed to have lost the documentation that described all that
> nicely?  I say it before, but it's gone? moved?
> I cannot find it on any of the pages linked on here: 
> https://www.wikidata.org/wiki/Wikidata:Tools/OpenRefine/Editing
> <https://www.wikidata.org/wiki/Wikidata:Tools/OpenRefine/Editing>
>
> Thad
> https://www.linkedin.com/in/thadguidry/
> <https://calendly.com/thadguidry/> <https://calendly.com/thadguidry/
> <https://calendly.com/thadguidry/>>
> >
> >
> > On Thu, Jun 24, 2021 at 3:34 PM j s <aa35...@gmail.com
> <mailto:aa35...@gmail.com>
> > <mailto:aa35...@gmail.com <mailto:aa35...@gmail.com>>> wrote:
> >
> >     Hi all,
> >
> >     I have made used of a function available to Google spreadsheet to
> >     output “Description” from Wikidata for an item. Please see
> Column E
> >     of this test spreadsheet
> >   
>  <https://docs.google.com/spreadsheets/d/1Ouwtgr4Tcz54jOsGh4yWJ3sOZwF2w4Jl9REiVb7iiKs/edit?usp=sharing
> <https://docs.google.com/spreadsheets/d/1Ouwtgr4Tcz54jOsGh4yWJ3sOZwF2w4Jl9REiVb7iiKs/edit?usp=sharing>>.
> >     Syntax below:
> >
> >     =IF(LEN(B2)>0,INDEX(WIKIDATADESCRIPTIONS(B2),0,2),”")
> >
> >     Is it possible to extract “Description”? How about "Aliases” from
> >     Wikidata?  Where may I found instruction to do the same using
> >     OpenRefine? 
> >
> >     Thanks so much for any tip!
> >
> >     —Jackie 
> >
> >     --
> >     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%2Bunsu...@googlegroups.com>
> >     <mailto:openrefine+...@googlegroups.com
> <mailto:openrefine%2Bunsu...@googlegroups.com>>.
>  <https://groups.google.com/d/msgid/openrefine/85C4870E-BDD7-4693-968E-CB00721ECCF4%40gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/openrefine/85C4870E-BDD7-4693-968E-CB00721ECCF4%40gmail.com?utm_medium=email&utm_source=footer>>.
> >
> > --
> > 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%2Bunsu...@googlegroups.com>
> > <mailto:openrefine+...@googlegroups.com
> <mailto:openrefine%2Bunsu...@googlegroups.com>>.
> <https://groups.google.com/d/msgid/openrefine/CAChbWaO7ux7otG8KaWcqhbu90vT64g%2BYRDj93xEtVQMMNMWJqA%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/openrefine/CAChbWaO7ux7otG8KaWcqhbu90vT64g%2BYRDj93xEtVQMMNMWJqA%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
> --
> 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%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openrefine/744ff22d-f118-bffd-fd96-10c517b33061%40antonin.delpeuch.eu
> <https://groups.google.com/d/msgid/openrefine/744ff22d-f118-bffd-fd96-10c517b33061%40antonin.delpeuch.eu>.
>
> --
> 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://groups.google.com/d/msgid/openrefine/CAChbWaOx9w-3vke79SL%2BJPWYjGp1eHFE17c3Cy9Fz6zK7RC42w%40mail.gmail.com
> <https://groups.google.com/d/msgid/openrefine/CAChbWaOx9w-3vke79SL%2BJPWYjGp1eHFE17c3Cy9Fz6zK7RC42w%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Thad Guidry

unread,
Jun 25, 2021, 7:49:07 AM6/25/21
to openr...@googlegroups.com
Antonin,

Oh gosh, that's the smallest blue "here" link in the world on our docs!

Yeah, hmm... let's fix that.
1. Since it's an extension for Wikidata, but part of core, we had said and agreed that we would have a different page entirely for it... which we do here https://docs.openrefine.org/manual/wikidata
2. Perhaps it's best to move all the content from the external https://wikidata.reconci.link/ and put it nicely into places on our official Wikidata extension docs https://docs.openrefine.org/manual/wikidata ?

Regardless of decision on 2. , I think having an info box that mentions Reconciling with Wikidata at the very top is probably best to guide folks better.


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://groups.google.com/d/msgid/openrefine/7aeb6420-4281-f0eb-bfb7-f843c7cb0e51%40antonin.delpeuch.eu.

j s

unread,
Jun 25, 2021, 7:57:32 AM6/25/21
to openr...@googlegroups.com
Thanks so much for the tip.

I have searched high and low and failed since aliases/description do not have a P#. The doc on fetching additional data based on reconciled Qid shows retrieving content from P#.

I will now test it with our set!  Much appreciated
--Jackie


----------------
From: Antonin Delpeuch (lists) <Unknown>
Date: Thursday, June 24, 2021 at 11:08:47 PM UTC-4
Subject: Re: [OpenRefine] Google spreadsheet API to Wikidata, replicate in OpenRefine?
To: openr...@googlegroups.com <Unknown>
Reply all
Reply to author
Forward
0 new messages