This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dbowl = namespace("http://dbpedia.org/ontology/"); | |
yago = namespace("http://dbpedia.org/class/yago/"); | |
dbp = namespace("http://dbpedia.org/page/"); | |
people = query("http://dbpedia.org/sparql") | |
.kind(dbowl("Person")) | |
.has(dbowl("birthPlace")) | |
.is(dbp("Argentina")) | |
.end().results(); // Without a callback, returns a pseudo-future (empty array until result is obtained, then the array of results) | |
golfAwardWinners = people.traverse([dbowl("award")]).filter(where().kind(yago("ProfessionalGolfTours"))).results(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.sparql("http://services.data.gov.uk/education/sparql") | |
.prefix("sch-ont", "http://education.data.gov.uk/ontology/school#") | |
.select(["?name", "?address1", "?address2", "?town", "?postcode"]) | |
.where("?school", "a", "sch-ont:School") | |
.where("sch-ont:establishmentName", "?name") | |
.where("sch-ont:districtAdministrative", "<http://education.data.gov.uk/placeholder-id/administrativeDistrict/City-of-London>;") | |
.optional() | |
.where("?school", "sch-ont:address", "?address") | |
.where("?address", "sch-ont:address1", "?address1") | |
.where("sch-ont:address2", "?address2") |