Skip to content

smmaurer/twitter-streaming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitter-streaming

This is some code to automate the process of streaming geolocated tweets to disk, for research purposes. It's built on top of Jonas Geduldig's TwitterAPI python wrapper.

The Stream() class in stream_automator.py initializes a streaming connection that filters for public tweets within a geographic bounding box. It saves the tweets to a json file, and attempts to handle a variety of common errors including dropped connections.

How to get started:

  • Install the TwitterAPI python package
  • Clone this repository to your machine (or fork it, etc)
  • Register to obtain Twitter API credentials
  • Using keys-example.py as a template, make a new file called keys.py and paste your credentials into it
  • If you've forked this repo, don't post your keys to GitHub! The .gitignore file should catch it, but double check before pushing any commits
  • Try running westcoast_stream.py as a demo, and take a look at the code in stream_automator.py to see what it's doing and what some of the options are

About

Code to automate streaming place-tagged tweets to disk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages