- Change to w205 user:
su w205
- Clone code repo:
git clone https://github.com/chrisfleisch/w205-labs.git
- Move to exercise 2 dir:
cd w205-labs/exercise_2
- Switch back to root, using python 2.7.3 install requirements, then switch back to w205:
exit
cd w205-labs/exercise_2
pip install -r requirements.txt
su w205
- Create database (may take a little while to complete):
cd scripts
python create_db.py
- Create table:
python create_table.py
- Input your twitter credentials at the top of tweets.py:
cd ../
vim extweetwordcount/src/spouts/tweets.py
- Run the stream
cd extweetwordcount
sparse run
When you have enough data, hit Contol-C to stop the stream
- Move to scripts directory:
cd ../scripts
- Final results:
python finalresults.py
python finalresults.py hello
- Histogram:
python histogram.py 10,12