Once upon a time I met somebody. We texted all. damn. day. It was great. Apart from the impending flexibility limits in my thumbs, life was looking up.
I was like "cool", I'll probably be married soon, I should call my mom.
The Beginning of the End
Alas, I was wrong. Completely and utterly. Things started to slowly fizzle out and to this day i'm not really sure why, but I should've seen it coming.
Anyways, this story not really about this person, its about how my computer told me they just were not that into me. The data was all there, it just needed to be explored.
Below I'll share how I built a somewhat general purpose tool1 to analyze iPhone text messages and what I learned.
The Actual End
It was raining super heavy outside... yet my phone was dry asf. Weird I thought. I usually get some texts coming in around this time. I think.
I'm racking my brain trying to remember if we had talked yesterday around this time.
I can't recall.
What about this day last week?
I'm coming up empty.
I couldn't remember for the life of me if we had talked more or less in this last week than usual. Was our nascent relationship fizzling out or heating up?
My intuition was telling me the former, but I wanted to see it for myself with some quantitative backing.
After a few minutes of thinking I knew precisely how I'd be spending the next few evenings of my life.
First thing I did was open up the iMessages app on my computer and start copying and pasting the conversation into a text file.
A Fucking Terrible Idea™. A few minutes in and I realize I'll be doing this for at least 9 and a half hours before I get the whole conversation transferred into a readable file; there are thousands of texts.
There had to be a more efficient way to do this. I hoped (for both my curiosity and my rapidly deteriorating sense of normalcy) that I wasn't the only person in the world who had ever wanted to dump all of their text messages into
After some google searching and stackoverflow investigations, things weren't looking too hot. I headed over to Github, a site where people share the code for their projects, and eventually stumble across this gem.
Somebody with equally questionable intentions had built a tool for Macs that finds the
chat.db file. The file contains all of your conversations; provided that your iPhone is synced with your Mac. I was in luck, as a budding Apple Fanboy, my texts were definitely in that file. I run the program and after a few minutes of bash script magic - it finished!
Coooool, I had the text messages... At this point I'm already feeling like I just hacked into the Pentagon's highest security server. Side note: I have an astoundingly low bar for feeling like I'm doing very advanced things on my computer. Black screen + white text and I swear I'm literally inside of the matrix.
> me, inside the matrix. <code>h4x0r</code>
As I'm was writing this, I realize that going through all the gory details about the implementation will probably take too long. I've written up a more in depth article as a separate blog post that focuses on the technical aspects. If I do it here I'll get super carried away, so I'll just skip to the fun part.
Quantifying an Almost-Sorta-Kinda-Mostly-Not-Relationship
First things first, a quick look at some stats over the length of the text conversation, from the first text sent........to the last. sigh
|Number of Texts* Sent||2076||1929|
|Median Wait Time (sec)||76.0||64.0|
|Double Text Rate||4.1%||5.2%|
Overall, things don't look too bad in my opinion. We're pretty much even in most things if you ignore the
Link Rate metric; I read and share tons of articles in general, so no surprises there.
The emojis look like we're laughing a lot and I'm eliciting many eye rolls as a result of being annoying. Again, no surprises there.
Number of Texts Sent has an asterisk because the program has a special decision making process for determining what a "text" really is. If you're curious on the details check out the technical write up!
The real kicker comes when you look at data over time.
... big sigh
Trends over time
I decided to break the texts into three periods of about 15 days each. Viewing the graph below, which indicates how many texts were shared between two participants, its pretty clear what the phases were. Looking back, I realize that had I just paused for some computer-aided reflection, I could have seen, quantitatively, that our days were numbered.
First Phase: frenetic high volume texting, life is good, no worries
Second Phase: sustained and steady, healthy conversation
Third Phase: "im good luv, enjoy"
I've plotted each metric contained above over the three phases to see how these numbers trended over time.
Last Phase Takeaways:
wait time: Super high delays between messages on both sides.
link rate: Lmao, 0.0 percent in the last phase. I for one, still had lots to share!
emoji rate: We trended in complete opposite directions in our emoji usage.
texts sent: Clearly the number of texts sent in the last phase was way lower than any other period of time.
average length: Along with there being less texts, each text was getting shorter over time.
- I'm washed.
- I probably didn't need a computer to tell me this.
- I'm a chronic over-sharer.
- May have enjoyed writing the code more than talking to humans... ?
There was some analysis on segmenting texts by day of the week and hour of the day that didn't provide a ton of insight but was still fun to do and provided cool visualization options. I'm including some extra plots just for fun, but I honestly don't have much to say about them. As you can imagine there's a lot of stuff not included in this article because of space and time, but there are tons of ways to slice and dice this data, here are a couple.
As always thanks for reading, and please share your thoughts! Think I'm a weirdo? Coolest project you've ever seen? Ban me from using computers till my 40th birthday? Want to conduct your own post mortem relationship analysis? Suggestions for different metrics?
1 Being the shitty developer that I am, the tool only works through a command line interface (CLI). One day I'll build a UI and make the program run continuously. Just not today.. and probably not tomorrow.