Exploring Magic the Gathering (and Gathering) Data
April 12, 2018 - All
For this project, I looked at card data from Magic the Gathering by using the “all sets” MTG JSON file found at mtgjson.com. This file sorts all cards data by the set they were released in. I was interested in measuring two aspects of the card data: word frequency in flavor text, and “power creep,” or the power/ mana cost ratio in cards over time. Unlike like the text on a card that explains how it can be played, the italicized text that is sometimes included at the bottom of a card has the sole purpose of contributing to the lore of the game. In measuring this, I was hoping to look at the tone card creators were setting. For this project, I looped through the flavor text of ten sets. After removing punctuation using regular expressions and writing a json file, I was able to create word clouds for each set using Tableau. Creatures are a subcategory of spell card that cost a certain amount of “mana” to attack with the card’s “power.” There is a suspicion that over time the general mana cost for cards with power has decreased, referred to as “power creep.” While there are different types of mana, and the cost can be a combination of specific types, the mtg json file has a cmc field, or calculated mana cost, that counts the number of mana cards needed regardless of specified types. I calculated a ratio by converting the data type of both the cmc and power values into floats, and wrote a new json file to also include the set name and release date. This gave me a file I could also use in tableau to visualize the power/ mana cost ratio over time. Average Mana Cost/ Power Ratio By Year Innistrad Word Cloud Apocalypse Word Cloud Khans of Tarkir Word Cloud Return to Ravnica Word Cloud Shards of Alara Word Cloud Zendikar Word Cloud Cold Snap Word Cloud Dragons of Tarkir Word Cloud Ice Age Word Cloud Fallen Empire Word Cloud.