neurofuzzy, flash game development, rich internet applications, free source code – *alt.neurotica.fuzzy*

neurofuzzy, flash game development, rich internet applications, free source code – *alt.neurotica.fuzzy*

2/21/2006

Treemap of NPR Story tags

Filed under: General, PHP — geoff @ 11:06 am

TreemapI’ve been working on my own treemap on reverbiage. It shows the popularity of NPR stories with particular keywords, shaded by recency. Green tiles use lame logic to determine proper names. The original idea is not mine, but I got the inspiration from here. How could I look at something like that and not try it myself?? It, like the rest of the site, is a work in progress.

The algorithm itself is very very simple. I’ll post some code soon, but here’s the gist of it:

  1. Take a list (array) of items as keys with their popularity as the value for each.
  2. Send this list to a function. This will represent a node.
  3. The function will chop the array in half. Then, it will take the sum of the values from each half.
  4. Then divide this node into two parts, one for each half of the array.
  5. Size the two subnodes as a percentage of their size relative to the total sum of the array.
  6. Recurse the subnodes into the same function, sending with them their respective half of the array.
  7. Alternate the visual division horizontally and vertically as depth of recursion increases.

Okay, it is simpler than how I wrote it, trust me. : )

Update: I’ve released the treemap source code here.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

7 Comments »

  1. Hi, great job on the treemap. I’ve been looking around trying to find a way to do this. I’ll give your explanation a try and see how far I get.

    Would you be willing to share the code?

    Cheers,
    Brian

    Comment by Brian — 4/24/2006 @ 1:44 pm

  2. Brian,

    Yeah, I’ve got a class that I wrote… I just haven’t had time to post it. Thanks!

    Comment by geoff — 4/24/2006 @ 1:54 pm

  3. Great, I’d love to see how you handled this. They’ve predicted bad weather for the weekend which means my wife and daughter will probably sleep in and I might get an hour or two to play around with this. Who needs suduko..

    Brian

    Comment by Brian — 4/27/2006 @ 1:51 pm

  4. Brian,

    It’s posted here. Enjoy!

    -Geoff

    Comment by geoff — 4/28/2006 @ 11:39 pm

  5. [...] Version 2.0 features a treemap for files bigger than 100k. Thanks neurofuzzy for the php-treemap source code. [...]

    Pingback by Disk Usage Visualized: Treemap | WordPress Designpraxis — 8/29/2007 @ 2:48 pm

  6. Hi !

    Oh , So That's How Top Members List Is Made !!

    Comment by gcttirth — 3/27/2009 @ 3:36 pm

  7. your job are like very very good . your code is very useful for me . great great job .
    god bless you.

    great work……………………

    Comment by manish — 5/26/2009 @ 12:11 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

 

Powered by WordPress