Halalan16.ph - Twitter statistics on the 2016 Philippine Presidential elections.
An independent study based on Laurent Luce's 2012 research.
- RabbitMQ
- Redis
- MySQL
- Python virtual env
- Register your app with Twitter
$ virtualenv pytolab-env
(pytolab-env)$ . pytolab-env/bin/activate
(pytolab-env)$ pip install -r requirements.txt
Under the pytolab-trends/trends
folder, you need to make two files.
This file contains all the names of the of the candidates in this format:
ID:First_name:Full_name:Nick_name:Group_number:Words_array
0:Zaphod:Zaphod Beeblebrox:Zaphod:0:[]
This file contains all your configuration values
[trends]
root = pytolab-trends/trends
[redis]
host = localhost
port = 6379
[rabbitmq]
host = localhost
userid = guest
password = guest
[twitter]
consumer_token = YOUR_TWITTER_APP_CONSUMER_TOKEN
consumer_secret = YOUR_TWITTER_APP_CONSUMER_SECRET
access_token_secret = YOUR_TWITTER_APP_ACCESS_TOKEN
[mysql]
host = localhost
user =
password =
db = trends
(pytolab-env)$ python tweets.py
(pytolab-env)$ python server.py