Read 4chan, Hacker News and reddit comments using a graph visualization.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
img
.eslintrc.json
.gitignore
42064745.gv
44390482.gv
44461398.gv
64429683.gv
9452822.gv
LICENSE
README.md
favicon.ico
hn.gv
hn2.gv
hn3.gv
index.html
index.js
myviz.js
myviz.min.js
package-lock.json
package.json
reddit.gv
reddit2.gv
style.css
yarn.lock

README.md

comments-as-a-graph

Read 4chan and reddit (coming soon) comments using a graph visualization.

Try news.ycombinator.com

Try reddit.com

Try 4chan.org threads

How it's made

The thread is downloaded from the 4chan api, then a python script converts it into a .gv file by parsing the comments and searching for >>POST_ID references. These references become the graph's edges and the posts become the nodes. Then the file is saved in the site root. Example

The frontend's js loads the .gv file and displays it using viz.js but the viz.js was custom compiled (via emscripten) to shrink it to 1.8MB instead of 2.4MB.

The panning and zooming is provided by svg-pan-zoom and the minimap was implemented by rendering the svg graph to a canvas.