MediaTemple Hosting

FlashDen - Your Choice for Flash Components and Effects

Bowler Hat Games - Deliriously Delightful

Be a Sponsor

Explore Digg’s Keywords with WordWeb

by Josh Tynjala

The deadline for Digg’s API contest is less than a week away. Always ready for a coding challenge, I immediately knew I’d be building something when I first heard about the contest at the Digg Millionth User Party last month. My entry analyzes the keywords from the top stories on Digg, and builds a graph that shows the relationships between those words and the stories in which they appear. For example, the keyword “apple” is often related to “mac” and “ubuntu” is often related to “linux”. Keywords that appear most often will be larger and more prominent than words that appear only once or twice. Clicking on a keyword will re-focus the graph and the user can explore deeper relationships. Try it out!

Screen capture of WordWeb application for Digg's API

If you can’t tell, the application was built with Flex. Under the hood, I’ve used a modified version of Mark Shepard’s SpringGraph component. Modifications of note include some customization options for the SpringGraph’s appearance, such as line thickness, and I built in some events for mouse interactions with nodes. I’ll have to contact Mark to see if he’d like to use my changes. They certainly make the component more useful.

The keyword analysis engine is based on the one I built to chart top keywords in my MXNA Dashboard application. Basically, it accepts a list of strings, breaks them apart into individual words, and tracks the number of appearances for each word. You can also pass in a list of words to exclude. In this case, I chose to exclude many common words like “the”, “his”, “were” and others like that. I wish I remember where exactly I found it, but I discovered a great list of nearly 1000 that someone had compiled and offered for free use within this sort of program. With a few changes to stop excluding important words like “president” and “congress” (obviously, people talk about politics a lot), the list became an excellent filter.

Of course, source code is available! You’ll notice that it uses Cairngorm. I’m not necessarily following 100% best practices for this framework (no delegate classes, for instance), but I still like to use it for MVC purposes. This application is mostly quick-and-dirty, so commenting is pretty much non-existent. I don’t expect to touch the code again, so it didn’t seem too important. I figure someone will probably find it useful regardless. Enjoy!

Like what you just read? Follow @joshtynjala on Twitter.

7 Comments

Sheng

It seems that your source code is not complete. Your extension of SpringGraph is not included in your source code. Or can I ask, which version of SpringGraph are you using? The public springgraph_0.4 package does not have SpringGraphEvent, lineThickness of Roamer is your extension.

Can you provide full source code? Thanks!

Sheng

Josh Tynjala

Sheng, I have updated the source code to include the SpringGraph component with the modifications I made to it. I’ve also added licensing headers to each of my own files. Source code for this project is distributed under the terms of the MIT license.

Sheng

Thanks a lot! Josh. I learn a lot from your code.

Jaap Kooiker

Great way to visualize information… The SpringGraph component is indeed a nice component. And about your MXNA Dashboard application, that’s great to.
Keep it up :)

Vote for WordWeb in the Digg API contest! » Zeus Labs

[...] little over a week ago, I built WordWeb, a Flex application that utilizes Digg’s public API to analyze keywords and explore [...]

Ranking Konzept - SEO News » Blog Archive » Statistiken zu Digg

[...] Erkentniss, dass Linux und Apple Themen bei den Diggern beliebter sind als Sport und Finanzen ist nicht neu, aber dass die Wahrscheinlichkeit auf der Startseite zu [...]

Quick updates to WordWeb for Digg » Zeus Labs

[...] you’d like to learn more about this app, please see the original post about WordWeb. I made the source code available for viewing as well, so take a peek if you’re interested. [...]

Leave a Comment

Note: New comments may need to be approved before they appear.

Some HTML allowed in comments: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

To display code in comments: <pre>Code here. May be multiline. Format XML with &gt; and &lt; entities.</pre>