Follow @znbeta To Sign up for Social Media Analytics Research Toolkit Private Beta!
I am releasing the Perl script I run to collect Twitter data after an event, GeoTweetHistory.pl, as an open source project, under the Artistic License. This is the same license that Perl uses. I’ve been using this script or variations of it since before the Haiti earthquake, so it’s pretty well tested.
The master repository is on Github at http://github.com/znmeb/GeoTweetHistory. As far as I know, GeoTweetHistory.pl will run on any modern version of Perl, but I’ve only tested it on Perl 5.10 on openSUSE Linux 11.2, and with ActiveState ActivePerl on Windows. If you have any trouble running it, please feel free to send me a tweet @znmeb.
How does it work? When an event happens, people tweet about it. These tweets go into Twitter Search, and unless Twitter has blocked the person tweeting, the tweets get indexed. Events almost always have a location associated with them. In the case of an earthquake, the USGS gives the coordinates and time of the earthquake on their web site as soon as they have this information. The web site is http://earthquake.usgs.gov/earthquakes/recenteqsww/.
So all you have to do is go to the USGS site, find the earthquake details, and get the location of the earthquake. Once you have the location details, you simply run GeoTweetHistory.pl. The script accesses Twitter Search back in time and delivers all tweets within the specified circle. You get the results in a comma-separated-value (CSV) file, which you can then open in a spreadsheet. There are more details on running the script at http://github.com/znmeb/GeoTweetHistory/blob/master/README.
Again, please feel free to send me a tweet if you need help getting this running. And special thanks to Marc Mims (@semifor), who has developed the Net::Twitter Perl module that interfaces with the Twitter API!


RT @DZone “Collecting Twitter Data After An Event GeoTweetHistory.pl” http://borasky-research.net/2010/03/03/c...
RT @znmeb: RT @DZone “Collecting Twitter Data After An Event β GeoTweetHistory.pl” http://borasky-research.net/2010/03/03/c...
RT @DZone “Collecting Twitter Data After An Event GeoTweetHistory.pl” http://borasky-research.net/2010/03/03/c...
RT @znmeb: RT @DZone “Collecting Twitter Data After An Event GeoTweetHistory.pl” http://borasky-research.net/2010/03/03/c...
RT @znmeb: RT @DZone “Collecting Twitter Data After An Event GeoTweetHistory.pl” http://borasky-research.net/2010/03/03/c...
Collecting Twitter Data After An Event GeoTweetHistory.pl | Borasky Research Journal http://borasky-research.net/2010/03/03/c...
RT @znmeb: Collecting Twitter Data After An Event GeoTweetHistory.pl | Borasky Research Journal http://borasky-research.net/2010/03/03/c...