HNHacker News
TopNewBestAskShowJobs

anvaka

1,012 karma · joined January 25, 2012

I'm a software engineer, passionate about data visualization and clever algorithms.

https://twitter.com/anvaka https://github.com/anvaka

submissionscomments
anvaka··on Visualizing Reddit with my graph drawing library
Intriguing idea...
anvaka··on Visualizing Reddit with my graph drawing library
Very nice suggestions! Thank you, kaiwetzel.

I will look into :visited and fix the white spaces. And what is a "recent activity"?

anvaka··on Visualizing Reddit with my graph drawing library
Sure. Graph Dracula's site ( http://www.graphdracula.net/ ) has even more references to the similar projects. Could also be interesting :)
anvaka··on Visualizing Reddit with my graph drawing library
Great catch! Thank you very much. Fixed it.
anvaka··on Visualizing Reddit with my graph drawing library
Just enumerate the nodes:

graph.forEachNode(function(node) { console.dir(node.position); });

By default nodes will not have any position assigned. Only after you run one step of layout algorithm ( https://github.com/anvaka/VivaGraphJS/blob/master/src/Layout... ) they get their positions.

anvaka··on Visualizing Reddit with my graph drawing library
Good catch! I didn't realize reddit encodes '&', '<' and '>' when it returns json data: https://github.com/reddit/reddit/blob/master/r2/r2/controlle... which ends up in: https://github.com/reddit/reddit/blob/master/r2/r2/lib/filte...

It should be fixed now :). Thank you for pointing out!

anvaka··on Visualizing Reddit with my graph drawing library
Thank you :).

2) Yes, every node is a particle, every edge is a spring. Then you apply forces and mother nature does the rest. It always amazed me.

anvaka··on Visualizing Reddit with my graph drawing library
No-no, you are right. I will fix it. Thank you for noticing!
anvaka··on Visualizing Reddit with my graph drawing library
Yep, D3 is amazing and I truly love it. As for my motivation - I wrote the library to learn JavaScript. But I would really want to make it extremely fast even on the large graphs...
anvaka··on Visualizing Reddit with my graph drawing library
Agreed, that's annoying. I couldn't find an easy way to separate horizontal scroll event from vertical. But it's something I really want to fix...
anvaka··on Visualizing Reddit with my graph drawing library
It shows how subreddits relate to each other. The data is taken from subreddit description. And a link between two subreddits means one has a reference to another.

The graph drawing library source code: https://github.com/anvaka/VivaGraphJS

Would love to hear what you think...

anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
Thank you very much :). I am JS n00b also. I started learning the language several months ago with Crockford's "JavaScript: The good parts" book.

And I left a looot of room for improvement in VivaGraphJS (blush). I don't like a lot of its parts. Hope to make it better in the future.

anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
Thank you :)! Would love to hear your feedback!
anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
Very good for 500 lines of code :)! Thanks for sharing. O(n^2) for n-body simulation could hurt performance for the larger graph, i guess. But it should work really well for smaller ones.

BTW this one by Lars Rönnbäck is also very impressive: http://js1k.com/2010-first/demo/618 - press any key to add nodes. It's only 1016 bytes. Amazing.

anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
Thank you, Darius. I'm not sure about its usefulness as well :). But I'm having fun doing these visualizations - that's for sure.

YouTube visualization helps me to avoid duplicates and watch related videos without accidental repetitions. Amazon visualization - I use it to discover primary resources in a given knowledge domains. And sometimes to find what to read next. So far I never regretted a single book that I read based on this visualization. But I might be preconceived :).

anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
That's right! I love the discovery part of these visualizations. It helped me to find proper books many times - the graph drawing library is a result of such discovery.

I wanted to learn JavaScript. So I read a book recommended by my old Silverlight-based visualization, and developed the library.

I believe recommendation was successful. The book is Crockford's "JavaScript: The good parts" - http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockfor...

anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
Thank you some1else!

Interesting point about performance... I'm also running Safari/Lion. Could not notice performance degradation. Maybe it's related to rendering loop: I stop the cycle as soon as algorithm thinks layout is stable enough. The rendering loop restarts when the graph is modified or you interact with nodes.

In rare cases though system cannot find stable state and keeps bouncing. There could also be a bug in my rendering loop start/stop code... Will check it out. Thank you for noticing!

anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
Thank you paulgb. Edges represent related video ( http://code.google.com/apis/youtube/2.0/reference.html#Relat... )

I will add title to the videos shortly...

anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
No, I'm not using Raphaël - didn't want to add dependency. Though it's a great library indeed. I wrote my own very simple svg wrapper (https://github.com/anvaka/VivaGraphJS/blob/master/src/Svg/sv... ) to simplify syntaxis.

In terms of performance - that's a spot on. Rendering turned out to be the most CPU intensive part of the library. The easiest way to improve it is to render less elements (e.g. render one path element for all node's links, instead of having one path per link). But it's harder do it than say :)

LinkedIn has its own visualization: http://inmaps.linkedinlabs.com/ The main problem with social networks visualization is the giant component which usually exists in the network. It makes reading networks of 300 and more people quite challenging. Well, clustering/multi-scale algorithms help, but still it's very difficult problem. Hope one day we can solve it nicely.

Pandora - very nice idea. I wonder if they have API to fetch related songs. Could also look into Last.fm. I would really love if Steam could expose their data through API, but last time I checked them - they did not provide information about similar games...

anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
Thank you, PetrolMan! It should be fixed now.
anvaka··on Visualizing YouTube with my home-made JavaScript graph drawing library
The source code for the library is here: https://github.com/anvaka/VivaGraphJS

The site itself - you can paste URLs from YouTube to visualize particular video :)

← PreviousPage 6 of 6