Saturday 29 December 2018

Mental health and maths

There are a million connections between social media and mental health and most I know about show a strong (albeit anecdotal) negative connection between the two. People are constantly saying they've taken a break from Twitter and feel much better for it, and I know that for me avoiding "debating" (or more accurately "screaming impotently into the void") on social media is definitely a good thing.

But what happens if we look at this backwards? Engaging with the world, as opposed to withdrawing and shutting down is supposed to be positive, right? In theory, social media is about reaching out and connecting (haha I know, but stay with me). I know that when I'm feeling happy and on top of the world I look at it with interest and very often take photographs of the things I see. Some of those photographs end up on Instagram. When I'm exhausted and my mental health is poor I shut down to preserve energy and I feel like I'm doing a lot less, such as taking fewer photographs.

So in theory I should be able to see a correlation between taking lots of photos and posting them to Instagram and times of good mental health. Good - I've needed an excuse to write some code. Cue the music.

A bit of hacking later and I've got a bit of Ruby which looks at my Dropbox Camera Uploads directory and counts the photos I've taken this year, grouping by month. And I've got another bit of code which looks at my Instagram feed and does the same, but using a deprecated API because I'm not a business and apparently that means I'm out of luck in their new world.

And lo:
The very obvious peak in October is at a time when I had a week off, had just had some very good news and actually Did Things outside of work (walked the Two Tunnels walk in Bath and went to a display of Japanese art in Bristol). Coincidentally I also wrote a post about having a peaceful time off. So it was a good month - or at least a good week in a month.

At the other end of fun, the two obvious troughs are in July and November. This matches my memory of the year - times when I had to drag myself out of a major slump. This was especially true in November, when I had far too much to do both in and out of work. In work a long series of things went wrong and I was on the back foot the entire time - which resulted in me writing a post about reactive vs proactive work. Outside of work I basically stopped doing anything as I worked late and spent the evenings recovering. I felt my engagement with the world around me suffered and this is born out in the numbers.

Otherwise it's pretty stable through the year other than an upwards tick in August (another holiday), so what happens if we add a trend line?
An increase in photos taken over the course of the year, but interestingly a decrease in photos posted to Instagram. So I'm snapping more, but gradually getting less interested in the world around me? That's quite possible. I mean, have you seen the world?

Last year I had an interesting time and I started this year writing about recovering from an actual crash. So what happens if we overlay 2017 Instagram engagement with 2018 engagement?

*hack hack*

This happens:
I was at my lowest in November and early December 2017, which correlates nicely with ... the highest engagement of the year. Hmm - that messes with my theory. December I can easily explain - I was away from work for most of that month, actively recovering, and spent Christmas with my parents walking miles and taking photos of their village. November is a mystery. Looking back, it seems in November I went for a few long walks around London and posted multiple pictures from each which brought the count up. Confusing. Moving on to trends.
Rate of posting to Instagram increased over 2017, which is mostly expected with the exceptions above. The decline in 2018 still worries me, as does the change in style of my pictures over the last 24 months. I used to put more thought into use of abstract space and filters, giving more texture to the posts. More recent photos are pictures with limited work on them - pictures of things rather than more artistic expressions, if you'll forgive the phrasing. It's not all bad - the technical quality of my pictures has definitely improved - however it plays to the narrative of less engagement from me in the output.

So what have I learned? This kinda works. It's certainly not good enough to create an early-warning system to tell me to Take Steps if my frequency of posting drops below a certain level. But there are some interesting patterns and going through this has got me thinking about changes I can make in life which will hopefully make a positive impact. I have strong, positive memories of the various Things I've done, and those Things tend to generate photographs. So if, loosely, I can do more Things I should improve my general outlook on life. I hope? I spend a lot of time in London, so finding something interesting and photo-worthy to do once a month shouldn't be the hardest thing in the world. Now I need an arbitrary point in the year at which to make fresh-start promises to myself. Some kind of Resolution for a New Year, perhaps?

If you're interested in details, the code is all on Github and  I used Google Sheets for the spreadsheet to generate the graphs. I am not a doctor and I'm well aware this is not Science.

2 comments:

Phil Wilson said...

What about counts of posts in non-work slacks? They are normally a symmetric engagement rather than the asymmetric of "post a photo". Alternatively, could you look at frequency of "likes" or comments on other people's photos?

Tom said...

More sophisticated interrogation of the Instagram API is hard at the moment because they are migrating APIs. Certainly everything you've put there was possible at some point, so I assume will be again in time.

The Slack thing is very interesting. There's probably something there about the ratio of public channels vs DMs over time too. I wonder what the API is like for it and if it has the same restrictions as integrations...