Project:SPARQL/starters: Difference between revisions

From Timna Valley Database
Line 2: Line 2:
===Where Timna sites are located===
===Where Timna sites are located===
One way into the data is through the locations of archeological sites This query does that for all the sites but could be adapted (on lines *xx* and *xx* TBD) to look for other places or regions.
One way into the data is through the locations of archeological sites This query does that for all the sites but could be adapted (on lines *xx* and *xx* TBD) to look for other places or regions.
<sparql tryit="1">
PREFIX wd: <https://timna-database.wikibase.cloud/entity/>
PREFIX wd: <https://timna-database.wikibase.cloud/entity/>
PREFIX wdt: <https://timna-database.wikibase.cloud/prop/direct/>
PREFIX wdt: <https://timna-database.wikibase.cloud/prop/direct/>
Line 14: Line 15:
   FILTER (STRSTARTS(?entityLabel, "Site"))
   FILTER (STRSTARTS(?entityLabel, "Site"))
   FILTER (STRSTARTS(STR(?entity), "https://timna-database.wikibase.cloud/entity/Q"))
   FILTER (STRSTARTS(STR(?entity), "https://timna-database.wikibase.cloud/entity/Q"))
   ?entity wdt:P28 ?coordinate . } LIMIT 300 ##defaultView:Map
   ?entity wdt:P28 ?coordinate .  
[https://timna-database.wikibase.cloud/query/index.html#PREFIX%20wd%3A%20%3Chttps%3A%2F%2Ftimna-database.wikibase.cloud%2Fentity%2F%3E%0APREFIX%20wdt%3A%20%3Chttps%3A%2F%2Ftimna-database.wikibase.cloud%2Fprop%2Fdirect%2F%3E%0APREFIX%20p%3A%20%3Chttps%3A%2F%2Ftimna-database.wikibase.cloud%2Fprop%2F%3E%0APREFIX%20ps%3A%20%3Chttps%3A%2F%2Ftimna-database.wikibase.cloud%2Fprop%2Fstatement%2F%3E%0APREFIX%20geo%3A%20%3Chttp%3A%2F%2Fwww.opengis.net%2Font%2Fgeosparql%23%3E%0A%0ASELECT%20DISTINCT%20%3Fentity%20%3FentityLabel%20%3Fcoordinate%0AWHERE%20%7B%0A%20%20%3Fentity%20rdfs%3Alabel%20%3FentityLabel%20.%0A%20%20FILTER%20(lang(%3FentityLabel)%20%3D%20%22en%22)%0A%20%20FILTER%20(STRSTARTS(%3FentityLabel%2C%20%22Site%22))%0A%20%20FILTER%20(STRSTARTS(STR(%3Fentity)%2C%20%22https%3A%2F%2Ftimna-database.wikibase.cloud%2Fentity%2FQ%22))%0A%20%20%0A%20%20%3Fentity%20wdt%3AP28%20%3Fcoordinate%20.%0A%7D%0ALIMIT%20300%0A%23#defaultView:Map Try it!]
}  
LIMIT 300  
##defaultView:Map
</sparql>


==Time==
==Time==
Bureaucrats, emailconfirmed, Administrators
1,193

edits