First off, I'm a programmer but my experience with true statistics ended at A-Level so I'm looking to all of you for help with a little side project I've been tinkering with.

At home I use Plex Media Center to display all of my movies. I built an export tool for this to generate a HTML file containing information on your library so that others can view it online. After I made this tool I realised I now had access to a wealth of data about films and the actors in them. And this is where you guys (and gals) hopefully come in.

I want to visualize the relationships between actors and movies somehow. Initially I just used a node graph library to map all actors who have been in more than one movie to all their movies and ended up with this: http://www.flickr.com/photos/dachande663/5574979625/ [section of a 5000x2500px image]

The problem is, with anything more than 250 movies it just turns into a mess of spaghetti that's impossible to follow. I've looked into arc diagrams but think it would just be even more confusing.

My question therefore is: how do I visualize this? Size isn't too much of an issue as I'd love to print this out on a large canvas and actually hang it up. Also, I'll eventually replace the text with images of the respective movies and actors. What I'm trying to avoid is having a million lines snaking everywhere. I've tried to find the most important movies and place them more centrally but at the moment that's more guess work than actual logic.

Are there libraries that can do a better job of this, or even a better way of displaying the data (dropping actors as nodes and adding them as edge labels)? I'm currently using Dracula graph, which provides an okay-starting point but can change as needed.

Any input will be much appreciated. Cheers.

  • 1
    $\begingroup$ For any even moderate sized graph, an edge-vertex graph visualization is simply going to tell you much more about the layout algorithm than anything about the data itself. $\endgroup$ – cardinal Apr 1 '11 at 12:45
  • $\begingroup$ @cardinal That is true for general graphs, but this is a special type: it is bipartite. That allows for some potentially effective and revealing layouts. $\endgroup$ – whuber Apr 2 '11 at 16:17
  • $\begingroup$ @whuber, I agree that it helps that this graph is bipartite. On the other hand, I haven't seen compelling graph visualizations for them even of the rather small size the OP is considering. When you bump things up to a bipartite graph from a modern data set with millions (or hundreds of millions) of vertices in each part, such methods really go out the window, I think. Though, I'm willing to be proved wrong. $\endgroup$ – cardinal Apr 2 '11 at 19:29

N.B.: This was previously a (long) comment that I've converted to an answer. Hopefully I'll be able to post an example of what I describe below within a day or two.

Why not try something like a heatmap? Have movies as rows and actors as columns. Maybe sort each of them in terms of the number of actors in the movie and number of movies each actor has been in. Then color each cell where there is a match. This is basically a visualization of the adjacency matrix. The proposed sorting should make some interesting patterns and the right use of color could make it both artistic and more informative. Maybe color by movie type or Netflix rating or proportion of male to female actors (or viewers!), etc.

  • $\begingroup$ Very interesting idea, I assume you mean something akin to en.wikipedia.org/wiki/James_Cameron#Casting? My only worry is having a 1000x2500 column grid but for a subset it could definitely work. Thanks for the suggestion! $\endgroup$ – Dachande663 Apr 1 '11 at 14:00
  • 2
    $\begingroup$ The idea is similar, though I think you could make the visualization much nicer. It looks like there the ordering is chronological, which also brings out some interesting features. $\endgroup$ – cardinal Apr 1 '11 at 14:07
  • $\begingroup$ Ordering by release year vs actor DOB could provide a nice visual timeline flow. Thanks again :) $\endgroup$ – Dachande663 Apr 1 '11 at 14:08
  • $\begingroup$ I think it would be hard to make this visualization take up more real estate than any (readable) edge-vertex graph visualization, for example. Comparatively, it would seem that a heatmap would be quite compact. $\endgroup$ – cardinal Apr 1 '11 at 14:34

checkout Gephi, this software has some very good layout algorithms to handle the spaghetti problem: http://gephi.org/features/

Especially, try the ForceAtlas layout: http://forum.gephi.org/viewtopic.php?f=26&t=926 The software let you control the parameters in real time, and you can move the nodes manually.

(disclamer: I'm part of this community)

  • $\begingroup$ I agree, this looks like a great tool. I've bookmarked it for when I get home. $\endgroup$ – Wayne May 4 '11 at 16:31

Graphviz can optimise the layout, see something similar here.

  • $\begingroup$ I've made a quick attempt with Graphviz using the example you suggested and it works perfectly apart from one little issue. It's currently very short and wide as it puts the movies on top of the actors and not spread about. Is there anyway to get Graphviz to create a more square arrangement? Cheers for the recommendation though! $\endgroup$ – Dachande663 Apr 1 '11 at 14:02
  • 1
    $\begingroup$ The graphviz tool you use makes a difference. Graphviz's sfdp or twopi might be good choices. You can also specify or override the locations of some nodes if you dive into the dot file. $\endgroup$ – Wayne May 4 '11 at 16:35

I wouldn't know how you'd go about constructing this but I liked the method using hyperbolic geometry



  • $\begingroup$ Actors on the inner ring and films on the outer perhaps? Could be an interesting mix, cheers. $\endgroup$ – Dachande663 Apr 1 '11 at 14:37
  • $\begingroup$ I think actors in the middle and films outer is more logical. I'm glad you say film and not movie :) Films could either be arranged chronologically or by gross profit/budget. Possibly actors in most films (well connected) nearer the centre but there are several ways to present different versions linking actors to directors etc. In theory you could leave the countries on the outside and represent the film industry by country but I suspect more than 2 dimensions are then needed? $\endgroup$ – osknows Apr 1 '11 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.