block by jalapic 0eba1241acdf67c62f5b87357864d662

Find geodesic distances

Full Screen

This example shows an implementation of Dijkstra’s algorithm for finding distances in a graph, implemented as a D3 plugin.

Click an individual to start Dijkstra’s algorithm with that node as the source. You can view individual names by hovering over nodes in the graph. When Dijkstra’s algorithm completes, hover over a node to see its geodesic distance from the source individual.

Data from German School network example 1900.(see Heidler et al 2014 Social Networks)

All code adapted from sdjacobs‘s excellent block: Dijkstra’s algorithm in Javascript/D3

index.html

dijkstra.js

mat.csv