Skip to main content
100%

Gist 6f46e33cf77d3c5298d440be532e3440

✓ Published0🌍 Public
CConorAspell
Last edited Oct 10, 2020
Created on Aug 28, 2020

This example visualizes a chess subreddit’s weekly activity as a force-directed network, showing how posts and comments cluster around topics. The code uses D3’s `forceSimulation` for layout, with node positions updated via `tick` handlers. It renders the graph using SVG paths and applies color and size scales to represent post scores and comment counts. Data comes from the Reddit API, filtered by the `subreddit=chess` and `period=week` environment variables. The visualization also includes a play/pause button to freeze the simulation, and tooltips display metadata on hover. The underlying gist relies on Node.js and the `dotenv` library to load API credentials, while the frontend uses plain D3 for canvas-based interaction.

AI-generated description

Similar vizzes