Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On topic profiles, add neighbourhood graph of the concept #1141

Open
Daniel-Mietchen opened this issue May 29, 2020 · 1 comment
Open

On topic profiles, add neighbourhood graph of the concept #1141

Daniel-Mietchen opened this issue May 29, 2020 · 1 comment

Comments

@Daniel-Mietchen
Copy link
Collaborator

@Daniel-Mietchen Daniel-Mietchen commented May 29, 2020

Sample query (for amyotrophic lateral sclerosis):

PREFIX target: <http://www.wikidata.org/entity/Q206901>

#defaultView:Graph
SELECT ?node ?nodeLabel ?nodeImage ?childNode ?childNodeLabel ?childNodeImage ?rgb WHERE {
  {
    BIND(target: AS ?node)
    ?node ?p ?i.
    ?childNode ?x ?p.
    ?childNode rdf:type wikibase:Property.
    FILTER(STRSTARTS(STR(?i), "http://www.wikidata.org/entity/Q"))
    FILTER(STRSTARTS(STR(?childNode), "http://www.wikidata.org/entity/P"))
  }
  UNION
  {
    BIND("EFFBD8" AS ?rgb)
    target: ?p ?childNode.
    ?node ?x ?p.
    ?node rdf:type wikibase:Property.
    FILTER(STRSTARTS(STR(?childNode), "http://www.wikidata.org/entity/Q"))
  }
  OPTIONAL { ?node wdt:P18 ?nodeImage. }
  OPTIONAL { ?childNode wdt:P18 ?childNodeImage. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Ideally, it would also link the depicted entities to their Scholia profiles.

@Daniel-Mietchen
Copy link
Collaborator Author

@Daniel-Mietchen Daniel-Mietchen commented May 29, 2020

A first version based on the above query is now in #1142 . No idea how to go about linking the depicted entities to their Scholia profiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Topics
  
Awaiting triage
Usability
  
Awaiting triage
Robustifying Scholia
  
Awaiting triage
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.