Skip to main content
Public

Share visualization

Loading preview…

Node-Link Diagram with Force-Directed Layout Using D3

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Node-Link Diagram with Force-Directed Layout Using D3

1
OOlha
Last edited May 24, 2022
Created on Apr 18, 2022

A node-link diagram displays the SOC-FIRM-HI-TECH network from the Network Repository, with nodes categorized into six groups distinguished by color via a scaleOrdinal. Using D3 v7, the layout comes from d3.forceSimulation with charge, center, and link forces; nodes are rendered as SVG circles with labels and tooltips, and appear draggable through d3.drag. The example also integrates the d3-legend library, though the legend itself is not shown in the code.

AI-generated description

Assignment 7 part C, B (partialy: tooltip)

Node-Link Diagram with Force-Directed Layout Using D3

Inspired by:

Used lib: https://d3-legend.susielu.com/ used documentation: https://github.com/d3/d3/blob/main/API.md

Data:

https://networkrepository.com dataset was used: http://bl.ocks.org/eggchul/4f7b66224adecb2796f685447cd12448#license

<div id="svg-wrapper"></div> <h3>Data Source: SOC-FIRM-HI-TECH</h3> <p style="font-family:'Lato';"> <code style="font-size:1.1em;"> &nbsp; @inproceedings{nr-aaai15,<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title = {The Network Data Repository with Interactive Graph Analytics and Visualization},<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; author={Ryan A. Rossi and Nesreen K. Ahmed},<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; booktitle = {AAAI},<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url={<i><a href="http://networkrepository.com" target="_blank"><b style="font-weight:bold !important;">http://networkrepository.com</b></a></i>},<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; year={2015}<BR> &nbsp; }<BR> </code> </p>

@inproceedings{

  • nr,
  • title = {The Network Data Repository with Interactive Graph Analytics and Visualization},
  • author={Ryan A. Rossi and Nesreen K. Ahmed},
  • booktitle = {AAAI},
  • url={https://networkrepository.com},
  • year={2015} }

Comments

Sign in to join the discussion.

MIT Licensed