Friend of friend

darobin on 2002-08-29T08:58:17

Oooh, I like those new little icons! Is that the first step towards exporting FOAF files from use.perl? For a sample document: my FOAF file.


Graphical fofofs maps

rafael on 2002-08-29T10:02:32

I wondered once if it would be possible to produce a graphical map of use.perl friends or fans, centered at an arbitrary user, with a specified "radius". However I've no idea which tool to use to produce such a topological map. (and is there a more computer friendly version of the friends page?)

Re:Graphical fofofs maps

Matts on 2002-08-29T10:59:47

Sounds like a job for graphviz (and probably LWP to extract the details).

Re:Graphical fofofs maps

briac on 2002-08-29T12:19:09

Actually, I wrote a while ago this kind of script, but it crashed my box every time I tried to launch it... If anyone is willing to give it a try, it's available here.

Re:Graphical fofofs maps

darobin on 2002-08-29T11:46:35

As Matt said, so long as you can extract the data it's probably a job at which GraphViz would excel (especially using its nice Perl interface ;).

There is no more computer friendly version of the friends page that I know of (except the db behind it of course) but there was talk a few months ago of adding SOAP support to the Zoo. It shouldn't be too hard for anyone that knows a little about Slash (and even someone that doesn't). I might do it if I have the time (which could be whenever...). That being said, the friends page isn't all that hard to parse either.

Re:Graphical fofofs maps

barries on 2002-08-29T13:51:51

like this:

http://users.telerama.com/user/rbs/naouri.html

Re:Graphical fofofs maps

rafael on 2002-08-29T16:11:44

And was this produced with GraphViz ? (which looks great anyway -- ) Producing a readable layout may be challenging due to the amount of data.

Re:Graphical fofofs maps

barries on 2002-08-29T16:33:46

That was produced by a perl layout engine I hacked up that I don't own the rights to, which uses GD (for truetype fonts), Graphics::Libplot (for bezier lines), and Image::Magick to glue the two together.

Back then, Libplot had troubles outputting .png, and GD had trouble reading them, so Image::Magick did a .gif -> .png conversion for me. What a hack. I offered to hire Thomas Boutell to put beziers into GD (was too time constrained myself at the time), but he wasn't interested.

GraphViz handles tree shaped digraphs and undirected graphs, and its output does not map to a circular layout very well. In an early prototype I tried warping a graphviz layout and drawing the result myself: ugh. Also, GraphViz generates confusing graphs for large data sets, though I do use it a lot. Just wrote another module that uses it a few weeks ago in fact. It's good at showing smallish (less than a few 100 nodes, say) opcode trees and SCM controlled file branching. it offers limited support for pinning nodes where you want them, though, and for controlling the layout easily.

I'd love to get a contract to build a better version of that layout engine using, say, Imager.pm, but it's not likely.