Avengers 2012/2015 Comparison

2015, Jun 04    


Marvel's lastest film, Avengers: Age of Ultron reaped a huge success over here in South Korea. I myself am a huge fan of them and went to the cinema to check it out. One thing that really surprised me was the secret existance of Hawk_Eye's family. It didn't appear officiallly, but I'd always thought Black_Widow was kinda seeing Hawk_Eye (mentioning stuff of Budapest in the first film). And it turned out that Black_Widow had a thing for Hulk! This joyful revelation inspired me to make some visualisations that would show how the main characters' relationships changed in the original Avengers and its sequal.


The data collection method was exactly the same as my previous analysis on Korean version of Game of Throne (but based on real history). I wrote down the names of characters who appeared together. To narrow down the focus, I only took the following characters into account:

  • good characters: Quick_Silver, Scarlet Witch (when they were on Ultron's side), Loki, Ultron
  • real characters: Peggy and Heimdall that appeared in hallucination

For example, the data collected through the process introduced above look like this:

  • Hawk_Eye, Black_Widow
  • Black_Widow, Captain_America, Thor, Iron_Man
  • Iron_Man, Hulk, Captain_Amercia

Then, before putting these data into a network, I transformed scenes into all unique pairs, and gave weight to them according to the number of characters of each scene. A 2-people scene must be different from a 3-people scene. For instance, in a 2-people scene, the number of pairs will be 1, thus the weight of a pair is 1. In a 3-people scene, there will be 3 unique pairs with a weight of 1/3 each. A 4-people scene would have 6 pairs with 1/6 weight each.

When the ingredient was fully ready, I created graphs out of it with Python's networkx library that did the hard works calculating centrality measures like Eigenvector Centrality. And the following charts are created and uploaded on jsfiddle using d3.js.

Character Network Graph


  1. Double click a node to check out a character's immediate neighbours.
  2. Mouse on a node to check out a character's detailed info.
  3. Click the radio buttons above the charts to see who's how powerful based on different network cetralities.

The graphs above show the relationships between good guys and girls in two Avengers films. The bigger the node is, the bigger the selected centrality measure of that character. A character with a high frequency means that he or she appeared a lot in a film. A character with a high degree centrality means that he or she is connected to a lot of other characters. For example, Thor in Avengers 2012 has a lower frequency than Captain_America, but in terms of Degree Centrality He is as big as the Captain as he's connected to 8 other characters. A character with a high betweenness centrality means that the character is placed in the middle area of the whole network. And I believe in this particular example, if that character sits in the middle of a friendly network, he or she is likely to be a leader among others. In the original film, the betweenness leader is Iron_Man, but in the sequal, it seems that Thor took the lead by awakening Vision after a mysterious dive into that black well. And finally, a character with a high eigenvector centrality indicates the level of influence of that person in the network. The more powerful neighbors you have, the more eigenvector value you'd have. And of course, the thicker a link is, the more intimate relationship it means. It's fun to see how Black_Widow's relationship has changed in two films. Click here to check out more about network centrality.

Network Centrality Bar Chart

This chart above shows how each characters' network centrality measures changed over two films. It practically shows the same information but in a different format that clearly shows the increase and decrese of measures.

Character Intimacy Network

To make the relationships of the main 6 guys more clear, I extracted each main character's network and visualised as above. And now it becomes more obvious that Black_Widow had a stronger link with Hulk than with Hawk_Eye in the Age of Ultron. As two network graphs are merged to create this visualisation, all node size is fixed.

Thank you for reading!