Project:SPARQL/examples: Difference between revisions

Line 1,554: Line 1,554:


## create a thingy for the start point change the Qxxx ID in the following PREFIX var_start line to chosen location.   
## create a thingy for the start point change the Qxxx ID in the following PREFIX var_start line to chosen location.   
## **MUST** a) be in England and b) have a wikidata item that has coordinate location!
## **MUST** a) be in UK and b) have a wikidata item that has coordinate location!


PREFIX var_start: <https://beyond-notability.wikibase.cloud/entity/Q5>  # (Q5=sheffield)
PREFIX var_start: <https://beyond-notability.wikibase.cloud/entity/Q5>  # (Q5=sheffield)
Line 1,580: Line 1,580:
   # other possibles ?  
   # other possibles ?  
    
    
   ## limit to places in admin territory p33 england q617. (keep numbers down to avoid wikidata timing out)  
   ## limit to places in admin territory p33 uk q1741 seems ok. put it back to england q617 if there are any timeout problems. (keep numbers down to avoid wikidata timing out)  
   ?location bnwdt:P33+ bnwd:Q617.
   ?location bnwdt:P33+ bnwd:Q1741.
   ?location bnwdt:P117 ?ws .  # wikidata id   
   ?location bnwdt:P117 ?ws .  # wikidata id   
     bind(iri(concat("http://www.wikidata.org/entity/", str(?ws))) as ?wikidata) .
     bind(iri(concat("http://www.wikidata.org/entity/", str(?ws))) as ?wikidata) .
586

edits