Adventures with Twitter in Groovy

Have you ever wanted to get a better sense of an event’s commentary on Twitter? For example, a subset of your following may be attending an event in your periphery but making interesting enough comments to warrant a closer look.

Well, I’ve had these thoughts on an increasing basis lately so I thought I’d dive into the Twitter stream a bit to see what I could learn.

Fortunately, I was aware of a gist to query Twitter by @pmonks, and this Groovy script became the foundation for my exploration.

Since I don’t normally program in Groovy, I had to setup Groovy on my MacBook Pro. (To be clear, I went for “get this to work” rather than “accomplish your configuration with all best practices incorporated.” I’m sure there may be better techniques where Groovy setup on MacOS is concerned, and I thank you in advance for any comment-based pointers.)

  1. Visit the Groovy website and understand basic Groovy installation instructions.
  2. Downloaded the binary release (Zip) of Groovy 1.8.6 (i.e. latest available version of the stable branch at the time of this post).
  3. Extracted Zip contents and moved (via Terminal) them under my up-to-date Java distribution:
    prompt$ sudo mv ~/downloads/groovy-1.8.6 /usr/share/java

    (I’ve seen apparent best practice guidance to create a symlink that allows you to access Groovy without referencing the version number, but I’ve skipped that here.)

  4. Edit your .profile file to point your environment to your new Groovy installation. (If you don’t have a .profile file, read and follow this.)
    prompt$ open /Applications/TextEdit.app .profile

    Add (or confirm) the following lines in your .profile file:

    JAVA_HOME=/Library/Java/Home; export JAVA_HOME
    GROOVY_HOME=/usr/share/java/groovy-1.8.6; export GROOVY_HOME
    PATH=$GROOVY_HOME/bin:$PATH; export PATH

    Save your .profile file, exit TextEdit, close all open Terminal windows, exit Terminal and open a new Terminal window to enable .profile changes to take effect.

  5. Confirm that Groovy is ready to act on your script:
    prompt$ groovy -v

    My confirmation looked as follows:
    Groovy Version: 1.8.6 JVM: 1.6.0_31 Vendor: Apple Inc. OS: Mac OS X

For this particular script, queryTwitter.groovy, you need to provide a peer twitter4j.properties file that will provide to Twitter your username and password. Once that’s ready,

prompt$ groovy queryTwitter.groovy %23interesting_event

The results are ready to be nested within a table element, if you want to produce HTML for display as-is. However, you could also modify the script to render JSON output and pursue alternative visualizations (e.g. rate of tweets over time, geolocation of individuals in the tweetstream, word clouds for the event, influencer status, etc.)–something for D3.js.

D3 (Data-Driven Documents)

Examples of D3-based visualizations

“D3.js is a small, free JavaScript library for manipulating documents based on data.” -http://mbostock.github.com/d3/

Since I’ve been trying to spread the word with colleagues about this powerful, expressive visualization technology, I thought it might be worth sharing similarly here.

The following tutorials have been helpful in ramping folks up on D3:

D3′s creator, Mike Bostock, has published a white paper on D3 (Stanford Visualization Group) and presented D3 during the most recent W3Conf (browser-based slides).

A couple of spotlights on D3 include one by Flowing Data and another by SVG Magazine.

Flowing Data also posted an application of D3, “How Americans Spend Their Day” (background context).

If this whets your appetite, visit the D3 wiki for a whole lot more goodness (documentation, additional tutorials, example visualizations, etc.).

Day community now a part of Adobe Enterprise Café

A little over a month ago, I encouraged my readers–many new from the Day Software (now Adobe) community via the Ignite conference in Berlin–to download and leverage Adobe Enterprise Café.

…the Café is hard at work to integrate the Day community as well. However, you don’t need to wait for that new version of Café; you can install Café today and when the Day community is integrated, you’ll receive that update the next time you launch the Adobe AIR application.

Hopefully you’re already receiving value from Café. If you held out for the Day community integration with Café, that day has arrived.

Presenting Adobe Enterprise Café 1.6!

Update 7/29/2011: Now that the Adobe® Digital Enterprise Platform (ADEP) has been announced, I recommend that you upgrade to Adobe Enterprise Café 1.8, which features a new ADEP community that is the combination of the previous LiveCycle and Day Communities.

Adobe® Digital Enterprise Platform community within Adobe Enterprise Café (since v1.8)

For technical insights on ADEP, please follow the ADEP category and/or ADEP tag herein. Thanks.

When content meets apps, Berlin edition

Thanks to everyone at Day Ignite Berlin 2010 who came to the technical track session that I presented this afternoon. In order to keep the conversation going, I’ve uploaded this presentation as follows:

During this presentation I recommended that you consume my “Realizing great customer experiences with LiveCycle ES3″ presentation from Adobe MAX 2010, if you’re interested in more details about the architecture and capabilities of LiveCycle ES3. You will find that presentation here.

I also asked you to consider downloading and installing Adobe Enterprise Café. Café, as we like to call it in Adobe, helps you stay in touch with the enterprise community, receive news, find information and aggregate content related to Adobe LiveCycle ES (Enterprise Suite), Acrobat, Connect, ColdFusion, the Adobe Flash Platform, and (since its v1.5 release) the Omniture community. Targeted at the general developer ecosystem, Café is the one tool you need to search across the entire community knowledge base and stay in touch with the Adobe teams. Furthermore, the Café is hard at work to integrate the Day community as well. However, you don’t need to wait for that new version of Café; you can install Café today and when the Day community is integrated, you’ll receive that update the next time you launch the Adobe AIR application.

When I presented this session with Alex Choy in Chicago, Irina Guseva of CMS Wire published her thoughts on the session: “Apps as Content, or How Day and Adobe May Fit Together.”

When content meets applications

Thanks to everyone at Day Ignite Chicago 2010 who came to the technical track session that Alex and I presented–especially those who stood the entire time in a packed room.

In order to keep the conversation going, I’ve uploaded this presentation as follows:

We’re very excited at Adobe about the opportunity to work with those at Day Software as fellow colleagues. By working together with you, we believe that great things will emerge from the unified delivery of content plus applications.

P.S. If you’re not already watching the #dayignite tweetstream, why not? ;-)

Update 10/18/2010: Irina Guseva published her thoughts on this presentation on CMS Wire: “Apps as Content, or How Day and Adobe May Fit Together.”

Update 10/22/2010: Presentations from Day Ignite Chicago 2010 are appearing here. Presentations that will also be delivered during Day Ignite Berlin 2010 won’t appear on Slideshare until after both events have concluded. (That being said, you can see a thorough write-up of David Nuescheler’s presentation here.) Event photos from Chicago are here.

Update on 10/27/2010: The message first delivered in Chicago around the unified delivery of content and applications was expanded upon in Los Angeles at Adobe MAX 2010, and that presentation is now available here.