Top MK – Online card playing with MK Wards

top-mkUnderstanding city-wide data is not easy. Understanding data is not easy. Nevertheless, there are times when we use notions such as probabilities and data distributions naturally, without thinking about it. Playing card games is one of those times.

Top MK is a small online game based on the famous Top Trumps model. The nice thing about it is that it not only provides an entertaining way to interact with easy data, it also shows how incredibly easy it is to built that kind of application with the MK Data Hub.

What does it do?

Top MK is a simple game where you’re pitted against the computer.

  • Your’e both given a deck of cards put upside down.
  • Each card represents a ward (i.e. an area) of Milton Keynes and includes values for attributes of the place: population, area, qualification, health, etc. The player who has the hand chooses an attribute from their top card, which is compared with the other player.
  • Whoever has the highest win both cards and get the hand.
  • The game finishes whenever one of the players is out of cards.

While the rules are simple, playing such a game is an interesting process. The player has to learn what the data means. For example, what does “qualification: 67” mean? Is this high? Higher than average? Is the other card likely to have a smaller value?

It quickly becomes instinctive to ask these questions, as well as to memorise what the most qualified wards in Milton Keynes are.

What data does it use?

What’s interesting about Top MK as an application of the MK Data Hub is that it is very simple. It was developed purely in Javascript, HTML and CSS in just a couple of hours.

It relies entirely on the Entity API to query entities of the type ward (see Entity LookUp). By calling it gets a list of such entities, and by querying each of them (for example it obtains stats on qualifications, health, ethnicity and other aspects of the population of the ward.