Uploading SPARQL query results to HuViz

Displaying SPARQL query results in HuViz

  1. Go to SPARQL Queries. Click on the menu icon at the top left of the panel:

    Selecting menu in SPARQL Query Editor

    Configure your request to provide output in turtle syntax, and then click on the menu icon again to collapse the panel:

    Changing Construct/Describe attribute to Turtle

  2. Insert SPARQL query into available text box

    1. Example query: This will find all the triples, that is, all the linked data properties and assertions, related to "Aulnoy, Marie-Catherine d'"

                            PREFIX cwrc: <http://sparql.cwrc.ca/ontologies/cwrc#>
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        PREFIX data: <http://cwrc.ca/cwrcdata/>
        PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
        CONSTRUCT {
          ?contextFocus ?subjectCentricPredicate ?o .
          ?contextFocus rdfs:label ?label.
          ?contextFocus skos:altLabel ?name.
        } WHERE {
          GRAPH <http://sparql.cwrc.ca/db/BiographyV6> {
            ?person rdfs:label "Aulnoy, Marie-Catherine d'".
            BIND(?person AS ?contextFocus)
               ?context cwrc:contextFocus ?contextFocus ;
                        ?p ?o ;
            }                      .
            # Grab the correct relationship for the predicate we are looking for
            ?p cwrc:subjectCentricPredicate ?subjectCentricPredicate .   
          ?contextFocus rdfs:label ?label.
          ?contextFocus skos:altLabel ?name.

      You can substitute a different name, in the standard inverted form, from the Orlando dataset to get the triples related to another author or person.

  3. Hit “play” to display the results of the query

    Selecting Play button

  4. Download results to your computer

    Selecting Download button

  5. Check your downloads folder for a file named “queryResults”
  6. Rename that file as you wish, with the file extension .ttl
    1. Example: marie-catherine-aulnoy.ttl
  7. Upload this file to HuViz by following these steps in the Commands tab:

    1. Commands > DATASET > Provide New Dataset ...

      DATASET > Provide New Dataset ...

    2. There are two ways of uploading the dataset:
      1. Drag and drop your downloaded file into this box:

        Drop box for files or links


      2. Provide a github link such as https://raw.githubusercontent.com/alliyya/huviz_demo_data/master/marie-catherine-aulnoy.ttl

        This is particularly useful if you want to share your results with someone else, or make modifications or additions to the SPARQL query results. Be sure to use the URL for the “Raw” version of the file in GitHub:

        Select Raw Button

  8. Click on the ONTOLOGY list and select the CWRC Ontology.

    CWRC Ontology Selected

    After you have selected the ontology, the LOAD button will become active.

  9. Click LOAD & Explore!