gephi / gephi-lite

A web-based, lighter version of Gephi
https://gephi.org/gephi-lite
GNU General Public License v3.0
204 stars 21 forks source link

Sharing Network Graph #71

Open nabsiddiqui opened 1 year ago

nabsiddiqui commented 1 year ago

Hello, is it possible to share network graphs to the broader public??

sim51 commented 1 year ago

If you add ?gexf=URL_OF_GEXF_FILE, gephi-lite will be initialized with the provided gexf.

Example : https://gephi.org/gephi-lite/?gexf=https://raw.githubusercontent.com/jacomyal/sigma.js/main/examples/load-gexf-file/public/arctic.gexf

I recommend you to take a look at retina which is a tool that has been designed to share graphs on the web.

nabsiddiqui commented 1 year ago

Thank you so much for the quick response @sim51 . I did not know about the option to add the URL. This may be useful to add in the documentation or have a quick button that says something like "Share" when the user creates and/or saves a gist.

I have used Retina in the past, but this provides some benefits for running layouts, etc. that it does not have. Currently, I have to open up a new Windows computer because Gephi on Mac is still not loading(https://github.com/gephi/gephi/issues/2546).

aileo commented 1 year ago

Made some tests for "fun" and as long as the graph is small enough, it can be provided as data URL :

https://gephi.org/gephi-lite/?gexf=data:application/xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Cgexf%20xmlns%3D%22http%3A%2F%2Fwww.gexf.net%2F1.1draft%22%20version%3D%221.1%22%20xmlns%3Aviz%3D%22http%3A%2F%2Fwww.gexf.net%2F1.1draft%2Fviz%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xsi%3AschemaLocation%3D%22http%3A%2F%2Fwww.gexf.net%2F1.1draft%20http%3A%2F%2Fwww.gexf.net%2F1.1draft%2Fgexf.xsd%22%3E%3Cmeta%20lastmodifieddate%3D%222023-10-25%22%3E%3Ccreator%3E%3C%2Fcreator%3E%3Cdescription%3E%3C%2Fdescription%3E%3C%2Fmeta%3E%3Cgraph%20defaultedgetype%3D%22undirected%22%20%20mode%3D%22static%22%3E%3Cattributes%20class%3D%22node%22%20mode%3D%22static%22%3E%3C%2Fattributes%3E%3Cattributes%20class%3D%22edge%22%20mode%3D%22static%22%3E%3C%2Fattributes%3E%3Cnodes%3E%3Cnode%20id%3D%22a%22%20label%3D%22a%22%3E%3C%2Fnode%3E%3Cnode%20id%3D%22b%22%20label%3D%22b%22%3E%3C%2Fnode%3E%3C%2Fnodes%3E%3Cedges%3E%3Cedge%20source%3D%22a%22%20target%3D%22b%22%20weight%3D%221%22%3E%3C%2Fedge%3E%3C%2Fedges%3E%3C%2Fgraph%3E%3C%2Fgexf%3E

There is probably a way to make the url shorter but I am not good enough at this.

Splines commented 1 month ago

The parameter was renamed to file= in the meantime.

It would be amazing to have a share button in the interface. Alongside this, I'd love to also store the interface settings. This would allow me to share a link to another person, they open it and are ready to explore the graph as I have seen it, e.g. with my custom edge color, at the correct zoom position and x,y coordinates in the graph and with my custom filters applied.

Of course, for big graphs, there's no way to URL encode them. So I do appreciate the option to load a graph from a remote url. I don't know if the interface settings could possibly also be stored in a GraphML file, if not maybe a custom file format would do. I would also not bother if I had to refer one URL to the graph data itself, and point one URL to a file that holds the interface settings.