Big Data for Babies — Using Google Home to log the activity of a newborn.

Ravi Sawhney
4 min readApr 25, 2017

--

My wife and I recently became parents. One of the things that become apparent, aside from saying farewell to uninterrupted sleep, is the need to track events between us relating to our new baby. These events could be: when the baby was last napped, length of the nap, when some medication was given, if recently fed then how much did she take etc.

Whilst I was initial dubious about the need to capture all this data it became evident that having it was better than not as we tried to establish patterns and frankly our memory welcomed some support as days and nights blurred into one. All this information proved useful during visits by a midwife and a health visitor, who were trying to establish the bigger picture of how the baby was progressing.

My wife, being more of a traditionalist than myself, was keen to capture these events in a notebook, however I saw an opportunity for a practical use- a case for my newly acquired Google Home; after all your hands are pretty busy when you have a baby so would it not be great to take notes using voice recognition, which Google has become exceptionally good at recently.

Apps on Google Home

I started by searching for an ‘app’ that would covert speech to text and record it with a time stamp. Those familiar with Amazon Alexa will know that ‘apps’ are referred to as ‘skills’. On Google Home these are called ‘services’. Home comes with some embedded services that can be activated on your mobile, such as Spotify but additional user-made services are not yet available for UK users which is frustrating a number of new British adopters including myself.

IFTTT To the Rescue

Thankfully one of the saving graces of Home right now is the excellent integration with If This Then That (IFTTT) which does work for those of us here in the UK. For those unacquainted, IFTTT is glue that hooks together fragmented IoT services that are being offered by a number of major manufacturers. This allows a user to create powerful automated actions that can span multiple devices. In this situation it can bizarrely be used to hook up Google products better than Google can itself right now.

If you look here you will find a number of applets that work with Google Assistant and thus Home (remember Home is running Google Assistant).

This was the one that seemed to offer exactly what I wanted…

After jumping through some hoops (described in the ‘how to guide’ below) we got the desired outcome. We are now able to say, for example…

OK Google
Baby had 75 millilitres of milk

And have this entered instantly into a Google Sheet that is shared between me and my wife where Column A and B record the time stamp and event, respectively.

Future Possible Enhancements

With the data available in Google Sheets there are a number of enhancements that one could make to this application using Google Apps Scripts, for example:

  • If more than 90 minutes passed between two events that had the keyword ‘medication’ in column B then automatically trigger an alert to my mobile.
  • Track numerical data , such as weight, and plot these onto a graph automatically.

Final Thought

By going through this exercise I started to realise that whilst devices such as Google Home are far from perfect right now and can present data privacy concerns, they will in my view become embedded into most of our lives in the near future, not just at home but also in the office.

Imagine having such a device integrated into every meeting room at your workplace. You can talk to it like to a member of your team as you conduct the meeting, instructing it to take minutes and action points knowing that this will be available to everyone when they return to their desk. Multiply this small efficiency gain across all the meetings you have, then subsequently by all the companies in the world having meetings every single day, and you can start to envision the incredible productivity gains this machine learning based technology can bring to society.

**How To Guide**

  1. Create and IFTTT account if you do not already have one.
  2. Link that account to your Google account. Word or warning: IFTTT will ask for significant read/write permissions from you Google Drive account. I was not comfortable with this so created a new Google account.
  3. Activate this applet.
  4. Edit the applet and choose they keywords you want to use as the trigger. You can choose up to 3 variations.

5. The applet should record the creation time along with the note, however there is, at time of writing, a bug that means this creation time is not populated into Column A in the Sheet, in fact it shows blank. After some Googling it became clear that others had similar problem. The video below how to solve and is a nice primer into the world of Google Apps Scripts.

That is it! If you found this useful leave a comment.

--

--