3

I have a list of wikidata entity IDs (i.e. Tour Eiffel Q243, Big Ben Q41225...), and a list of properties (i.e. coordinates P625, country P18 ...).

Is there any way to gather and extract in Excel (or csv) a table with the information?

What I look for is something like:

[table[1]

5

Try Tabernacle. Seems to be exactly what you search. The downloaded resultset is in TSV format, and can be imported in Excel.

You'll need to have a Wikimedia account to work with Tabernacle and some other WMF wikis related tools.

2

You can also use OpenRefine for that. It can import roughly any tabular dataset and the latest version allows you to extend you data with Wikidata easily.

screencast of the feature in OpenRefine

1

You can do it using Wikidata SPARQL endpoint web UI.

Paste the query below in the query form, press "Run", then press "Download".

SELECT
?placeLabel
?coordinate
?countryLabel
?cityLabel
WHERE
{
  VALUES (?place)
  {
    (wd:Q243)
    (wd:Q41225)
    # ...
  }
  OPTIONAL { ?place wdt:P625 ?coordinate }
  OPTIONAL { ?place wdt:P17 ?country }
  OPTIONAL { ?place wdt:P131 ?city }
  # ...
  SERVICE wikibase:label
    { bd:serviceParam wikibase:language "en" }
}

Some issues are possible, please write a comment if you experience any problem with your query.

P.S. wikibase:label is a magic Wikidata service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.