Created
July 24, 2020 08:38
-
-
Save egonw/d8f9f4f034bac1e6d0f550485fd50703 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT ?item ?itemLabel ?itemDescription ?image ?location ?distance ?sitelink WHERE { | |
SERVICE wikibase:around { | |
?item wdt:P625 ?location. | |
bd:serviceParam wikibase:center "[AUTO_COORDINATES]". | |
bd:serviceParam wikibase:radius "[RADIUS]". | |
bd:serviceParam wikibase:distance ?distance. | |
} | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,es,de". } | |
FILTER(NOT EXISTS { | |
?item wdt:P18 ?image | |
}) | |
MINUS { ?item wdt:P31 wd:Q79007 } | |
OPTIONAL { | |
?sitelink schema:about ?item. | |
FILTER(REGEX(STR(?sitelink), "[AUTO_LANGUAGE].wikipedia.org/wiki/")) | |
} | |
} | |
ORDER BY asc(?distance) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment