SPARQL Beispiel

2.4. SPARQL Beispiel#

Neben Jupyter Notebooks können auch Markdown-Dateien ausführbaren Code enthalten. Dazu muss ein korrekter Vorspann (“frontmatter”) vorhanden sein, in dem per kernelspec ein Jupyter Kernel für das Notebook definiert wird. Hier wird der SPARQL-Kernel geladen.

Basierend auf der OER https://quadriga-dk.github.io/Tabelle-Fallstudie-2/SPARQL_Grundlagen.html als minimaler Test der SPARQL-Einbindung.

%endpoint https://data.europa.eu/sparql
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dcatde: <http://dcat-ap.de/def/dcatde/>
PREFIX pg: <https://www.dcat-ap.de/def/politicalGeocoding/>

SELECT ?uri ?title ?contributorid ?stateKey
WHERE {
    ?uri dct:title ?title .
    ?uri dcatde:contributorID ?contributorid .
  OPTIONAL {?uri pg:stateKey ?stateKey} .
}
Endpoint set to: https://data.europa.eu/sparql
uri title contributorid stateKey
http://data.europa.eu/88u/dataset/bc809749-37a0-41a6-8f74-ed59624b8516 Digitale Topographische Karte 1 : 25 000 (1989-1999) - 3038 Glöwen http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/b7cad163-8d99-4d97-b781-e4f5a11078d3 Digitale Topographische Karte 1 : 10 000 - 3952-NO Friedland - Groß Muckrow http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/8f697ced-8cf8-4d8d-a512-d352354f5760 Digitale Topographische Karte 1 : 25 000 (1989-1999) - 4151 Werben http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/119d91e8-1984-4fad-ac5d-8d5c3a4a82a3 Digitale Topographische Karte 1 : 50 000 (1993-2005) - L3948 Märkisch Buchholz http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/b911982d-33ef-408c-8840-96a0702021db~~1 Topographische Karte 1 : 25 000 - Ausgabe Staat (1981-1989) N-33-123-B-c Berlin (West)-Charlottenburg http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/cedcb7b0-fa9e-4ea1-ab8f-8a0f1aa78eeb~~1 Topographische Karte 1 : 50 000 - Ausgabe Volkswirtschaft (1974-1982) 0610-2 Gartz (Oder) http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/6460bd88-39f6-4172-a985-631cc7b437d1 Digitale Topographische Karte 1 : 10 000 (1986-2000) - 3541-SO Brandenburg an der Havel - Klein Kreutz http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/25de6bd7-284d-403a-94a9-cd8117f320a1 Digitale Topographische Karte 1 : 10 000 (1986-2000) - 3251-SO Neulewin http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/fca0911a-e84c-498c-823e-19e0225b0c46 Topographische Karte 1 : 50 000 - L2946 Templin http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/5251cc02-187b-45e5-9a5e-d5298a4aaf39 Digitale Topographische Karte 1 : 100 000 - C2734 Parchim http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/ad361d03-3ef8-407a-8a13-5eba752a3302 Digitale Topographische Karte 1 : 10 000 (1986-2000) - 3742-NO Rädel http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/b20cf832-3d7a-4516-9ded-77cfa93c3a17 Digitale Topographische Karte 1 : 10 000 - 3239-NO Rhinow - Kietz http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/99362dd1-9458-421a-b548-a53f161f54d2 Digitale Topographische Karte 1 : 10 000 - 2841-SW Wittstock/Dosse - Dossow http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/03a3934d-be7e-4c6c-a1db-739a60bcfa34 Digitale Topographische Karte 1 : 10 000 (1986-2000) - 2752-NO Staffelde http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/b99bef99-937b-4102-989e-fe478443a116 Digitale Topographische Karte 1 : 10 000 (1986-2000) - 3145-SO Oranienburg - Malz http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/87c17352-3fb0-4478-b44c-e011ed633c72 Digitale Topographische Karte 1 : 10 000 (1986-2000) - 4647-NW Zabeltitz http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/28975f84-f549-453f-8e21-1e98edcc36b6 Topographische Karte 1 : 50 000 - Ausgabe Staat (1979-1989) M-33-18-B Sagar http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/abe5255e-f346-4277-93c1-a7a7360818c4 Topographische Karte 1 : 10 000 - 3747-SW Schöneiche http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/5d16f7eb-79a0-4e5e-91d6-7c5de0915052 Digitale Topographische Karte 1 : 10 000 (1986-2000) - 3039-NW Döllen http://dcat-ap.de/def/contributors/openDataBrandenburg
http://data.europa.eu/88u/dataset/631bda27-c160-4147-b167-3b8986989523 ATKIS - Digitales Basis-Landschaftsmodell - 2933-NO Besandten http://dcat-ap.de/def/contributors/openDataBrandenburg
Total: 50000, Shown: 20