New repo for Ruby Twitter Streaming API tests

15 views
Skip to first unread message

M. Edward (Ed) Borasky

unread,
Jan 26, 2010, 4:54:12 PM1/26/10
to crisis...@googlegroups.com, crisis...@googlegroups.com
I just built a repo on Github for some code snippets associated with my own testing of the Ruby Streaming API stuff. It's at http://github.com/znmeb/Ruby-Streaming-Testing. About the only thing I plan to put in there is two data collectors, one for Haiti (I need to build the location boxes and code it up) and one for PDX (which I can actually test sends to) ;-) I've got to do some real-life stuff the rest of the day, so it may be tomorrow before either of those is up.

--
M. Edward (Ed) Borasky
http://borasky-research.net

"I've always regarded nature as the clothing of God." ~Alan Hovhaness

M. Edward (Ed) Borasky

unread,
Jan 27, 2010, 11:33:35 AM1/27/10
to crisis...@googlegroups.com, crisis...@googlegroups.com, swift...@googlegroups.com
Brief update:

1. The basic web client does *not* geotag tweets! I've asked for a list of clients that do on Twitter. Meanwhile, I wrote a Perl script to create geotagged tweets for testing purposes.

2. The script in question is an existence proof that it's possible to fake one's location - the latitude and longitude are just input parameters to the "update" API call. Caveat emptor, carpe canem, per diem, lorem ipsum, etc. ;-)

3. I now know how to code the "tweetstream" gem to deliver location-filtered tweets from the "filter" Streaming API endpoint. There are a whole bunch of things that need to be done to build a "working collector app" (error handling, reconnects, user interface on the bounding boxes, etc.) but I was able to send a geotagged tweet from the Perl script and receive it in the Ruby script.

I'm going to go ahead and build the bounding boxes for Haiti, just so I'll have that documented. In the mean time, the possibility of fake locations adds a step to the curation process, I think. Verification / validation of the "source" parameter in a tweet seems mandatory to me now. I suppose that can be faked too, but Twitter would suspend anyone that they / we caught doing that. It's not nice to pretend to be TweetDeck. ;-)

Maps 2.0 Project

unread,
Jan 27, 2010, 1:17:50 PM1/27/10
to crisis...@googlegroups.com
Ed,

To your first point, here's a screenshot of a geo-coded tweet sent
from Twittelattor Pro on iPhone, appearing in TweetDeck:

http://twitter.com/ewstrategic/status/8226515127

I took Twittelator Pro for a spin this morning, and tried several
combination of settings, but my tweets were not geo-coded. Inserting a
map link did work, but that's not geo-coding in a machine-munchable
sense. Will troubleshoot later.

Also, I just noticed the latest update of Tweetdeck for iPhone seems
to have per-Tweet geo-coding options. Hope to test that later today.

I'm hoping to find at least one reliable geo-enabled tweet client to
suggest to aid workers in the field.

Matt

PS Your lolcat-speak geo-tweet did appear properly geo-coded in
Twittelator Pro on iPhone. I assume that was one of the Perl generated
ones you sent?


On Wed, Jan 27, 2010 at 8:33 AM, M. Edward (Ed) Borasky

--
Maps 2.0 Project by HumaniNet
Blog: http://maps2.humaninet.org
Twitter: http://twitter.com/maps2project

Justin Houk

unread,
Jan 27, 2010, 1:29:50 PM1/27/10
to crisis...@googlegroups.com
I was one of the thick headed people that used tweetdeck for iphone when it was still pretty buggy and I can honestly say it's pretty solid now and I have been using it for weeks. The geocoding function works better than I had originally anticipated, however, the map that's included is from yahoo and i'm not sure it will help in the field if you want to use the client to see where someone else is tweeting from in Haiti.   As with teetdeck desktop the main draw is columns from twitterlists/groups and multiple accounts.

M. Edward (Ed) Borasky

unread,
Jan 27, 2010, 1:33:31 PM1/27/10
to crisis...@googlegroups.com
Yup - I sent two - the LOLCODE one was the second.

I'm guessing most of the iPhone and Android Twitter apps either already have or soon will have geotagging capabilities. That's where the social media marketing types are investing their dollars. And now the iPad.

That hardly helps Haiti, unless Apple is donating some of their record profits to the relief effort.

On Wed, Jan 27, 2010 at 10:17 AM, Maps 2.0 Project <maps2p...@gmail.com> wrote:

M. Edward (Ed) Borasky

unread,
Jan 27, 2010, 1:36:00 PM1/27/10
to crisis...@googlegroups.com
So what sort of Twitter devices are on the ground in Haiti? Androids? iPhones? Laptops?

Maps 2.0 Project

unread,
Jan 27, 2010, 1:38:19 PM1/27/10
to crisis...@googlegroups.com
I've only seen SMS and web so far, but I haven't done a comprehensive search.

Is that the kind of thing you could pull out of some of the datasets
you've been assembling?

On Wed, Jan 27, 2010 at 10:36 AM, M. Edward (Ed) Borasky

M. Edward (Ed) Borasky

unread,
Jan 27, 2010, 2:01:06 PM1/27/10
to crisis...@googlegroups.com
I can read the "source" field from geotagged tweets. Let me look at the data - I think I have 93 geotagged tweets, although some are in the Dominican Republic.

M. Edward (Ed) Borasky

unread,
Jan 27, 2010, 2:13:41 PM1/27/10
to crisis...@googlegroups.com
http://github.com/znmeb/Twitter-API-Perl-Utilities/blob/master/geotagged_tweets_from_haiti.json

The "source" field gives the client in most cases. Looks at first glance like there are some direct API calls, tweets from UberTwitter, Travel Off The Cuff, Echofon, WordPress, and Adaptive. But most of them appear to be some kind of bot giving weather updates via the API.

Maps 2.0 Project

unread,
Jan 28, 2010, 9:04:25 PM1/28/10
to crisis...@googlegroups.com
I did figure out the problem with Twittelator Pro: I hadn't turned
geotagging on in the settings for that particular account. A dumb
mistake on my part. Twittelator Pro didn't give me any error messages
or warnings at all, it just didn't add coordinates, even though I had
all the geo features turned on in the App.

TweetDeck (also on iPhone) gave me a warning that I needed to enable
geotagging on Settings page at twitter.com, and that jogged the
memory. Geotagged tweets now work from both Twittelator Pro and
TweetDeck.


I haven't looked at the API docs yet, but it made me wonder if there
was a way to get/set a user's geotagging setting via the API so they
don't have to go to the web. From what I can see, you can't turn
geotagging on for your account within a third party app so far. The
Settings page on the web version seems to be the only way to do it.

Matt

On Wed, Jan 27, 2010 at 11:13 AM, M. Edward (Ed) Borasky

Maps 2.0 Project

unread,
Jan 28, 2010, 9:08:55 PM1/28/10
to crisis...@googlegroups.com
TweetDeck for iPhone has two geo-related features I really like:

1. You can specify accuracy of coordinates in metric orders of
magnitude, i.e. best, 10m, 100m, 1 km, etc. -- good for privacy
concerns.

2. It will alert you if it thinks the accuracy of coordinates might be
outside the radius of your accuracy settings. I've only seen it once,
and need to get a screenshot for exact wording. After I submitted a
tweet, it said that while my accuracy setting was 100m, it had only
determined my current location to within 1214 meters (or something
like that) and gave me the option of waiting for more accurate
coordinates, or sending as is.

Blog post about all this coming, when I get a chance to wrangle
screenshots, etc.

I agree on the use of Yahoo maps. For now, I'm mainly looking at these
apps as geo-tweet creation tools, and later want to take a closer look
into ways to process and display them.


Matt

On Wed, Jan 27, 2010 at 10:29 AM, Justin Houk <justin...@gmail.com> wrote:

M. Edward (Ed) Borasky

unread,
Jan 28, 2010, 9:12:50 PM1/28/10
to crisis...@googlegroups.com
Good question - let me go check that after OS Bridge Town Hall ;-)
Reply all
Reply to author
Forward
0 new messages