A few weeks back, we had the full tech team down in DC for a one day retreat/brainstorming session. It was just before DrupalCon DC (which was a massive success). EchoDitto was having a small party at the end of the conference, and the tech team thought it might be fun to put something together for it.

      We wanted to keep it relatively simple, but get a chance to play with something none of us were terribly familiar with. I had been messing around with Processing a bit the week before, so we figured we'd make some sort of visualization. In case you aren't familiar with Processing, it's a programming environment intended for artists and hobbyists. Its designers meant for it to make programming interactive visual stuff fun and easy.

      Anyway, everyone seems to love Twitter, so we made a Twitter visualization. Also, Twitter's API documentation is lovely.

      We stole a couple hours over a couple evenings, and ended up putting something together good enough to project on a wall at the bar later that week. It submits searches to search.twitter.com based on some terms (we picked 'Drupalcon'), parses returned XML of tweets, and displays those tweets along with images of the tweeters and a static maps of those tweeter's locations with some OpenGL goodness.

      Credit where credit is due: Phil and Ben wrote a script that returns Twitter user images and static maps of their locations. I wrote the XML scraping pieces. Ethan, dealt with the visuals, no small task. They're all great.

      You can run this too, based on whatever terms you like. The code is available here. Don't expect any sort of efficiency, as we tossed it together as quickly as possible. None of us are Java gurus. The point of the project was to play around.

      If you'd like to run it, follow these instructions:

      1. Download and install Processing.
      2. Download our Processing app.
      3. Open Processing, and click on File > Open, and select our app (.pde). Let Processing create whatever folders it needs.
      4. You'll need to set up a font for our app to work. It's easy. Open Processing, and click on Tools > Create Font. Scroll down to "ChaparralPro-Regular", and click 'Ok.'
      5. You should be good to go. Click the play button. After a few seconds, you should see tweets appearing.

      It'll be searching for the words 'drupal' or 'drupalcon' or 'drupalcondc." If you'd like it to instead search for tweets within 10 miles of Ben's Chili Bowl on U St NW in DC look in the Processing editor, comment out line 47, and uncomment line 48. You can see how you might change this to search based on whatever terms or coordinates you like.

      Finally! It might error out, but don't fret. If your term is uncommon, it might not grab anything, and my lack of Java skills (school, you're failing me) might cause an ugly exception. We didn't build this to be bullet proof (or even efficient). It was purely an exercise for fun. And it was a blast.

       

      Categories:
       |