Group Abstract Group Abstract

Message Boards Message Boards

Translating SPARQL usage example to Wolfram Language?

Posted 4 years ago

Hello. I've been learning how to access SPARQL endpoints using the GraphStore` functions and Wikidata. I've been translating their usage examples into Wolfram Language code and I ran into this piece:

BIND(geof:distance(?beLoc, ?shLoc) as ?dist)

I don't know how to translate that. I checked the SPARQL documentation, the GraphStore` documentation, and other examples to establish some basis of comparison to translate the SPARQL expression, and I tried some guesses, but was unable to construct a proper query. I don't know how to express the argument within the parenthesis.

Here are coordinates:

SPARQLExecute[
 "https://query.wikidata.org/sparql",
 SPARQLSelect[{
   RDFTriple[wd["Q39671"], wdt["P625"], SPARQLVariable["shLoc"]],
   RDFTriple[wd["Q64"], wdt["P625"], SPARQLVariable["beLoc"]]
   }]]

Thank you for your assistance.

POSTED BY: James Wey
Posted 4 years ago
POSTED BY: James Wey
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard