

Show HN: Visualizing Hacker News comments with d3.js - zackzackzack
http://zacharymaril.com/HN-Visual-Comments/

======
taliesinb
What is the "average comment tree"? If one has a forest (a disjoint union of
trees), how does one 'average' them? What do the tooltips mean? It's not clear
to me what I'm looking at here.

I think this visualization has potential (I have similar ideas along these
lines) but at the moment it feels a bit like "visualization salad".

~~~
zackzackzack
Agreed on the visualization salad comment. This isn't a normal bar chart and
there are some details that would be nice to know.

Such as: comments on hacker news are trees with the added property of having
order within each level. So you can "add" trees together by overlapping the
trees and calculating how many times a node occurs. Naturally, the top nodes
will have always have higher percentages than the lower nodes within each
level. The interesting part of it to me was comparing the trees produced for
each user and the number and types of comments of people submitted.

The tooltips display information about the types of comments that occured at
that position. The first piece of info is who commented most at that position
for that particular user. So the first node is always by the main user. If you
look at pg's tree, then you see that the top comments are basically pg talking
to himself. We then see the chance that the node will occur at all. So with
pg, there is a 64% chance that someone will reply to him at all. Then after
that, there is a random comment displayed at the position to see the types of
things might say at that point in the comment structure.

If I had to do it over, I would use the reddit API instead of crawling hacker
news and regexping the data out of the html. I felt pretty guilty doing it and
the data wasn't all that great. Also, I was testing this mostly in chrome and
just noticed that the tooltips break in an awful way with firefox. Poop.

------
joering1
my eyes got killed when I click on the link. bleeding orange. but got used to
after a minute. how do i check other users? some minor glitch in html/css - on
chrome top banner glues text together (I gave adblock turned on fyi) last q:
how do you scrap data??

~~~
zackzackzack
Yeah design should have been better done. To check the other users, hover over
the username for them. Should have been clearer and tested better overall.

And I crawled hacker news with python. It was shameful and I am not proud of
it: [https://github.com/zmaril/HN-Visual-
Comments/blob/master/web...](https://github.com/zmaril/HN-Visual-
Comments/blob/master/webscraper.py)

------
earle
its great you can smash some data into a d3 example and all, but why is this
on hacker news?

~~~
zackzackzack
Why is anything on Hacker News? Mostly because the submitters thought people
would be interested. The same holds for this submission.

