Skip Links

Network World

  • Social Web 
  • Email 
  • Close

(Comma separation for multiple addresses)
Your Message:

Navigation

NetworkWorld.com > Community >
  • ‹ previous
  • 74 of 110
  • next ›

Analyzing Twitter with Excel, Part 1

Mark's rating: 5
Your rating: None

Excel is one of those programs with so much depth that there are whole areas many of us will never come to grips with. One such area is Excel's support for XML through the program's XML maps feature. XML maps are a powerful tool if you can figure out how they work so this week we're going to do exactly that. Or at least, something like that.

Let's create a problem: You've been asked by the CEO (which means you've been commanded) to find out whether people are talking about the company's new product on Twitter. The CEO wants to see daily "visibility" reports because he's hoping he'll get a sense of how effective the PR campaigns are.

So, first of all let's check out the Twitter API documentation. Twitter offers a whole galaxy of API functionality but the interface that allows us to grab the only samples the last 20 Tweets (Twitter messages), which is hardly a representative sample. In fact, to get direct access to the complete public timeline we'd have to make special arrangements with Twitter management, so let's look for a different strategy.

Twitter actually provides an API that can simplify our problem: lets you create a search and generate an RSS feed for a specific search.

So, let's say that we're the WowWee Group and what we're tracking on Twitter is mentions of the Rovio, the company's Wi-Fi controlled robot camera.

I must briefly applaud WowWee for the Rovio. This is an amazing toy, er, robotics experimentation platform with a full and rich API and a ton of slick technology. You might ‘need' one in your office. The Rovio gets a 5 out of 5!

If we go to the Twitter Search service we can try a search for "rovio" and, using the , ask for the date range from Feb. 1 to March 24 (the logic for this is that I'm writing this on March 24).

The will be, by default, a list of the last 15 items. If you change this in the advanced search dialog to, say, the maximum of 50 (which is odd as the documentation says that the maximum is actually 100) the new default will be defined by a cookie setting and this leads to a problem.

While the resultant RSS feed will list the correct number of items when we access it from our browser (the cookie will be returned defining the number of items), we need a real search URL that can run from any process without needing the cookie data. This requires we modify the search URL from:  (to:)

I replaced all of the "+" signs separating the arguments (which do not conform to URL encoding standards) with ampersands ("&" – the more usual argument separator for HTTP requests), added the results per page (rpp), and added a page argument of 1.

Before you ask, no, I have no idea why I couldn't have appended "+rpp=50" in the Twitter search URL, but there we have it – the wonders of Twitter's documentation (or rather lack of it) and the search interface.

Anyway, now we have a way of requesting an Atom formatted RSS feed and we're ready to access and analyze the data using Excel … which we'll start on next week.

Permalink

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You can use BBCode tags in the text.
  • Lines and paragraphs break automatically.
  • Allowed HTML tags:



More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Welcome, visitor. Register Log in