Coder Social home page Coder Social logo

SPARQL Query Visualization about kglab HOT 5 CLOSED

derwenai avatar derwenai commented on July 17, 2024 6
SPARQL Query Visualization

from kglab.

Comments (5)

louisguitton avatar louisguitton commented on July 17, 2024 2

HI @pebbie , that's excellent!

I was able to run your notebook with this

pip install pygraphviz jupyterlab pyvis networkx

and this query

#endpoint: https://sparql.rhea-db.org/sparql
PREFIX rh:<http://rdf.rhea-db.org/>

SELECT ?reaction ?reactionEquation
WHERE {
VALUES ?status { rh:Approved rh:Preliminary }
    ?reaction rdfs:subClassOf rh:Reaction .
    ?reaction rh:status ?status .    
    ?reaction rh:equation ?reactionEquation .
}
ORDER BY ?reaction

gets visualised into this

Would you feel like adapting your code and contributing this in a PR ?
pyvis nbetworkx rdflib are already part of the requirements and I think we could cut out pygraphviz then right?

from kglab.

pebbie avatar pebbie commented on July 17, 2024 2

so i managed to adapt the code to generate the graph without using pygraphviz and adding some default style.
pyvis_sparqlgpviz

any suggestion on how to integrate this?

from kglab.

pebbie avatar pebbie commented on July 17, 2024 1

Sure, I'll see if I can provide into networkx graph directly without using pygraphviz.

Do you have any ideas/suggestions on how or where this should be integrated with kglab?

from kglab.

louisguitton avatar louisguitton commented on July 17, 2024 1

Yeah as a first step, I would vouch for "parking" this code either in the util.py file or even in a standalone module sparql_viz.py or something like that.

from kglab.

ceteri avatar ceteri commented on July 17, 2024

@pebbie wonderful!! So glad to see :)

Perhaps as a simple approach to integration, if you'd like to add a PR for this as a utility function in https://github.com/DerwenAI/kglab/blob/main/kglab/util.py then we could refactor into the classes.

@louisguitton @Ankush-Chander: How about, this could fit well within the PyVis-related methods of SubgraphTensor https://github.com/DerwenAI/kglab/blob/main/kglab/subg.py#L452 ?

from kglab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.