WordPress.com: Making charts from statistics

January 6, 2010

WordPress.com, this blog’s host, has some great statistics for blog owners like me. But sometimes you just can’t get your stats displayed how you’d like them.

For example, when I did my post on my 2009 blog statistics, I wanted a graph that showed the ‘long tail’ of the post titles. I knew from the raw numbers that some 20 or so posts generated most of the views, but I wanted to see it graphically. Unfortunately, there was no facility in the stats pages that I could find which would allow me to do this. There was no download button for the CSV files, nor any button or link that would show the page’s details in another form.

So I figured out how to do it myself! First I tried just copying the table of data from the stats page into Excel, but that didn’t work. It was a bit of a mess — everything went in as a text field:

How the raw WP stats pasted into Excel

Next I tried copying the tabular data from the WordPress web page into a text editor (I use EditPlus). That worked. Now I had the data, with some extra stuff I didn’t want:

How the WP stats pasted into EditPlus

I did a find/replace on the More stats term, replacing it with nothing and therefore deleting it. I left the tab spaces/gaps between the topic title and the figures, hoping that Excel might recognize these for new columns. Then I selected the entire page and copied it into Excel. Excel recognized the columns and voila! — I had my data:

After a little trip via EditPlus, the WP stats came out in Excel columns

Once I had the stats in nice neat columns, I was able to make a simple chart of the figures in Excel:

Simple chart of posts with more than 500 views — shows part of the ‘long tail’

(Note: Since I blogged about my stats less than a week ago, WordPress seem to have changed their statistical reporting — my Home page now gets included in the stats, whereas I didn’t see it listed at the end of 2009. And interestingly, since that end-of-year blog post, the ‘viral’ post has added another 4000 views in just a few days!]

[Links last checked January 2010]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: