Text message analysis, chapter 1

A couple of months ago I read Stephen Wolfram’s article about analyzing his emails and saved files.  If you’ve not seen it yet, it’s definitely worth a read.  I was intrigued and wanted to apply a few of these analysis ideas to my own life.  I don’t have 30 years of saved email (yet), but I do have a database of text messages. Last time I posted about how to get that database off of an iPhone and format it into a text file for further analysis. Now for the fun part, the analysis.

The first question I wanted to ask, is “When am I texting?”  The  second field we output from the text message database was a date field, indicating the Unix epoch time of the text message.  I used Matlab to parse this field into a vector and generate two histograms, one for when I’m sending texts and one for when I’m receiving texts.

When am I texting?

This is a graph of the number of text messages I’ve sent sense early October.  It’s clear that I’m sending and receiving about the same number of texts.  It’s also clear that I’m somewhat of a night owl.  My texting rate stays high and somewhat constant  until about 3 am, then drops to about nothing, then picks up again around 1 or 2 pm.  This is consistent with my graduate student lifestyle of work late into the night, sleep late into the afternoon.

But I’d like a little more detail about how my habits change.  Let’s add a dimension to this plot.

Each “+” is a text message.  The y-axis is the time of day on a 24-hour clock.  The x-axis is the Unix time that the message was sent.  This graph gives us the same information as the line plot above.  We can see my sleep schedule as the band of predominantly white area that runs the length of the plot.  But we can see a few more things as well.  I’ve highlighted a events that occurred since October that appear to have effected my texting rate.

The first event is a trip to Switzerland I took for work.  No phone service.  No texting. So there is a large blank vertical band in early December, around Unix time 1.33e9.  The rest of the highlighted events are weekends that I attended dance exchanges.  These tend to change my sleep schedule dramatically, and so change my texting habits during and after.

This is just a small taste of the text message analysis I have in store.  I’ll also be posting the tools I use to do this in Matlab, Octave and Python so that you can replicate this for yourself.  I first need to get the code in a more user friendly sort of form.

I’ll leave you with this finishing quote from the blog of Stephen Wolfram that I referenced at the top.

As personal analytics develops, it’s going to give us a whole new dimension to experiencing our lives. At first it all may seem quite nerdy (and certainly as I glance back at this blog post there’s a risk of that). But it won’t be long before it’s clear how incredibly useful it all is—and everyone will be doing it, and wondering how they could have ever gotten by before. And wishing they had started sooner, and hadn’t “lost” their earlier years.

That certainly resonates.  I’m a nerd yes, but hopefully this moves towards the mainstream.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>