Friday, June 12, 2009

Twitter search results are more useful in a spreadsheet

I know I've overstayed my welcome in this utterly boring space of Twitter API data in a spreadsheet - but I just have to share one more... This time, it's something that might actually be useful (omg, did I just admit that all the other stuff was useless? uh huh).

Let's say, for example, you are a product manager (hey - i know one of those) and you want to know who is tweeting about your product... You do a twitter search! Cool! It's really easy to see recent tweets about your product. You can page through the results, and, in some tools even see a quick info box on the specific Tweeters listed (like location, number of followers, etc). But - let's say you want to calculate the total "reach" or, as @psychemedia called it in a recent tweet, "amplification" of the tweets which match your search?

"There's an app...err... a spreadsheet for that" !

Here's what this spreadsheet does:

- Pulls the most recent (up to) 400 tweets which match your search terms (there's limits in the twitter search API how far in time that will go back) into the spreadsheet.

- It includes: the tweet text, author, date/time

- For the most recent 50 tweets, it pulls the number of followers for the person who tweeted somethhing that matched your search terms... and it adds those up and give you a "Distribution for the most recent 50 tweets". In other words - the number of people following the people who tweeted about the thing you searched for.

- For the most recent 50 tweets, it filters those which are ReTweets (RT) and sums the followers for the authors of those tweets - giving you a distribution of RTs of that concept or tweeter (this is meant mostly for searching for a tweeter's screen name to see the distribution of RTs of that persons tweets).

This is not rocket science (I realize) - but it forms a basis to allow you to:
> get a sense for the amplification of a specific term or product name or tweeter
> focus on the tweets in a search result set which were authored by highly-followed tweeters (if you are a PR/marketing/customer-service person in particular)
> do further stuff with this data that I haven't thought of or had time to do...

Like the other twitsheets I've done - this is just meant to be a starting point for people with a purpose... so if you come up with something useful from this, let me know!

Saturday, June 6, 2009

Twitter says: Coldplay follows the unpopular, Oprah doesn't

Coldplay follows 2,624 tweeters on twitter - who, on average, are only followed by 10 people each. Oprah on the other hand only follows 14 people, who, on average, are followed by 709,350 people (as of this post on 9 June, 2009). I know - I spent the past 14 weeks counting! Nah... actually - there's a cool way to do this in - yes, you guessed it - a spreadsheet.

In tweaking the TweeterScore and other TwitSheets I've discovered that using xpath, you can quickly summarize data from an XML feed into a spreadsheet... that is, you don't have to do the adding and looping yourself.
In one command, you can summarize data across all the entries in any XML feed.
For example... the twitter XML data for "friends statuses" (the recent tweets of all the people you follow) can be grabbed with a URL like this: - and you can do that for any tweeter, to see the statuses of (and other stuff about) all the people they follow...

The actual XML data - in brief form - includes something like this (shortened massively):
    <name>Whatsher Name</name>
      <created_at>Tue Apr 07 22:52:51 +0000 2009</created_at>
      <text>brb - going to get ice cream now</text>
      <source><a href="">TweetDeck</a>

So - for the given tweeter (that you gave as the tweeter-screen-name.xml file name) it gives information for every other tweeter that person follows. A cool way to get the raw data for every person they follow. But the best part is the ability to summarize across all the entries... and XPath lets you do that.

Example: Let's say I wanted to know not just all the names of the people that Oprah follows (no idea why i picked her) - but I wanted to know the average number of people who follow the people she follows. That would tell me whether Oprah is following her fans (unpopular) or other celebs (popular, with lots of followers themselves).
I can do that in a spreadsheet in one command (almost).

I use the ImportXML() command with an XPath command string of "sum(/users/user/followers_count)" to get the total number of followers of all the people being followed by this tweeter... so for Oprah, the spreadsheet formula looks like this:
Divide that by the number of people she follows, and you have the average...
I'll leave it to you to check out this sample spreadsheet which does a whole bunch of this xml manipulation to compare 10 tweeters.