User:Richard Nevell (WMUK)

From Wikidata
Jump to navigation Jump to search

Map of archaeological sites in Libya[edit]

The following query uses these:

Features: map (Q24515275)  View with Reasonator View with SQID

# UK archaeological site on a map (must have coordinates!)
#defaultView:Map
SELECT ?library ?libraryLabel ?coords WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,fr". }
  ?library (wdt:P31/wdt:P279*) wd:Q839954.
  ?library wdt:P17 wd:Q1016.
  ?library wdt:P625 ?coords.
}

Geolocated things in a box roughly defining Libya[edit]

The following query uses these:

Features: map (Q24515275)  View with Reasonator View with SQID

PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

#defaultView:Map
SELECT ?label ?loc ?subj WHERE {
  { ?subj (wdt:P31/wdt:P279*) wd:Q839954. }
  UNION
  {  }
  ?subj wdt:P625 ?loc.
  ?subj (p:P625/psv:P625) ?coord.
  ?subj rdfs:label ?label.
  ?coord wikibase:geoLatitude ?lat.
  ?coord wikibase:geoLongitude ?long.
  FILTER((LANG(?label)) = "en")
  FILTER(?lat > "25.56"^^xsd:decimal)
  FILTER(?lat < "33.65"^^xsd:decimal)
  FILTER(?long > "8.22"^^xsd:decimal)
  FILTER(?long < "18.97"^^xsd:decimal)
}