The dataset that stood out to me most was the X-Men dataset. I liked how I could tell a story with the data and make a project at the same time! You can view the dataset here. The goal of my project is to make an interactive network tool for an X-Men dataset using python.
I didn’t really like any of the network-making tools I looked at and there is a really useful python library called Networkx, so I decided to make my network graphs using python. Python made making the network incredibly easy and quick, the biggest hurdle was getting data from the .csv file. In fact, I think the person collecting this data was trying to make their data absolutely unreadable, vague, and mistake-ridden, but there were some methods I used to get around that. I used some python tricks to try and clean the dataset, but it definitely isn’t perfect. Luckily none of the errors in the dataset greatly affect the network graphs – the worst that can happen are a few funky node labels which are easily ignored by the user! I’m sure with more time I could perfect my dataset cleaning and get perfect graphs every time, but that was out of the question for this project.
After figuring out how to make a network graph of the X-Men data it was time to make that graph readable. The first node in the network is always red (this is the node that everything stems from). Every other node is light blue. If there is an edge between two nodes it means those nodes interacted with each other in the way specified in the file name. For example, in the photo below the file name is “Havok_Expresses Reluctance to fight.png”

Because there are no other nodes, there was never a time in episodes 150-199 when Havok expressed reluctance to fight! Now, let’s look at “Havok_Explicitly States “I love you” (to whom).png”

You might be telling yourself, “Cullen this isn’t a network graph… where are the nodes/edges/etc.” This is a valid question, and to be fair this specific combination of character and action is not a network graph. However, the beauty of making my network graphs in python is that it is very easy to switch out variables. So, this specific combination of “Havok” and “Expresses Reluctance to fight” or “Havok_Explicitly States “I love you” (to whom)” doesn’t produce a true network graph, but other combinations will! It is also important to note that just because these graphs aren’t a true network doesn’t mean they don’t tell a story – Havok is always ready for a fight, but at the same time struggles to find love. Looks like Havok should stick to fighting!
Let’s look at a few examples of more “interesting” networks!
The title of the photo below is “Professor X_Carrys (with which character)” As you can see, this network is a lot busier than the previous ones. This shows all the characters (level 1) Prof. X carried throughout episodes 150-199! It also shows all the characters those characters carried (level 2)! For the purposes of this project, I found that it was beneficial to not go past level 2, or the graph gets pretty messy. I still believe that these graphs tell a great story no matter the number of levels.

Looks like Nightcrawler was a frequent carrier of other characters, and both Prof. X and Nightcrawler carried Lilandra and Kitty Pryde.
As I’ve said before, the beauty of doing this project in python is the flexibility. It would be very easy to go add another level (or 2, or 3, or 4…) to this graph by changing some of the code!
There is one more type of graph I need to mention before letting you play with the tool! Some of the action variables are episode specific, A.K.A they are linked to a specific episode rather than another character. Let’s look at “Cyclops_Initiates Physical Conflict.png”. This graph will show all the episodes in which the character Cyclops initiated physical conflict in!

Cyclops initiated conflict in 5 episodes!
The examples listed above are a very small percentage of the total number of possibilities available to my program. If you don’t believe me look in this folder! I generated every possible combination of characters and interactions and put all of the non-single node networks into a folder! Scrolling through the graphs is fun, but looking for specific occurrences is even better. Want to know who kisses who? Or, would you like all the graphs related to Ms. Marvel? Search through the google drive folder for any and every combination you desire!


Maybe searching isn’t your thing? I have also shared a folder with all my code, and the dataset .csv file. If you can run python on your computer I recommend downloading the XMenStats.py file and .csv file and start playing around! Feel free to change my code in any way you find interesting.
I felt like explaining the project through pictures was the most effective way of displaying my project. Not only could I show off some fun examples, but the pictures also acted like a “how to read network graphs” tutorial, which is needed for a complex graph like this. If it was easier to embed python in a browser I would’ve liked to do that, but I think sharing the file for readers to go explore for themselves is a good compromise.
After this project, I may have to watch X-Men over the holidays and put some names to faces.