Help required with showing dynamic graph on web page?

Graphs inside the browser
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
reticent23
Posts:8
Joined:22 May 2016 09:37
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Help required with showing dynamic graph on web page?

Post by reticent23 » 22 May 2016 09:45

Dear all,

Im new to Gephi and require help. I have created an undirected graph by importing a .csv file of 125 nodes and 250 edges. These nodes are actually data from a website specific page that i want to visualize. But this data is not static. An admin keeps on adding more data to it. SO i need to figure out a way to how to add the newly added data as attributes of nodes to my graph?

I hope i have not confused dear members.Plz help me. Thanks

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Help required with showing dynamic graph on web page?

Post by eduramiba » 23 May 2016 11:51

You might want to check the streaming plugin https://marketplace.gephi.org/plugin/graph-streaming

reticent23
Posts:8
Joined:22 May 2016 09:37
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Help required with showing dynamic graph on web page?

Post by reticent23 » 24 May 2016 15:05

Thanks alot dear, yes this looks like what i was looking for, just a question i had to ask, i want an admin to be able to make changes to the data, and that data be updated via this Graph streaming API, and the clients viewing this graph must get an updated view of the graph and must not be able to change it. Would i be able to achieve this through this API?

P.S I have already created a graph in Gephi, now more nodes needs to be dynamically added in it by admin. Like he will just update data via a simple form and on click of a button i want some API or web service that add the data as a new node in my gefx file..

User avatar
totetmatt
Posts:14
Joined:12 May 2016 19:04
Location:München
Contact:

Re: Help required with showing dynamic graph on web page?

Post by totetmatt » 24 May 2016 17:40

It's technically feasible.

(I never really deep dive into the Toolkit itself but I might expect it has similar approach as the following)

You can try have a look on this to test : https://github.com/totetmatt/graphStreamServer

Another option I've tried is to have everything done via websocket : [Server]<-->(page in browser)<-->[Gephi Local]

reticent23
Posts:8
Joined:22 May 2016 09:37
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Help required with showing dynamic graph on web page?

Post by reticent23 » 25 May 2016 15:05

totetmatt wrote:It's technically feasible.

(I never really deep dive into the Toolkit itself but I might expect it has similar approach as the following)

You can try have a look on this to test : https://github.com/totetmatt/graphStreamServer

Another option I've tried is to have everything done via websocket : [Server]<-->(page in browser)<-->[Gephi Local]
Well i think the GraphStreamServer allows you to view the streaming of the graph data inside Gephi, but i want my users to view the graph data on a web page of a website instead of Gephi. What could be the possible option for that? :?

User avatar
totetmatt
Posts:14
Joined:12 May 2016 19:04
Location:München
Contact:

Re: Help required with showing dynamic graph on web page?

Post by totetmatt » 25 May 2016 18:31

Aan that's another story then :p

Have a look on
- http://sigmajs.org/
- https://github.com/anvaka/VivaGraphJS
- https://d3js.org/

The 3 solutions has their own pro and cons but are equaly very good

reticent23
Posts:8
Joined:22 May 2016 09:37
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Help required with showing dynamic graph on web page?

Post by reticent23 » 26 May 2016 17:04

Yes i have tried d3.js but my issue remains the same, i.e How im going to tell my graph that some more data in website has been added, so update yrself somehow :/ will i write some code explicitly to update the json file containing all the nodes? again it would be re-inventing the wheel, there must be some solution or API for that... :?

User avatar
eduramiba
Gephi Code Manager
Posts:1064
Joined:22 Mar 2010 15:30
Location:Madrid, Spain
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Help required with showing dynamic graph on web page?

Post by eduramiba » 27 May 2016 09:21

You would probably write something based on websockets and/or AJAX polling to check if new data is available.

reticent23
Posts:8
Joined:22 May 2016 09:37
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Help required with showing dynamic graph on web page?

Post by reticent23 » 09 Jun 2016 14:10

Ok by AJAX Polling , you mean Web scraping? ok lets suppose i get data in some form like json file, how to write it in my gephi? any functions exist for that? to dynamically add contents in already created gefx file, rather than through gephi editor?

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable