I've been doing some research on using R to datamine twitter, but I haven't really found an answer or a decent tutorial for my question.
I'm interested in pulling tweets from twitter with a certain hashtag, within a certain timeframe, and plotting the location of those tweets on a map in either QGIS or ArcMap.
I know that tweets can have geolocation tied to them, but how do I extract this information in the first place?
Best Answer
I found a way using purely Python to get the coordinates for tweets using a word filter. It doesn't seem like many people include location with their tweets.
This might not be what you're after either because this is live streaming data. You can test it by putting a unique filter word and then tweeting that word from your Twitter account. You will see your tweet show up in Python almost instantly. This would be pretty cool to use for some huge event.
You'll need to install Tweepy.
And get a Twitter API Key.
Then you can use this script as a template:
Check out this documentation from Twitter too, it shows what you can put in the filter.
Here's the result of putting the filter as "Halloween" for a few minutes:
And for the hell of it, here's the first 2000 tweets that mentioned Halloween!
http://i.stack.imgur.com/bwdoP.png
Happy Halloween!