Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Adjacency matrix in D3

Public visualization

Viewing a saved revision (read-only)

d689b2f2683743bf8d74cdf10ed40b19

Adjacency matrix in D3

0 stars0🌍 Public
EEunice Tu
Last edited Mar 25, 2024
Created on Mar 21, 2024
Forked from D3 Starter

This example uses D3 v7 to render an adjacency matrix for the FIRM-HI-TECH dataset from networkrepository.com. It shows the relationships between firms as a grid of lightblue cells, where each row and column represents a node. The code loads CSV data with `d3.csv`, builds a matrix using a JavaScript `Map` and `Set`, and applies `d3.scaleBand` for the axes. Hovering highlights the row and column via stroke-width changes and displays a tooltip with the matrix cell’s link. The SVG is drawn with appended `rect` elements, and the interface includes numbered axis labels.

AI-generated description