gephi / gephi-plugins

Repository for Gephi Plugins maintained by the team. Each plugin has it's branch.
270 stars 623 forks source link

Twitter Stream Plugin #84

Closed totetmatt closed 8 years ago

computermacgyver commented 8 years ago

This is awesome, Matthieu. I think the Gephi community is going to find this plugin super helpful---I know it is something I will highlight when teaching introduction sessions.

I'm going to make a few comments/suggestions on the code to help improve it. I am not a member of the core development team; so, these are only my suggestions. However, since I have developed a few plugins for Gephi I've learned some of the common issues and hopefully this will help your plugin get launched more quickly.

Thank you again for writing this and sharing it.

mbastian commented 8 years ago

One general comment about your calls to graphController.getGraphModel().getGraph(), I would recommend to proceed differently: obtain the current workspace at the top of your funnel in the UI and then pass down a reference to GraphModel. That will avoid a lot of calls to getGraphModel() which isn't inefficient but it's still a lot of redundant work with locking/synchronisation consequences. I haven't tested your plugin yet but I imagine that it's possible for the user directly or another plugin to switch workspaces while your plugin is operating and that's dangerous as suddenly the getGraphModel returns a different graphModel.

Also, it would be awesome if you could attach one or two screenshots to your plugin. It's really simple, just put images into the src/img folder and the gephi-maven-plugin will take care of the rest so they are displayed on the plugins website.

mbastian commented 8 years ago

Testing your plugin now. Unfortunately on Mac OS X there are issues when windows are overlapping with the Graph window and you obtain something like this:

screen shot 2016-02-19 at 10 24 07 pm

I don't really have a workaround to suggest :/ and would recommend using another mode than the graphmode at the moment. I know that forces you to probably reshuffle your UI and fit into a smaller real estate in either layoutmode, rankingmode or filtersmode.

mbastian commented 8 years ago

There seems to be a little layout issue with some hidden element on Mac OS:

screen shot 2016-02-19 at 11 14 00 pm
mbastian commented 8 years ago

Cool, not an issue but a suggestion regarding edge types. I think there's a nice opportunity to leverage the multi-graph capabilities. Right now all edges are created equal but you could have typed edges (mention, follow etc..). You can do so by providing a type integer to the newEdge() method. This type can remain an integer if you like (e.g. 1 = follow etc) but the best is to associate this with a label for relationship, which is something gephi can do. If you call int type = graphModel.addEdgeType("Follow") you can use this integer without having to worry about it's value. If you call addEdgeType() repeatatly it will just return the same so you could streamline this into the newEdge() function if you like, e.g. newEdge(source, target, graphModel.addEdgeType("Follow"), 1.0, true). although it's not as fast as caching the types.

eduramiba commented 8 years ago

Hi Totet, Are the changes complete?

Thanks, Eduardo

totetmatt commented 8 years ago

hi, if eveything is right on gephi team side, no more change to complete. But as explain on gephidev chat, I will be unable to support the plugin for the moment as im "away from internet" until mid april. Therefore I would like to wait if possible, before merging so that I can fully support feedback from user when I will be back.

eduramiba commented 8 years ago

Hi Totet, pretty awesome work!

Can I suggest a few small improvements before merge?

One would be adding a 'Type' string column or similar to nodes, so data can be filtered more easily. The other is a better initial random position, similar to the positions created by data laboratory, also a initial size of 10.

I created a pull request in your branch with these changes + a few details https://github.com/totetmatt/gephi-plugins/pull/1

eduramiba commented 8 years ago

Plugin available, congrats!