Getting word count stats for my blog

For a while I’ve wanted to see how much I’m writing – not for anything in particular, just idle curiosity. Today I decided to sit down and actually plot the data. I’ve got a new chart which shows me how many words I’ve written, on a month-by-month basis:

A vertical bar chart with a series of red bars. The vertical axis measures ‘words per month’; the horizontal axis shows time.

You can see a live version at https://alexwlchan.net/stats/, which will automatically update as I write new posts. (I took the screenshot above before I started this post, so it’s already out-of-date.)

This info also tells me that I’ve written ~197k words across the entire blog, which is almost as long as Harry Potter and the Deathly Hallows. And while my blog isn’t quite as popular, it does have several things to recommend it over JK Rowling’s books:

If you’d like to get something like this for your own blog, the source code is on GitHub: