AngryLoki / wikidata-graph-builder

Visualize Wikidata items using d3.js
https://angryloki.github.io/wikidata-graph-builder/
MIT License
187 stars 24 forks source link

problem building a graph #5

Closed jaygray0919 closed 1 year ago

jaygray0919 commented 5 years ago

May I ask for your help with a query that we'd like to present in wikidata-graph-builder? We have this query:

SELECT ?item ?itemLabel ?linkTo ?linkToLabel WHERE {
  ?item wdt:P166 wd:Q37922 ;
        wdt:P910 wd:Q8064684 .
  OPTIONAL {
    ?linkTo wdt:P166 wd:Q37922 ;
            wdt:P31 wd:Q5 } .

  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

that can be seen here

But the structure of the query does not support a 'hedgehog' type graph illustrating the relationship between Dylan and other winners of the Nobel Prize in Literature, as shown here

How should we redesign the query so that the relationships are illustrated in wikidata-graph-builder?

Thanks for help here.

/jay gray