prefix geo: <http://www.opengis.net/ont/geosparql#>
select ?pointLabel where {
values (?pointLabel) {
(
"Point Nemo is the place in the ocean that is farthest from land"
)
}
}
See what comes back as response (look under: Table and Response).
prefix geo: <http://www.opengis.net/ont/geosparql#>
select * where {
values (?point ?pointTooltip ?pointLabel ?pointColor) {
("Point (-123.393333 -48.876667)"^^geo:wktLiteral
"Point Nemo"
"Point Nemo is the place in the ocean that is farthest from land"
"blue")
}
}
❓ Question / Result #1.a
Summarize what is visible under theGeotab and add in your report a description and screenshot of this.
Now we will work with a different query (originating from: https://linkeddata.cultureelerfgoed.nl/rce/-/queries/rijksmonumenten-gemeente-provincie/9).
First, add into the input box at the top of the page (next to the wheel icon) the following SPARQL end point: https://api.linkeddata.cultureelerfgoed.nl/datasets/rce/cho/services/cho/sparql (do not forget to press Enter).
Second, perform the query:
prefix graph: <https://linkeddata.cultureelerfgoed.nl/graph/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix ceo: <https://linkeddata.cultureelerfgoed.nl/def/ceo#>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix rn: <https://data.cultureelerfgoed.nl/term/id/rn/>
prefix owms: <https://linkeddata.cultureelerfgoed.nl/graph/owms>
select DISTINCT
(iri(concat("https://monumentenregister.cultureelerfgoed.nl/monumenten/", ?rijksmonumentnummer)) as ?monumentenregister)
?rijksmonumentnummer ?straat ?huisnummer ?adres ?provincie ?gemeente ?postcode ?woonplaatsnaam ?functie ?datumInschrijving
where {
graph graph:instanties-rce {
?rijksmonument
ceo:rijksmonumentnummer ?rijksmonumentnummer;
ceo:datumInschrijvingInMonumentenregister ?datumInschrijving;
ceo:heeftJuridischeStatus rn:b2d9a59a-fe1e-4552-9a05-3c2acddff864;
ceo:heeftMonumentAard rn:fc966a68-8863-4970-a83e-110f96006c21;
ceo:heeftBasisregistratieRelatie ?basisrel.
?basisrel ceo:heeftProvincie ?prov;
ceo:heeftGemeente ?gem.
OPTIONAL {
?basisrel ceo:heeftBAGRelatie ?bagrelatie.
OPTIONAL { ?bagrelatie ceo:volledigAdres ?adres. }
OPTIONAL { ?bagrelatie ceo:postcode ?postcode_. }
OPTIONAL { ?bagrelatie ceo:woonplaatsnaam ?woonplaatsnaam. }
OPTIONAL { ?bagrelatie ceo:openbareRuimte ?straat. }
OPTIONAL { ?bagrelatie ceo:huisnummer ?huisnummer. }
}
BIND(replace(str(?postcode_), "([0-9]{4})([A-Z]{2})", "$1 $2") AS ?postcode)
OPTIONAL {
?rijksmonument ceo:heeftOorspronkelijkeFunctie/ceo:heeftFunctieNaam ?functies.
}
}
graph owms: {
?prov skos:prefLabel ?provincie.
?gem skos:prefLabel ?gemeente.
}
OPTIONAL {
graph graph:bebouwdeomgeving {
?functies skos:prefLabel ?functie_.
BIND(replace(?functie_, "\\s\\(.*\\)|\\(.*\\)", "") AS ?functie)
}
}
}
❓ Question / Result #1.b
Summarize what is the result of this query and add in your report a description of this, together with a screenshot.
Now modify the query as follows:
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
?shape
graph graph:instanties-rce { ... } add:
OPTIONAL { ?rijksmonument ceo:heeftGeometrie/geo:asWKT ?shape. }
Response, and see if the Geo view works (it should give you a map).?monumentenregister?shapeLabel.(Note, according to the documentation of yasgui: https://docs.triply.cc/yasgui/#geo-triplydb-plugin, you can also add ?xTooltip ?xLabel ?xColor which will be used for displaying the shape column labelled ?x).
?province in the graph owms: { ... } has to be replaced by the literal value: "Zuid-Holland"@nl (you can check the original query at the RCE to see what values you can use: https://linkeddata.cultureelerfgoed.nl/rce/-/queries/rijksmonumenten-gemeente-provincie/9 )❓ Question / Result #1.c
- Submit your modified query, include in your report: Your new query and screenshots of the result (Table and Map). Add an explanation of how the geometries are encoded in the returned result set.
SELECT ?place ?placeLabel ?location
WHERE
{
# Berlin coordinates
wd:Q64 wdt:P625 ?berlinLoc .
SERVICE wikibase:around {
?place wdt:P625 ?location .
bd:serviceParam wikibase:center ?berlinLoc .
bd:serviceParam wikibase:radius "100" .
} .
# Is an airport
FILTER EXISTS { ?place wdt:P31/wdt:P279* wd:Q1248784 } .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
}
<URI> for your chosen city first, use https://www.wikidata.org/wiki/Special:Search❓ Question / Result #2
- Include in your report:
- Your adapted query
- screenshot of result table and
- screenshot of result map
❓ Question / Result #3
Once more, adapt the query to find hospitals within 30 km around that city (again, include 1. adapted query and screenshots of 2. result table and 3. result map in your report)
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX : <http://dbpedia.org/resource/>
PREFIX dbpedia2: <http://dbpedia.org/property/>
PREFIX dbpedia: <http://dbpedia.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT *
WHERE
{
SERVICE <http://dbpedia.org/sparql>
{
?person dbo:birthPlace :Delft .
?person foaf:name ?name .
FILTER (?name = "Johannes Vermeer"@en) .
?person owl:sameAs ?samePerson .
FILTER(STRSTARTS(STR(?samePerson), "http://www.wikidata.org"))
}
SERVICE <https://query.wikidata.org/sparql>
{
?samePerson wdt:P551 ?residence .
?residence wdt:P625 ?coordinates .
}
}
LIMIT 10
❓ Question / Result #4
Explain/add in your report:
- What does, in plain English, the query ask for?
- What is the role of
SERVICEin this query?- How is the link between the DBPedia triples and Wikidata triples achieved?
- In the result table: Which information comes from DBPedia, which information comes from Wikidata?
- Adapt the query. Change ‘Delft’ to another city name and run again. Include the adapted query plus screenshot of the result table in your report.
Do some research and discover what the main differences and similarities between DBPedia and Wikidata are.
❓ Question / Result #5
Write a short explanation about it in your own words (200 words max) and include it in your report.