Visualization Challenges
Recently, one of our APIs suffered a service outage. Several customers were very upset, and requested that the next time an outage occurs, that they are notified right away.
Given the sheer number of services you offer, and the number of customers you have, you have decided to create a visualization that displays both the customers dependent on a given service and weighs how dependent they are on that service. That way, given another crisis, you are able to contact everyone using the service starting with those that depend on it most heavily first.
A chord diagram/dependency wheel uses connection strength between entities to draw related entities closer in a visualization. To generate a chord diagram among services you offer, you request a report from your product managers. Unfortunately, the data isn't in the right shape for the chord diagram.
Example chord diagram
This challenge invites you to reshape the data exported so it can be rendered as a chord diagram. Once you have that diagram you'll know which customers depend on your services the most.
Good luck!
The chord diagram that you've chosen requires data encoded as a matrix. Imagine groups along the top and bottom of the matrix, and the strength of their relationships at the intersections.
A B C D
A 0 0 1 1
B 0 0 0 1
C 1 0 0 0
D 1 1 0 0
Our program will accept a list of smaller lists, where each smaller list is a row of the matrix:
[
[0,0,1,1],
[0,0,0,1],
[1,0,0,0],
[1,1,0,0],
...
]
There seems to be an error with your solution
Hover over a ring to identify its dependencies