Adding graph features?

Is there a way to map out the relationships between different users (their friends, groups etc) into a graph? If possible the graph should be a dynamic graph (or else maybe updating once a day). 

More specifically, is there a way to integrate the Gephi API into elgg through a plugin? Another alternative ive been considering is to export the data from Elgg's databases in a Gephi friendly format, compute the graph and then post it back onto Elgg, but this seems like a tedious process. 

Any guidance pointing me in the right direction would be much appreciated :D