It won’t come as much of a surprise to most of you that I wanted to design live data visualisations for League of Legends specifically. About six years ago, a friend introduced me to the game and I got hooked almost instantly, not only to the game but also to the vibrant community supporting it. The only challenge that I needed to overcome was finding a way to obtain the desired live data, otherwise I wouldn’t even be able to focus on this game for designing live data visualisations.
Feed me data please!
Luckily, I had some prior experience with obtaining data about League of Legends games. A while ago, I was experimenting with the API that Riot Games (the firm behind League of Legends) offers. While this API offers a lot of useful statistics, it provides mostly statistics about the end-game state. Timeline data is far more limited and only available every minute which wouldn’t really feel like live data. There’s also a replay system but unfortunately the replay data is encoded and the developers aren’t eager to share information about decoding these files.
While looking for ways to get my hands on live data, I stumbled on this page. I got my hopes back up and sent them a proposal explaining why I desperately required their help. My pitch started off an email conversation with various data specialists working at Riot Games. Sadly, the conclusion was that they would fall short of being able to share the ability to get custom logging from a fully-decoded replay. They pointed me to a blog post though in which the writer explains how to access the data provided by the esports Riot Games team during live broadcasts.
Upon further investigation, the sent data contained a lot more information than I was expecting! Not everything that is being sent over the websocket is actually used in the currently provided visualisations by the esports team that are displayed alongside the video stream. Suddenly, I got access to practically every statistic that I wanted, on an interval of a mere second. I could not have wished for anything more!
Log me some
At the time of this discovery, the annual World Championship was well underway. The group stage had already passed but luckily there were still a lot more games to come.
A simple JavaScript script did the trick to connect to the active websocket during the subsequent broadcasts and automatically save the received data in JSON format. These huge files of live game data will allow me to replay the game state from start to finish and test my upcoming live data visualisations. Stay tuned!