Re: [ba-ohs-talk] TouchGraph used on backlink DB
Hi Alex, (01)
comments below... (02)
----- Original Message -----
From: "Alex Shapiro" <alex@touchgraph.com>
To: <ba-ohs-talk@bootstrap.org>
Sent: Saturday, December 15, 2001 1:03 AM
Subject: Re: [ba-ohs-talk] TouchGraph used on backlink DB (03)
(Ugh! I've just noticed how my mail client quotes replies without including
the header data. Rot. Wonder if there's a setting I can change?) (04)
> Nice, I am surprised to see how simple that was. For some reason it
seemed
> like a more involved process "on paper".
>
> Too bad about the long node names. The new version has node id's (which
> are strings), as well as labels, so minor changes to the code below would
> yield nicer node names. Which gives me an idea...
>
> As long as we are hacking, why not change the line
> String firststr = line.substring(0, midspace-1);
> to
> String firststr = line.substring(line.indexOf("msg"), midspace-1);
> or
> String firststr = line.substring(line.indexOf("ba-"), midspace-1);
> to avoid confusion between the two lists. (05)
Yes, good idea. I was heading there next. ;-) (06)
>
> I wonder how useful the results of such a visualization would be,
> though. The advantage that Wiki's like Langreaiter.com has over email
> lists, is that any time a concept is mentioned it automatically gets a
> hyperlink. The backlink DB however, only contains explicit
> hyperlinks. So, in the case where one replies to an annoucement of a link
> without including the link itself ( for instance, this email lack(ed) a
> link to the backlink database http://www.bootstrap.org/lists/backlinks.txt
> ) A connection would not be made between the reply and the original post. (07)
Yes, I do think this particular visualization is only part of the story. (08)
Was fun to play with the TG GraphLayout library though. (09)
--
Cheers,
Peter (010)
>
> It's still cool though, thanks Peter.
>
> --Alex
>
> At 10:09 PM 12/14/01 +0000, Peter Jones wrote:
> >OK this works:
> >
> >public void getBDBGraph()
> > {
> > String line = "";
> >
> > try
> > {
> > BufferedReader bdbReader = new BufferedReader(new
> >FileReader("C:\\Temp\\backlinks.txt"));
> > while(line != null)
> > {
> > line = bdbReader.readLine();
> > if(line == null) {continue;}
> > System.out.println(line);
> > int midspace = line.indexOf(9); //hunts TAB chars
> > if(midspace != -1)
> > {
> > System.out.println("midspace: " + midspace);
> > int linelngth= line.length();
> > String firststr = line.substring(0, midspace-1);
> > String secondstr= line.substring(midspace+1, linelngth);
> > Node r = tgPanel.getGES().findNode(firststr);
> > if(r == null)
> > {
> > r = new Node(firststr);
> > tgPanel.addNode(r);
> > }
> >
> > Node n = tgPanel.getGES().findNode(secondstr);
> > if(n == null)
> > {
> > n = new Node(secondstr);
> > tgPanel.addNode(n);
> > }
> >
> > if(tgPanel.findEdge(r, n)==null)
> > {
> > tgPanel.addEdge(r, n, 4000);
> > }
> >
> > }
> > }
> > }
> > catch(IOException exc)
> > {
> > System.out.println("getBDBGraph: " + exc);
> > }
> >
> > }
> >
> >--
> >Cheers,
> >Peter
>
> (011)