Twitter + OpenAmplify + Xcelsius = Awesome

28 Jul

I recently learned about OpenAmplify, a web service that uses Natural Language Processing (NLP) to extract meaning from text. I’m very familiar with NLP because I’ve worked on the Text Analysis team at SAP (previously with Inxight Software), so I was very interested to see OpenAmplify provide this capability for free and online. It’s the first such service that I’ve heard of and I wanted to try it out.

So, I put together a little demo using Twitter and Xcelsius, the product I’m currently working on. Here’s how it works:

  1. Twitter supplies the data.
  2. OpenAmplify analyzes it for semantic content.
  3. Xcelsius displays the data.

Try it out for yourself. (Note: Only single-word keywords will work right now.)

Those who are geekily-inclined can continue reading for the “how.” The rest of you can stop reading now. ;)

Getting this set up was actually really easy and quick. Both Twitter’s and OpenAmplify’s APIs are easy to use and easy to connect. Here is what an OpenAmplify API call looks like when using Twitter as the data source:

http://portaltnx.openamplify.com/AmplifyWeb/AmplifyThis?apiKey=[your API key]&sourceURL=http://search.twitter.com/search.atom?q=[keyword]

To get this into Xcelsius, you first need to create an XML map to that URL in your Excel spreadsheet. Then, you set up the XML Map connection and with a little concatenation, link the URL to a cell that inserts the keyword at the end. (Feel free to e-mail me if you have questions about how to get this working.)

That’s all there is to it. Seriously.

In terms of functionality, I think OpenAmplify is rather limited. In their “About” page, they claim that OpenAmplify “identifies the significant topics, brands, people, perspectives, emotions, actions and timescales.” While that’s probably true, it would be nice to see the data by type (e.g., who are the people? what are the perspectives? what are the emotions?). As it is, you just get a list of “topics” and “actions” with ratings for polarity (positive, negative, or neutral). It would also be nice to get the supporting evidence that shows why each topic got the rating it got as a list of all the positive statements and all the negative statements. The style analysis (“slang” and “flamboyance”) might be fun, but I have a hard time imagining real uses for it. The demographics data, on the other hand, is very useful and I’m glad the OpenAmplify team says they will focus more on this in the future.

The latest release of OpenAmplify seems to have some good improvements in it, including performance improvements and the addition of “intentions” (what are people doing or intend to to). Just note that if you want to use the latest release, you actually have to use a different base URL for your API call:

http://portaltnx.openamplify.com/AmplifyWeb_V11/

rather than

http://portaltnx.openamplify.com/AmplifyWeb/

[A note for any OpenAmplify folks who may be reading this: You might want to update your documentation to point to the latest release URL. Not everyone reads your blog.]

I did not use this latest release because I wasn’t aware of the difference in URLs, but I’ll try to upgrade to it in the future and see how it works.

Overall, I am impressed with OpenAmplify for two reasons. One, it provides a valuable service for free, and two, it uses a community model. Rather than building applications themselves, the OpenAmplify team provides the tools for other people to do it. This can be very powerful, as demonstrated by Apple’s App Store, and I hope it takes off for natural language processing as well. Twitter seems to be a popular choice for analysis at the moment, but I’m really interested to see what other applications people find for OpenAmplify and NLP. I think there is a lot of potential here.

UPDATE: This little app was blogged by OpenAmplify!

Like this post? Share it!

  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • email

Connecting Xcelsius to Google Spreadsheets

24 Apr

I recently was looking for a way to connect my Xcelsius model to a Google Spreadsheet and thought I would share the process and some of my discoveries.

Installing the add-on

The first thing you will need to do is download the Xcelsius Web 2.0 Components Add-On pack from Business Objects Labs. All the usual disclaimers apply when using a Labs prototype, most importantly:

This is a prototype only and NOT for use in production environments.

Once the you’ve downloaded the add-on, you’ll need to activate it in Xcelsius:

  1. Go to File > Manage Add-Ons…
  2. Click Install Add-On.
  3. Browse to the directory where you downloaded your add-on and select the file Web2Pack.xlx.
  4. Close the Add-On Manager.
  5. Exit and restart Xcelsius.

Now you should be all set to use the add-on.

Publishing the Google Spreadsheet

The next thing you should do is make sure your Google Spreadsheet is ready to be used by Xcelsius.

  1. Open the spreadsheet in your browser.
  2. Go to Share > Publish as a web page.
    Google Spreadsheet
  3. Click Publish now.
  4. Select the “Automatically re-publish when changes are made” check box and copy the link URL.
    Google Spreadsheet

Now we are ready to connect the spreadsheet to an Xcelsius model.

Creating a Google Spreadsheet connection

  1. In Xcelsius, go to Data > Connections
  2. Click Add > Google Spreadsheet connector.
    Xcelsius Data Manager
  3. Name your connection and set the URL to the one you copied from the Google Spreadsheet (see step 4 above).
    Xcelsius Data Manager
  4. Bind the Spreadsheet Range and the Insert In range. The easiest thing is to bind them to the same range.
    Xcelsius Data Manager
    Note: Spreadsheet Range refers to the Google Spreadsheet, while Insert In refers to the spreadsheet within Xcelsius.
  5. Under the Usage tab, select the Refresh on Load check box.
  6. Close the Data Manager.

Theoretically, you should now be able to bind the data from the Insert In range you selected to Xcelsius components.

Binding the data to an Xcelsius component

The following steps assume my sample data as input.

What I wish I could do in Xcelsius is add some placeholder text for my bound cells so that I can work with them more easily:

Xcelsius spreadsheet

Unfortunately, as soon as you add any text to the area reserved for your Google Spreadsheet data, you get an HTTP request error at runtime. So instead, you have to make do with borders and highlight colors to make it easier on yourself.

Xcelsius spreadsheet

Here is how you can use my data to create a line chart:

  1. Add a Line Chart to the canvas in Xcelsius.
  2. Bind the Chart Title to cell A1 and the Chart Subtitle to cell A7.
  3. Bind the data to the spreadsheet as follows:
    Xcelsius data binding
    Note that there are 3 series here, you just can’t see their names because they are bound to cells that will be loaded when the connection is refreshed.
  4. Format the chart and dashboard to your liking.
  5. Save and preview.

Xcelsius + Google Spreadsheet

Final notes and quirks

Overall, the add-on works quite nicely. However, there are a few quirks that I noticed.

  • As mentioned above, you can’t put placeholder text into cells where the Google Spreadsheet data will be inserted. Actually, this behaves somewhat erratically – I was able to do this in one Xcelsius model, but not in another.
  • Sometimes, when you save and re-open your file in Xcelsius, the Google Spreadsheet connection information disappears from the Data Manager. It’ll still work, but you won’t be able to easily edit the connection without setting it up again from scratch.
  • Blank cells in columns from the spreadsheet are ignored when the data is inserted into Xcelsius. Blank rows, however, are preserved.

    So, if my original data looked like this:
    Google Spreadsheet

    It will be inserted like this (note the Homer Simpson row):
    Xcelsius spreadsheet

  • If you want to publish an Xcelsius dashboard connected to Google Spreadsheets online, you’ll run into an error like this:
    Security error
    If anyone figures out how to get around this, please let me know.

So there you have it: a connection to Google Spreadsheets from Xcelsius.

The next thing I want to do is create a Google Gadget that contains my Xcelsius dashboard and insert it into my Google Spreadsheet document. It’s a little circular, but here is my use case: I keep track of bills and personal expenses in a Google Spreadsheet document. I want to create a dashboard that takes in the data from my spreadsheet and provides some interactivity so I can explore where my money is going each month and how I can change my spending to get out of debt faster. Ideally, I want this dashboard right in my bills spreadsheet so I don’t have to go to two different places for my financial needs. I think this is possible to do. I just need to figure out that “security error” issue.

Like this post? Share it!

  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • Reddit
  • StumbleUpon
  • del.icio.us
  • email