Extracting Tweet geographic coordinates with tweepy
In this step, you'll create a Python script that uses the Python tweepy
module to extract tweets containing geographic coordinates and write this information to a local feature class. The tweepy
module is designed to provide access to all the Twitter REST API methods. This will be a standalone script that can be run from the command line or the Python development environment. It will create a listener style environment that will continue to be executed, looking for live tweets until you kill the process.
Follow these steps to create the script:
Before completing this section of the chapter, you will need to download and install the
tweepy
Python module usingpip
. Issue the following command from Command Prompt. The instruction to installpip
can be found in previous chapter:pip install tweepy
Tweepy
supports the OAuth authentication required to connect with Twitter. The first step is to register your client application with Twitter. In...