What to do when it's raining...
And this is what you get...

This is at least vaguely sane if you know a bit about MtG - starting from the red cluster at 9 o'clock, the clusters represent:
The dark grey blob in the middle represents "everything else" and the light grey ones scattered around are decks which aren't in any cluster. Perhaps the two most notable bits are the ones stretching out at 6 o'clock representing mono-white and the ones at 2 o'clock representing mono-blue.
What conclusions can we draw from this? Perhaps the most notable one is that the decks have arranged themselves so that "enemy" colours (ones not next to each other in Magic's white-blue-red-black-green) wheel are next to each other. Again, that probably reflects today's metagame...
If anyone's really interested in the code to do this, give me a shout. The only reason I haven't put it up is that it's based on my usual collection of hacky scripts and a not very reproducible database setup...
Credits go to:
- Scrape ~200 mostly sensible (i.e. at least vaguely competitive) Magic: The Gathering decks from the web.
- Restricted to cards available in Arena, partially because that keeps the size of the feature space down and partially because that's what my database supports. They're pretty much decks playable in the Core Set 2020 and Throne of Eldraine timeframes.
- Work out the number of cards which overlap between each pair of decks.
- Use that overlap to lay the decks out in 2D space via a force-directed layout.
- The previous two steps have reduced our original ~750 dimensional space (one dimension for each unique card in the decks) to 2D.
- Cluster the decks based on their location in the 2D space.
And this is what you get...

This is at least vaguely sane if you know a bit about MtG - starting from the red cluster at 9 o'clock, the clusters represent:
- Bright red: Mono-red aggro
- Medium green: Gruul (red-green) aggro
- Bright green: Mono-green stompy
- Green-blue: Temur (red-green-blue)/Simic (green-blue)/Bant (green-blue-white) decks. What's in here reflects the current metagame: Temur is mostly elementals, Simic is flash, Bant is ramp
- Darker green-blue: the current metagame bugbear, Golos Field of the Dead.
- Blue: Mostly Esper (blue-white-black) decks, but also with some other blue based decks.
- Black: a mix of mono-black (control) decks and Orzhov (black-white), including vampires and knights.
- Dark red: Rakdos (red-black) aggro/knights decks and Boros (red-white) decks, mostly based around Feather, the Redeemed but that's probably just a metagame effect again.
The dark grey blob in the middle represents "everything else" and the light grey ones scattered around are decks which aren't in any cluster. Perhaps the two most notable bits are the ones stretching out at 6 o'clock representing mono-white and the ones at 2 o'clock representing mono-blue.
What conclusions can we draw from this? Perhaps the most notable one is that the decks have arranged themselves so that "enemy" colours (ones not next to each other in Magic's white-blue-red-black-green) wheel are next to each other. Again, that probably reflects today's metagame...
If anyone's really interested in the code to do this, give me a shout. The only reason I haven't put it up is that it's based on my usual collection of hacky scripts and a not very reproducible database setup...
Credits go to:
- networkx for the force-directed layout algorithm
- scikit-learn for the clustering algorithm (DBSCAN)
- python-mtga for the card data
- Channel Fireball, MTGGoldfish and TCGPlayer for the deck lists
- All the usual suspects (Python, NumPy, Pandas, MySQL/MariaDB)