<p>Juan gave the correct answer. I'm filtering for Germany only using this:</p>

<pre><code># Bounding boxes for geolocations
# Online-Tool to create boxes (c+p as raw CSV): http://boundingbox.klokantech.com/
GEOBOX_WORLD = [-180,-90,180,90]
GEOBOX_GERMANY = [5.0770049095, 47.2982950435, 15.0403900146, 54.9039819757]

stream.filter(locations=GEOBOX_GERMANY)
</code></pre>

<p>This is a pretty crude box that includes parts of some other countries. If you want a finer grain you can combine multiple boxes to fill out the location you need.</p>

<p>It should be noted though that <strong>you limit the number of tweets quite a bit if you filter by geotags</strong>. This is from roughly 5 million Tweets from my test database (the query should return the %age of tweets that actually contain a geolocation):</p>

<pre><code>&gt; db.tweets.find({coordinates:{$ne:null}}).count() / db.tweets.count()
0.016668392651547598
</code></pre>

<p>So only 1.67% of my sample of the 1% stream include a geotag. However there's other ways of figuring out a user's location:
<a href="http://arxiv.org/ftp/arxiv/papers/1403/1403.2345.pdf">http://arxiv.org/ftp/arxiv/papers/1403/1403.2345.pdf</a></p>
How to add a location filter to tweepy module
<p>I have found the following piece of code that works pretty well for letting me view in Python Shell the standard 1% of the twitter firehose:</p>

<pre><code>import sys
import tweepy

consumer_key=""
consumer_secret=""
access_key = ""
access_secret = "" 


auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)
api = tweepy.API(auth)


class CustomStreamListener(tweepy.StreamListener):
    def on_status(self, status):
        print status.text

    def on_error(self, status_code):
        print &gt;&gt; sys.stderr, 'Encountered error with status code:', status_code
        return True # Don't kill the stream

    def on_timeout(self):
        print &gt;&gt; sys.stderr, 'Timeout...'
        return True # Don't kill the stream

sapi = tweepy.streaming.Stream(auth, CustomStreamListener())
sapi.filter(track=['manchester united'])
</code></pre>

<p>How do I add a filter to only parse tweets from a certain location? Ive seen people adding GPS to other twitter related Python code but I cant find anything specific to sapi within the Tweepy module.</p>

<p>Any ideas?</p>

<p>Thanks</p>