Getting Wikipedia Sitelinks from Wikidata

81 views
Skip to first unread message

Adam Harangozó

unread,
May 10, 2021, 5:30:05 AM5/10/21
to OpenRefine

Hi All,

I have a number of names reconciled with Wikidata (also the QIDs in a separate column) and I would like to get the English and Hungarian Wikipedia sitelinks from these. Could someone tell me how to do it? I have tried "Senwiki" and "Shuwiki" when adding columns based on reconciled values but I only got error. Thanks!

Best,
Adam Harangozó

Owen Stephens

unread,
May 10, 2021, 12:55:50 PM5/10/21
to OpenRefine
I thought this had been aded to the functionality - but I can't see this is currently working :( 

However, previously Ettore Rizza has posted a solution to doing this using another approach - this is available at https://groups.google.com/g/openrefine/c/nplJxIFOPR8/m/QmKE0WyEAQAJ
Hopefully that will get you what you need and maybe others can comment on whether this should work in the current version of OpenRefine

Best wishes

Owen

Dr Thneed

unread,
May 10, 2021, 8:26:55 PM5/10/21
to openr...@googlegroups.com
It is working for me? I use it like this:
"Add column from reconciled values", type Senwiki and then select SPARQL: Senwiki from the dropdown menu.
It returns the page title of the relevant enwiki page.

--
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/236949a2-49c1-4528-a179-5294971ff687n%40googlegroups.com.


--
Tamsin Braisher

Dunedin
New Zealand

Owen Stephens

unread,
May 11, 2021, 4:12:52 AM5/11/21
to OpenRefine
That's what I expected, but using 3.4.1 that doesn't work for me - not sure why :(

Adam Harangozó

unread,
May 12, 2021, 12:47:16 PM5/12/21
to openr...@googlegroups.com
Thanks all, the Python script has worked for me. Senwiki still gives an error for some reason.

Best,
Adam

You received this message because you are subscribed to a topic in the Google Groups "OpenRefine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openrefine/zp2Ghqyo6fM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openrefine+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openrefine/80d484ba-a0a6-4c98-8ec1-30fc0827d86fn%40googlegroups.com.


--

'Thank you' emails have a massive carbon footprint:
So this is me saying thanks without sending it. Every email has a carbon footprint, reduce it by sending less.
#WhatWeCanDo

Alexandra Alisa Provo

unread,
Jul 27, 2021, 3:46:25 PM7/27/21
to openr...@googlegroups.com
Just want to say thank you for this thread! Add column from reconciled values also isn't working for me (I, too, am using Version 3.4.1), so this script saved me tons of time. It would be great to see this functionality back in the data extension feature.

Many thanks!
Alex




--
Alexandra Provo
Metadata Librarian
Division of Libraries
New York University
70 Washington Square South, 10th Floor
New York, NY 10012

alexand...@nyu.edu
212-992-7534
pronouns: she/her/hers
Reply all
Reply to author
Forward
0 new messages