This weekend saw the New England Patriots face the Seattle Seahawks in the annual American sports-travaganza that is the superbowl. It was the most closely matched and exciting superbowl in years, but what does this have to do with data visualization and analytics? Sports – in particular the big American sports of baseball, basketball and football – are increasingly data driven. Real time statistics, biometrics and numbers in general play an ever increasing role in watching and coaching these games. Most of these datasets are fiercely guarded and proprietary, however there is one source of sports data that is freely accessible and full of rich insight: sports exchange data. In-play odds on superbowl XLIX provides the perfect dataset to showcase a cool use for some of the technology developed here at AquaQ Analytics.
kdb+ is a technology primarily designed for the capture, storage and analysis of financial data; typically equities, fixed incomes, foreign exchange etc.. The data produced by trading activity on sports exchanges is remarkably similar to financial data. On these exchanges users trade with each other rather than against the house. Sports exchanges operate in a very similar manner to stock exchanges such as the LSE or the NASDAQ – they match people wanting to back or lay a particular outcome i.e. buyers and sellers – and as such kdb+ combined with our TorQ framework is the ideal technology platform.
TorQ forms the basis of a production kdb+ system by implementing some core functionality and utilities on top of kdb+, allowing developers to concentrate on the application business logic. We have developed an extension to TorQ that allows us to capture and store real-time odds from a popular sports exchange for any event and market, and leverage kdb’s extensive analytical capabilities to probe this data.
So, lets have a look…
Data is always much easier to understand when displayed visually in graphs and charts than as numbers in a spreadsheet. In the graphic above we’ve made use of Mike Bostock’s d3.js which allows us to attach data to html5 elements. So what are we looking at here? Well the visualization compresses over 300,000 data points collected during the game into something much more easily digestible. It’s really 3 separate charts, displaying three different sets of data, so lets go through each in turn:
So from this market data we can really see the story of the game from a whole different perspective, and a number of things really jump out:
In many way this is the visual analogue of a match report, where instead of words we’re using colours and shapes to tell the story of the game. A picture is worth a thousand words! The features above are just a few quick observations based on this one visual, I’m sure there’s plenty more insight waiting to be discovered in such a rich dataset.
At AquaQ our experience to date is predominantly in the capital markets industry, however as you can see the TorQ framework can easily be extended across domains into other sectors. We would be happy to engage with you either implementing and customizing TorQ, or in bespoke development and support of incumbent systems.