User:Daniel/Queries/Prefixes: Difference between revisions

From MaRDI portal
Line 21: Line 21:
|| [https://database.factgrid.de/wiki/FactGrid:Sample_queries List of sample queries]
|| [https://database.factgrid.de/wiki/FactGrid:Sample_queries List of sample queries]
|-
|-
| NFDI4Culture || [https://nfdi4culture.de/sparql https://nfdi4culture.de/sparql]  || ||  ||  ||  || There is also [https://nfdi.fiz-karlsruhe.de/sparql https://nfdi.fiz-karlsruhe.de/sparql] but it seems less active and less complete.  
| NFDI4Culture || [https://nfdi4culture.de/sparql https://nfdi4culture.de/sparql]  || [https://nfdi.fiz-karlsruhe.de/sparql#query=PREFIX%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0APREFIX%20rdfs%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT%20%3Fperson%20%3Fname%20WHERE%20%7B%0A%20%20%3Fperson%20rdf%3Atype%20%3Chttp%3A%2F%2Fschema.org%2FPerson%3E%20.%0A%20%20%3Fperson%20%3Chttp%3A%2F%2Fschema.org%2Fname%3E%20%3Fname%20.%0A%7D%20LIMIT%201000&endpoint=https%3A%2F%2Fnfdi.fiz-karlsruhe.de%2Fsparql&requestMethod=POST&tabTitle=Query%202&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq%3D0.9&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq%3D0.9&outputFormat=table List of people] ||  ||  ||  || There is also [https://nfdi.fiz-karlsruhe.de/sparql https://nfdi.fiz-karlsruhe.de/sparql] but it seems less active and less complete.  
|-
|-
| OpenStreetMap || [https://sophox.org/sparql https://sophox.org/sparql] || [https://query.portal.mardi4nfdi.de/#PREFIX%20osmnode%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fnode%2F%3E%0APREFIX%20osmway%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fway%2F%3E%0APREFIX%20osmrel%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Frelation%2F%3E%0APREFIX%20osmt%3A%20%3Chttps%3A%2F%2Fwiki.openstreetmap.org%2Fwiki%2FKey%3A%3E%0APREFIX%20osmm%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fmeta%2F%3E%0APREFIX%20pageviews%3A%20%3Chttps%3A%2F%2Fdumps.wikimedia.org%2Fother%2Fpageviews%2F%3E%0APREFIX%20osmd%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fentity%2F%3E%0APREFIX%20osmdt%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fdirect%2F%3E%0APREFIX%20osmp%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2F%3E%0APREFIX%20osmps%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fstatement%2F%3E%0APREFIX%20osmpq%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fqualifier%2F%3E%0A%0ASELECT%20%2a%20WHERE%20%7B%0A%23%20%20%20wd%3AQ72365%20wdt%3AP12%20%3Fwd%20.%0A%23%20%20%20BIND%28wd%3AQ72365%20as%20%3Fwd%29%0A%20%20SERVICE%20%3Chttps%3A%2F%2Fsophox.org%2Fsparql%3E%20%7B%0A%23%20A%20sample%20query%20to%20list%20all%20OSM%20objects%20with%20a%20place%20tag.%0A%23%20The%20%2a%20will%20show%20all%20variables%20that%20are%20used%20in%20the%20WHERE%20clause%0Aselect%20%2a%20where%20%7B%0A%20%20%23%20The%20first%20expression%20matches%20the%20three%20columns%20of%20the%20Triple%20Store%20with%3A%0A%20%20%23%20%20%20%22find%20any%20subject%20that%20has%20an%20OSM%20%27place%27%20tag%2C%20and%20any%20value%20of%20that%20tag%22%0A%20%20%23%0A%20%20%23%20Question%20mark%20represents%20a%20variable.%20%3Fosm%20becomes%20a%20URI%20for%20an%20OSM%20object%2C%20e.g.%0A%20%20%23%20%20%20%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fnode%2F2681940767%3E%20%20%28Everest%29%0A%20%20%23%20The%20same%20URI%20may%20also%20be%20written%20with%20a%20prefix%20-%20osmnode%3A2681940767%0A%20%20%23%20All%20OSM%20tags%20use%20osmt%3A%20prefix.%20Using%20osmt%3Aplace%20constant%20only%0A%20%20%23%20matches%20OSM%20object%20with%20a%20place%20tag.%20The%20%3Fplace%20variable%20will%0A%20%20%23%20become%20the%20value%20of%20the%20place%20tag.%20You%20can%20use%20a%20constant%20instead%20of%20a%20variable%2C%0A%20%20%23%20e.g.%20substitute%20%3Fplace%20with%20a%20constant%20string%20%27city%27.%0A%0A%20%20%3Fosm%20osmt%3Aplace%20%3Fplace.%0A%0A%20%20%23%20osmm%3A%20prefix%20means%20%22meta%20values%22%2C%20e.g.%20OSM%20object%20type%2C%20location%20%28loc%29%2C%20version%2C%20...%0A%20%20%23%20Uncomment%20to%20limit%20to%20a%20specific%20type%20of%20an%20OSM%20object%20%28%27n%27%2C%20%27r%27%2C%20%27w%27%29.%0A%20%20%23%20%20%20%3Fosm%20osmm%3Atype%20%27r%27.%0A%0A%20%20%23%20osmm%3Aloc%20is%20a%20centroid%20point%20for%20most%20OSM%20objects.%20If%20included%2C%20the%20results%0A%20%20%23%20can%20be%20shown%20on%20a%20map%20by%20switching%20to%20the%20map%20view%20%28right%20under%20the%20query%29%0A%20%20%23%20%20%20%3Fosm%20osmm%3Aloc%20%3Fcoordinates.%0A%0A%20%20%23%20The%20FILTER%20expressions%20allow%20complex%20filtering%20beyond%20a%20simple%20%22must%20match%22.%0A%20%20%23%20%20%20filter%28%3Fplace%20%3D%20%27town%27%20%7C%7C%20regex%28%3Fplace%2C%20%27%5Ba-z%5D%5B0-9%5D%27%2C%20%27i%27%29%29%0A%0A%20%20%23%20This%20will%20limit%20results%20to%20places%20which%20do%20not%20have%20a%20%60name%3Aen%60%20tag.%0A%20%20%23%20%20%20filter%20not%20exists%20%7B%20%3Fosm%20osmt%3Aname%3Aen%20%3Fnameen.%20%7D%0A%0A%20%20%23%20For%20OSM%20objects%20with%20the%20wikidata%20tag%2C%20find%20the%20English%20name%20of%20that%20object%20in%20Wikidata%0A%20%20%23%20if%20it%20exists.%0A%20%20%20%20%20%3Fosm%20osmt%3Awikidata%20%3Fwd.%0A%20%20%23%20With%20that%20get%20from%20the%20Wikidata%20SPARQL%20endpoint%20service%20what%20type%20of%20the%20object%20it%0A%20%20%23%20is%20%28P31%20is%20the%20property%20instance%20of%20in%20Wikidata%29%2C%20and%20the%20label%20for%20that%20type%2C%0A%20%20%23%20also%20if%20exists%20in%20English.%20For%20labels%20and%20descriptions%2C%20you%20may%20instead%20use%20a%0A%20%20%23%20service%20that%20picks%20first%20available%20language%20based%20on%20a%20list.%0A%20%20%23%20%20%20service%20%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E%20%7B%0A%20%20%23%20%20%20%20%20%3Fwd%20wdt%3AP31%20%3Ftype.%0A%20%20%23%20%20%20%20%20optional%20%7B%20%3Fwd%20rdfs%3Alabel%20%3Flabel.%20filter%28lang%28%3Flabel%29%20%3D%20%22en%22%29%20%7D%0A%20%20%23%20%20%20%20%20optional%20%7B%20%3Ftype%20rdfs%3Alabel%20%3Ftypelabel.%20filter%28lang%28%3Ftypelabel%29%20%3D%20%22en%22%29%20%7D%0A%20%20%23%20%20%7D%0A%7D%0A%23%20Similar%20to%20SQL%2C%20queries%20can%20use%20aggregations%2C%20subqueries%2C%20and%20limit%20the%20results%0Alimit%2010%20%20%7D%0A%7D%0A Wikidata identifiers of OpenStreetMap place types] ||  ||  ||  || unstable
| OpenStreetMap || [https://sophox.org/sparql https://sophox.org/sparql] || [https://query.portal.mardi4nfdi.de/#PREFIX%20osmnode%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fnode%2F%3E%0APREFIX%20osmway%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fway%2F%3E%0APREFIX%20osmrel%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Frelation%2F%3E%0APREFIX%20osmt%3A%20%3Chttps%3A%2F%2Fwiki.openstreetmap.org%2Fwiki%2FKey%3A%3E%0APREFIX%20osmm%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fmeta%2F%3E%0APREFIX%20pageviews%3A%20%3Chttps%3A%2F%2Fdumps.wikimedia.org%2Fother%2Fpageviews%2F%3E%0APREFIX%20osmd%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fentity%2F%3E%0APREFIX%20osmdt%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fdirect%2F%3E%0APREFIX%20osmp%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2F%3E%0APREFIX%20osmps%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fstatement%2F%3E%0APREFIX%20osmpq%3A%20%3Chttp%3A%2F%2Fwiki.openstreetmap.org%2Fprop%2Fqualifier%2F%3E%0A%0ASELECT%20%2a%20WHERE%20%7B%0A%23%20%20%20wd%3AQ72365%20wdt%3AP12%20%3Fwd%20.%0A%23%20%20%20BIND%28wd%3AQ72365%20as%20%3Fwd%29%0A%20%20SERVICE%20%3Chttps%3A%2F%2Fsophox.org%2Fsparql%3E%20%7B%0A%23%20A%20sample%20query%20to%20list%20all%20OSM%20objects%20with%20a%20place%20tag.%0A%23%20The%20%2a%20will%20show%20all%20variables%20that%20are%20used%20in%20the%20WHERE%20clause%0Aselect%20%2a%20where%20%7B%0A%20%20%23%20The%20first%20expression%20matches%20the%20three%20columns%20of%20the%20Triple%20Store%20with%3A%0A%20%20%23%20%20%20%22find%20any%20subject%20that%20has%20an%20OSM%20%27place%27%20tag%2C%20and%20any%20value%20of%20that%20tag%22%0A%20%20%23%0A%20%20%23%20Question%20mark%20represents%20a%20variable.%20%3Fosm%20becomes%20a%20URI%20for%20an%20OSM%20object%2C%20e.g.%0A%20%20%23%20%20%20%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fnode%2F2681940767%3E%20%20%28Everest%29%0A%20%20%23%20The%20same%20URI%20may%20also%20be%20written%20with%20a%20prefix%20-%20osmnode%3A2681940767%0A%20%20%23%20All%20OSM%20tags%20use%20osmt%3A%20prefix.%20Using%20osmt%3Aplace%20constant%20only%0A%20%20%23%20matches%20OSM%20object%20with%20a%20place%20tag.%20The%20%3Fplace%20variable%20will%0A%20%20%23%20become%20the%20value%20of%20the%20place%20tag.%20You%20can%20use%20a%20constant%20instead%20of%20a%20variable%2C%0A%20%20%23%20e.g.%20substitute%20%3Fplace%20with%20a%20constant%20string%20%27city%27.%0A%0A%20%20%3Fosm%20osmt%3Aplace%20%3Fplace.%0A%0A%20%20%23%20osmm%3A%20prefix%20means%20%22meta%20values%22%2C%20e.g.%20OSM%20object%20type%2C%20location%20%28loc%29%2C%20version%2C%20...%0A%20%20%23%20Uncomment%20to%20limit%20to%20a%20specific%20type%20of%20an%20OSM%20object%20%28%27n%27%2C%20%27r%27%2C%20%27w%27%29.%0A%20%20%23%20%20%20%3Fosm%20osmm%3Atype%20%27r%27.%0A%0A%20%20%23%20osmm%3Aloc%20is%20a%20centroid%20point%20for%20most%20OSM%20objects.%20If%20included%2C%20the%20results%0A%20%20%23%20can%20be%20shown%20on%20a%20map%20by%20switching%20to%20the%20map%20view%20%28right%20under%20the%20query%29%0A%20%20%23%20%20%20%3Fosm%20osmm%3Aloc%20%3Fcoordinates.%0A%0A%20%20%23%20The%20FILTER%20expressions%20allow%20complex%20filtering%20beyond%20a%20simple%20%22must%20match%22.%0A%20%20%23%20%20%20filter%28%3Fplace%20%3D%20%27town%27%20%7C%7C%20regex%28%3Fplace%2C%20%27%5Ba-z%5D%5B0-9%5D%27%2C%20%27i%27%29%29%0A%0A%20%20%23%20This%20will%20limit%20results%20to%20places%20which%20do%20not%20have%20a%20%60name%3Aen%60%20tag.%0A%20%20%23%20%20%20filter%20not%20exists%20%7B%20%3Fosm%20osmt%3Aname%3Aen%20%3Fnameen.%20%7D%0A%0A%20%20%23%20For%20OSM%20objects%20with%20the%20wikidata%20tag%2C%20find%20the%20English%20name%20of%20that%20object%20in%20Wikidata%0A%20%20%23%20if%20it%20exists.%0A%20%20%20%20%20%3Fosm%20osmt%3Awikidata%20%3Fwd.%0A%20%20%23%20With%20that%20get%20from%20the%20Wikidata%20SPARQL%20endpoint%20service%20what%20type%20of%20the%20object%20it%0A%20%20%23%20is%20%28P31%20is%20the%20property%20instance%20of%20in%20Wikidata%29%2C%20and%20the%20label%20for%20that%20type%2C%0A%20%20%23%20also%20if%20exists%20in%20English.%20For%20labels%20and%20descriptions%2C%20you%20may%20instead%20use%20a%0A%20%20%23%20service%20that%20picks%20first%20available%20language%20based%20on%20a%20list.%0A%20%20%23%20%20%20service%20%3Chttps%3A%2F%2Fquery.wikidata.org%2Fsparql%3E%20%7B%0A%20%20%23%20%20%20%20%20%3Fwd%20wdt%3AP31%20%3Ftype.%0A%20%20%23%20%20%20%20%20optional%20%7B%20%3Fwd%20rdfs%3Alabel%20%3Flabel.%20filter%28lang%28%3Flabel%29%20%3D%20%22en%22%29%20%7D%0A%20%20%23%20%20%20%20%20optional%20%7B%20%3Ftype%20rdfs%3Alabel%20%3Ftypelabel.%20filter%28lang%28%3Ftypelabel%29%20%3D%20%22en%22%29%20%7D%0A%20%20%23%20%20%7D%0A%7D%0A%23%20Similar%20to%20SQL%2C%20queries%20can%20use%20aggregations%2C%20subqueries%2C%20and%20limit%20the%20results%0Alimit%2010%20%20%7D%0A%7D%0A Wikidata identifiers of OpenStreetMap place types] ||  ||  ||  || unstable

Revision as of 17:21, 5 May 2024

About

This page collects information regarding prefixes used in SPARQL queries, with special attention to federated queries.

MaRDI portal default prefixes

Prefixes for other endpoints

A brief selection of external SPARQL endpoints that are candidates for federation with the MaRDI portal endpoint.
Database name endpoint URL sample query involving the endpoint sample federated query involving the endpoint sample federated query involving the endpoint and MaRDI MaRDI properties for the endpoint comments
BioModels Database https://www.ebi.ac.uk/rdf/services/sparql
FactGrid https://database.factgrid.de/sparql Map of mathematicians in Paris List of sample queries
NFDI4Culture https://nfdi4culture.de/sparql List of people There is also https://nfdi.fiz-karlsruhe.de/sparql but it seems less active and less complete.
OpenStreetMap https://sophox.org/sparql Wikidata identifiers of OpenStreetMap place types unstable
Wikidata https://query.wikidata.org/ Candidate items for a zbMATH author ID statement in Wikidata See also Wikidata:Lists/SPARQL endpoints
WikiPathways http://sparql.wikipathways.org/sparql Wikidata identifiers of WikiPathways metabolites