User:EmericusPetro/sandbox/List of Wikidata to OpenStreetMap tag or key

From OpenStreetMap Wiki
Jump to navigation Jump to search

Query 1 (no languages)

This query generated with printf "P1282\n" | ./999999999/0/ --actionem-sparql --de=P --query --ex-interlinguis --identitas-ex-wikiq-et-wikip --cum-interlinguis=P1282 (source

SELECT DISTINCT (STRAFTER(STR(?item), "entity/") AS ?item__conceptum__codicem) (STRAFTER(STR(?item), "entity/") AS ?item__rem__i_qcc__is_zxxx__ix_wikip) (STRAFTER(STR(?item), "entity/") AS ?item__rem__i_qcc__is_zxxx__ix_wikiq) (GROUP_CONCAT(DISTINCT ?p1282_values; separator = "|") AS ?item__rem__i_qcc__is_zxxx__ix_wdatap1282) WHERE {
      ?item p:P1282  ?statement0.
      ?statement0 (ps:P1282 ) _:anyValueP1282 .
  ?item wdt:P1282  ?wikidata_p_value .
  OPTIONAL { ?item wdt:P1282 ?p1282_values . }
GROUP BY ?item
ORDER BY ASC (?item__conceptum__codicem)

Run it (edit query)

Query with other languages

Note: Wikidata will timeout trying to dump all labels. However the script officina/999999999/0/ (same used to generate the query without languages) can be used to create the queries and download all them. Other shell scripts at officina/999999999/ can be used to merge back all the temporary CSVs.