igraph / rigraph

igraph R package
https://r.igraph.org
551 stars 200 forks source link

TODOs in `socnet.R` #1460

Closed maelle closed 2 months ago

maelle commented 2 months ago

There are a few TODOs in socnet.R but it made me wonder why igraph has this interactive interface. Should it still be supported?

szhorvat commented 2 months ago

IMO interactive plotting and graph editing for small graphs (tkplot()) is very useful. We invested in creating a similar but more polished and more usable interface in Mathematica, and many users appreciate it. Perhaps the R version just needs more advertisement, or some improvement. What's holding it back is no support for adding/removing vertices/edges, which would be the the most useful possible feature ...

As for the analysis UI (tkigraph()), I am much more skeptical about this. It might make more sense to allow other GUI tools to integrate well with igraph rather than maintain this ourselves.

Both of these are my personal opinion, and I expect others may disagree.

szhorvat commented 2 months ago

It'd be good to try to get an idea about practical usage before removing any of this functionality. Suppose someone uses tkigraph() for teaching, but we don't even know about it.

krlmlr commented 2 months ago

I don't see evidence of tkigraph() being used. Can we move this part to a separate package on GitHub?

https://github.com/search?q=tkigraph+language%3Ar+-path%3A**%2Fsocnet.R++-path%3A**%2Ftkigraph.Rd++-path%3A**%2Ftkigraph.html&type=code

krlmlr commented 2 months ago

tkplot() seems to be used.

https://github.com/search?q=%2Ftkplot%5B%28%5D%2F+language%3Ar+-path%3A**%2Ftkplot.R++-path%3A**%2Ftkigraph.Rd++-path%3A**%2Ftkigraph.html&type=code

krlmlr commented 2 months ago

Is there a more modern HTML- or JS-based alternative for tkplot() ?

maelle commented 2 months ago

If we remove tkigraph() in a release and someone complains, at least we'd know it's used? :sweat_smile: (I obviously don't want to willingly break anyone's teaching materials)

szhorvat commented 2 months ago

Factoring out tkigraph to a separate package (which might receive minimal maintenance for a little while) sounds like the best idea. It doesn't even need to go on CRAN. This way:

We did the same with the spectral coarse graining functions in the C core, https://github.com/igraph/igraph-scg Keeping them functional after igraph updates turned out to take near-zero work.