Introducing 'cric-stat'
24 Oct 2014'cric-stat' is a web-application that allows cricket teams to explore their statistics. The idea came from playing and chatting with the players on my current team, who self-admittedly "Love a good stat". Here are some examples of questions that I have been asked, ranging from the computationally simple to the absurd:
- Who scored the most runs for the 1st XI in 1994?
- Who has scored the most ducks in the history of the club?
- Is the partnership we had today the highest ever on tour by roommates?
The only requirement of the clubs is that they upload the scorecard for each game at some point after the event. For the average cricket club this might be three or four times a week. Below is a demo of the application with three scorecards uploaded. In the demo you can see:
- Scorecards of the matches
- Personal profiles of the players
- Ranked lists of particular stats
'Technical Stuff'
The application stores the data in an SQL database, whose structure allows the Play application to put the scorecard back together simply, but also to efficiently answer questions like those above. I won't be storing who roomed together on tour in the near future, though, so don't get too excited!
'cric-stat' presents a RESTful interface used by a web front-end to display the data. The back-end is written in the Play framework in Scala, the front-end is Bootstrap and jQuery. I tried to achieve as much decoupling as possible, avoiding the Play template engine. This is so that a mobile version could be developed without having to re-wire the backend in the process. This has not been done yet, but may come along in future if the demand is there!
'cric-stat' is not yet completed, but is a good example of a practical application in the Play framework. With further development it can turn into a production-ready system to support many local cricket teams, or even whole leagues! If you think you will find it useful for your team or league, or you are interested in contributing please feel free to get in touch - I'd love to hear from you!