Widget for visualizing a n*n matrix of similarity measures #1

Closed
moschlar opened this Issue Jul 3, 2012 · 6 comments

Projects

None yet

2 participants

Owner
moschlar commented Jul 3, 2012

In my Project SAUCE I would like to visualize similarity measures of single files of source code.

The similarity measure is the ratio obtained by a difflib.SequenceMatcher() in Python, which is a float value between 0.0 and 1.0 (where 1.0 would mean the two files are identical).
This data is available in a n*n matrix and could of course be scaled to integers, if needed.

I'll hack together the code to generate the data and post a sample matrix here, soon.

I'm not quite sure which visualization technique looks best.
First I thought of a ForceDirectedGraph, but now I think a Chord Diagram would probably be nice, too.

(I only report this as an issue, because ralphbean said in IRC that he would love making visualization wrappers. :D)

Owner
moschlar commented Jul 3, 2012

I got a controller method at /similarity_data?assignment=1 that returns the following json data:

{"matrix": [
      [1000, 1000, 666, 1000, 624, 1000, 694, 624, 601, 789, 1000, 624, 1000], 
      [1000, 1000, 673, 1000, 624, 1000, 694, 624, 601, 789, 1000, 624, 1000], 
      [666, 673, 1000, 673, 867, 673, 901, 867, 867, 910, 666, 867, 666], 
      [1000, 1000, 673, 1000, 624, 1000, 694, 624, 601, 789, 1000, 624, 1000], 
      [624, 624, 867, 624, 1000, 624, 835, 1000, 1000, 789, 624, 1000, 624], 
      [1000, 1000, 673, 1000, 624, 1000, 694, 624, 601, 789, 1000, 624, 1000], 
      [0604, 694, 901, 694, 835, 694, 1000, 835, 835, 874, 694, 835, 694], 
      [624, 624, 867, 624, 1000, 624, 835, 1000, 1000, 789, 624, 1000, 624], 
      [601, 601, 867, 601, 1000, 601, 835, 1000, 1000, 789, 601, 1000, 601], 
      [789, 789, 910, 789, 789, 789, 874, 789, 789, 1000, 789, 789, 789], 
      [1000, 1000, 666, 1000, 624, 1000, 694, 624, 601, 789, 1000, 624, 1000], 
      [624, 624, 867, 624, 1000, 624, 835, 1000, 1000, 789, 624, 1000, 624], 
      [1000, 1000, 666, 1000, 624, 1000, 694, 624, 601, 789, 1000, 624, 1000]
      ]}
Owner
moschlar commented Jul 4, 2012

Although the chord diagram does not look so good... chord

Contributor

Do you still have that code laying around? Can I get a link to it? :)

Owner
moschlar commented Jul 8, 2012

That one from the image? That's an interactive tool at: http://gabrielflor.it/water

Owner
moschlar commented Jul 9, 2012

Awesome!

Contributor

Closing this. If you need it re-opened, go for it.

@ralphbean ralphbean closed this Jul 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment