return to list of articles

Whatsapp analytics

An open source tool for graphing Whatsapp conversation analytics.

Whatsapp analytics

A friend emailed me a text file of a Whatsapp group chat so I decided to build a quick and dirty tool that graphs some data about it. The first iteration was a straight up Ruby file that used gets to accept query words. It grew up to be a young and opinionated Ruby on Rails application that has a strong relationship with Google Charts.

Lessons learned

There’s a lot of regex and for the umpteenth time, Rubular was indispensible. Also, this was a good lesson in string encoding. There were problems with the text being in ASCII so I had to force UTF-8 encryption.

Open source

This project took around 10 to 15 hours and was a blitz. I don’t care about its longevity and did it to scratch an itch, but if anyone would like to build on top of it, it is available under an MIT license on github. Proceed with caution, there is no test coverage and the code is ugly at best.

Notes

There’s no way that it will for everyone because I’ve found that depending on your OS and version of Whatsapp, the format of text file lines varies wildly. I’m sorry if it doesn’t work for you. Also this application is running on a free Heroku dyno so if it’s timing out for you it’s because there’s more than… let’s call it 10 people using it at any one time.

Link

Here’s a working verion of the Whatsapp Analytics tool.


Get notified when Pawel releases new posts, guides, or projects