Hack The Marine: Wearable tech meets Defra open data

26 January, 2016 · 3 minutes to read · written by Rob Gregory

Wearables entered the consumer-tech market about 2 years ago and we've been keeping a close eye on their development ever since, especially smartwatch devices. It was however the physical act of building an app for one that really opened my eyes to the possibilities and limitations of wearable tech in 2016.

I can see the many benefits of a health wearable such as a Fitbit or Jawbone Up but smartwatches for the sake of it just didn't do it for me. My opinion changed recently when we attended a hackathon and built a wearable app.

CoastWatch - proof of concept wearable app (video)

Built in just over 5 hours at a recent hackathon CoastWatch is a proof of concept rather than a fully fledged product. Take a look at the app in this video walkthrough.

Being big fans of the great outdoors our team at the hackathon wanted to use tech to explore how the experience of the Uk coastline could be augmented by using Open data in a different way. CoastWatch gives users live updates about the surrounding environment based on their current location - that's what I want my wearable to do - and we proved it can be done!

The hackathon

Run by Open Data Sheffield #HackTheMarine set out to explore how the latest releases of Defra Open Data could be put to good use. After pitching a number of really neat ideas the 30 or so hackers in the room chose their team and work began.

The hack was split into three 90 minute sprints with a review and re-focus session at the start of each. So with under 5 hours of hack-time at our disposal our plan to build a wearable app from scratch was pretty ambitious. That said we had a great team and a neat idea so we were up for the challenge!

First up we set about quickly finding a data source and understanding the data it provided:

Next up using a mix of tools and technologies we set about hacking our app:

  • Android Studio
  • ASP.NET MVC
  • Microsoft Azure
  • OpenStreetMap

We used a Sony Smartwatch 3 and a Samsung Galaxy S5 mini as the development and test devices. By the end of the day we had built an Android Wear app that consumed Open data from the Defra bathing water quality api returning nearest beaches, and a water quality rating, based on the users current location.

App features - what's on your wrist?

A simple gesture interface allows the user to open the app and select from one of 4 options (we only had time to implement the first of them in the 1 day hack).

  • Nearest beaches + bathing water quality
  • Nearest public toilets
  • Surfing data
  • Nearest pubs and cafe's

One of the most interesting challenges for wearable developers is ensuring the user experience is optimised for the specific device type. Screen real-estate is limited and gesture-based interaction require a different approach when it comes to building a smartwatch UI.

Coast app uses a series of activities allowing the user to swipe for further information. By design we kept the UI minimal. Nearest beaches are presented in an ordered list with the nearest at the top (based on current GPS location). A simple traffic light indicator describes to the user of the water quality at each beach.

If the user wants more information tapping on a beach in the list triggers the phone app where they can view a detailed map. Realtime device interaction allows the user to use the wearable and smartphone in conjunction - choosing which form factor works best for them at any given time.

Smartphone integration - what's in your pocket?

The Android app on the smartphone does a couple of jobs. Firstly it acts as the intermediary between the watch and the web services - yes although your wearable has wifi built-in it can't access the web directly. Secondly, it provides the user with an interactive map view of the beach locations.

The realtime nature of the integration means that as the user interacts with the watch app the phone app automatically updates. For example tapping a beach name on the watch will re-center the map showing the selected beach.

In keeping with the Open data theme maps in the phone app are implemented using OpenStreetMap.

The tech - how it hangs together

The diagram below shows the different elements of the app and backend services. There was some conversion to do between lon / lat and eastings / northings and we added an extra backend web service layer into the stack to allow for caching.

The future

With new Open Data datasets being released daily we are looking at adding features. We see one natural progression for this being into the personal safety area - tide times and flood risk alerts on your wrist are all possible by extending CoastWatch using even more Open data.

Credits

  • #HackTheMarine event was run by Jag Goraya and his team at Better With Data.
  • Android wear App built by Magnifica in Sheffield.
  • Mapping support by Simon Redding (System Makers).
  • Data research by Matthew Love (Principal Lecturer in Data Warehousing / Big Data / Data Analytics at Sheffield Hallam University at Sheffield Hallam University).