Using SHMARQL¶
A SHMARQL site has four everyday tools. Every page of the site has a header with links to them.
| Tool | Address | Use it to… |
|---|---|---|
| SPARQL endpoint | /sparql, /sparql/<key> |
…query the data from scripts, notebooks and other tools. |
| Query editor | /query |
…write and run SPARQL in the browser, and share queries as links. |
| Entity viewer | /entity?uri=… |
…look at one resource as a readable page, and download it as RDF. |
| Documentation pages | / |
…explain your data, with example queries that readers can run. |
Data stories and the story editor have a section of their own: Data stories.
The examples use Wikidata¶
All examples in this documentation query Wikidata
through a profile named wikidata (see
SPARQL profiles). A few Wikidata basics help when
reading them:
- Every item has a Q-number, and its IRI is
http://www.wikidata.org/entity/Q…. Johannes Vermeer is Q41264, Rembrandt is Q5598, painting is Q3305213. - Properties have P-numbers. In queries,
wdt:P31means instance of,wdt:P170creator,wdt:P571inception (date made),wdt:P195collection,wdt:P625coordinate location,wdt:P18image. - The Wikidata Query Service predefines prefixes such as
wd:,wdt:,rdfs:andschema:, so the example queries don't declare them. SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }adds a…Labelvariable with an English label for every variable in the query.