X-Git-Url: https://projects.mako.cc/source/twitter-api-cdsw-solutions/blobdiff_plain/1e2d406ccc7bfaa9c73ab809367ce5ae2ab6fc79:/twitter-stream1.py..d4653b5f599083dc7631ff1a215096ac58b626d8:/solution-geo-2.py diff --git a/twitter-stream1.py b/solution-geo-2.py similarity index 67% rename from twitter-stream1.py rename to solution-geo-2.py index e94422d..c7830ff 100644 --- a/twitter-stream1.py +++ b/solution-geo-2.py @@ -1,3 +1,8 @@ +# What are people tweeting about in Times Square today? + +# Note: to answer this, I used this website to find a good box: +# http://boundingbox.klokantech.com/ + import encoding_fix import tweepy from twitter_authentication import CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET @@ -18,4 +23,6 @@ class StreamListener(tweepy.StreamListener): l = StreamListener() streamer = tweepy.Stream(auth=auth, listener=l) -streamer.sample() +# This should grab tweets in Times Square +streamer.filter(locations=[-73.9864799803,40.7575460197,-73.9837820197,40.7602439803]) +