A few weeks ago we had a workshop about datavisualisation. Our group decided to use data from twitter so I had to write some little processing apps to make everything work. Here is what I learned.
First that site is the best site to get you started, mainly on how to get you Oauth codes. The sketch they wrote run quite well on Processing 2.0b8. The only thing is that installing twitter4J really is a pain. My advice would be to drag and drop directly the files you need into your sketch. It will create a code folder inside so then everything runs great!
You will find on Codasign a very good resource for searching and writing tweets from processing. But I was missing two things: how to use the stream API and how to display geolocated tweets on a map.
Basically, to make a streaming search, you need to create a twitterstream object, connect it to twitter, add a listener object and initialize it according to the keywords you want to search. Here is an exemple which takes two keywords and display tweets containing them in real time. Basically a googlefight on twitter!
So now how about displaying geolocation. Getting the data is just a matter of testing wether or not the .getGeoLocation() is null and saving the data. Displaying it is a little more tricky. I found a part of code which helped me, unfortunately the processing website seems to be down and I can't find who wrote it. Anyway, I didn't! Basically it transforms angular coordinates into euclidian coordinates and displays points on a map. The trouble is to find a perfect map, because there are a lot of different way of drawing our planet! In the exemple, I found one that kind of worked and made some adjustement.