Jackie,
And you can use OpenRefine's *Fetch URLs* on your list of QID's to pull
down the JSON into a column and then parse the JSON with our GREL
parseJson()
1. Create a new column based on... and named "FETCHURL" or whatever you
decide with this GREL to copy your QID's column and make some URL's in this
"FETCHURL" column:
escape("https://www.wikidata.org/wiki/Special:EntityData/" + value +
".json", "url")
2. Then run Fetch URLs menu option on that "FETCHURL" column (setting the
threshold delay to probably only 500 ms instead of the default 5000 ms )
3. You'll get lots of JSON in the new column.
4. Parse the JSON using the GREL syntax as demonstrated on lots of
tutorials around the internet as well as our wiki page:
https://github.com/OpenRefine/OpenRefine/wiki/Fetching-URLs-From-Web-Servic…
Feel free to ping me if you want some hand holding via a call.
Thad
https://www.linkedin.com/in/thadguidry/
On Fri, Oct 23, 2020 at 7:51 AM j s <aa3544bd(a)gmail.com> wrote:
Hi Fariz,
This is simply marvelous…
The JSON serialization returns just the WB P and value which may take
less effort to extract value for what we need at the moment. TTL returns so
much more info which we should be able to do more at a later time.
Very exciting. Thank you so very much!
---
Jackie Shieh
Descriptive Data Management
Discovery Services Division
Begin forwarded message:
Date: Fri, 23 Oct 2020 10:38:56 +0700
From: Fariz Darari
To: Discussion list for the Wikidata project
Subject: Re: [Wikidata] Any API available for extraction based on Q#?
Hello Jackie,
not necessarily an answer, but you could get description/statements of Q#
via:
https://www.wikidata.org/wiki/Special:EntityData/Q#.ttl
So, for instance, the (turtle syntax) statements of Indonesia would be:
https://www.wikidata.org/wiki/Special:EntityData/Q252.ttl
Regards,
Fariz
On Wed, Oct 21, 2020 at 7:23 PM j s <aa3544bd(a)gmail.com> wrote:
Hi,
I am extremely new to SPARQL and have yet to find how I could feed a file
containing a series of Q item numbers in order to extract statements for
our needs.
I suspect some of you may have succeeded in this. Would you recommend an
API tool (or combination of tools) to use to extract all statements from a
file that contains a series of Q item number? I must preface to say that I
am a metadata person not a software developer.
Thank you very much for any pointers!
With regards,
--Jackie
*****************************************
_______________________________________________
Wikidata mailing list
Wikidata(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata