dimanche 24 juin 2012

Displaying information on maps

MappedTweets is a demo that uses Google AppEngine (Python SDK) to pin latest Twitter posts on a CloudMade map with server side scripting in Python. 
Two external APIs are used, one for submitting search queries to Twitter via its  Search API, another one for displaying map and geocoding CloudMade API.

The html map page reads the tweets data using a JSON format feed created by a Python script. Updates are made using HTML forms with Python scripts handling the HTTP POSTs to search for latest tweets.
The project code is open source, it can be found here at github.
Here is the demo itself. You can find here another GAE demo of displying and searching for information (herein images) on map.

3 commentaires:

  1. Hi, nice job! I was just wondering: did you experience any rate-limiting problems? I played around with the Twitter search API on Google App Engine myself and I noticed that many of my API calls were refused. Apparently GAE apps all share IP adresses, so Twitter sees calls from different App Engine apps as coming from the same user and starts blocking them. Did you run into this problem? If so, how did you avoid this?

  2. Hey, I didn't notice such problem! The only limitation I know about Twitter Search API is the size of the returned result for a given search query which is limited to 100.
    A real problem that I faced was escaping special characters which are very common in tweets. You can see in the code there is a method for escaping but it's not enough, for some queries it doesn't work and in GAE you see an error.

    1. Ah ok, thanks. Did you try using the auto-escaping of Jinja2 btw?