Skip to main content
100%

D3 Matrix Example

✓ Published0🌍 Public
CConorAspell
Last edited Dec 30, 2017
Created on Dec 19, 2017

This example visualizes the 2017 international rugby season as a directed force-directed graph. The network shows the 10 tier-1 nations as labeled circles, with node size reflecting in-degree centrality (larger nodes indicate better results, as the values are reversed for intuitive interpretation). Arrowed links represent match outcomes, with link width and opacity encoding the margin of victory—thicker, more opaque edges indicate larger winning margins. Node colors are assigned via a categorical scale, and the graph layout is computed using D3's physics simulation to position the nodes. The data was preprocessed with NetworkX to calculate centrality measures, providing a compact view of relational performance across the season.

AI-generated description

A force directed graph uses a physics simulation to lay out a network. It has a huge amount of uses in many different fields, with this Block I decided to explore it's potential in analysing a sporting teams season.

I selected Rugby Union as the sport to analyse as it has an assymmetric season, i.e. everyone will not play everyone.

I created a CSV of all the results of the 2017 international rugby season between tier 1 nations and created a directed graph using NetworkX for Python from the data and produced the JSON for this visualisation. Using NetworkX I also calculated each node's centrality which affects the node's size in the above visualisation

The centrality measure was in-degree centrality, this measures how well connected the incoming edges are connected to the rest of the network. A high value would indicate that the teams who beat you, were beaten by a lot of others, as well as that you were beaten by a lot. England and New Zealand both had values of 0.11 recurring while Ireland had 0.22 recurring and Scotland had 0.33, indicating that these teams had good seasons. Note, in the visualisation the values are reversed as it is more intuitive that larger nodes had better seasons. The degree centrality does not account for weight either, meaning the margin of victory does not affect the centrality or node size.

One of the more interesting countries to observe in this visualisation is South Africa. It is almost universally acknowledged that they had a terrible season in 2017, however, the in-degree centrality measure has them performing at the same level as Australia and France and better than Wales, Argentina and Italy. This is due to their big victories against France, Argentina and Italy, as well as a victory against Wales and 2 draws against Australia, offsetting losses to Ireland, England and New Zealand.

Wales is also interesting to observe as they had a very mixed season while playing every team except Argentina. They had 3 wins to 5 losses putting them below the top teams but all the games were close.

mit Licensed

Similar vizzes