Skip to main content
100%

Social Network Graph

✓ Published0🌍 Public
Ssalimjivani
Last edited Apr 6, 2022
Created on Apr 6, 2022
Forked from HTML Starter

This example visualizes a small social network graph, showing six nodes representing a user and their friends, connected by weighted links that indicate relationship strength. The graph is rendered as SVG using D3.js v2’s force layout, which positions nodes through simulated physics with gravity, charge, and distance parameters. The code loads JSON data from `graphFile.json` and maps the nodes and links into the visualization. Node labels are displayed as text, and link thickness is scaled to the square root of each connection’s weight. The implementation uses `d3.layout.force`, `force.drag`, and tick event handlers to update node and link positions dynamically.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes