You can buy the book here. You can read the book on O'Reilly OFPS now. Work the chapter code examples as you go. Don't forget to initialize your python environment. Try linux (apt-get, yum) or OS X (brew, port) packages if any of the requirements don't install in your virtualenv.
# From project root
# Setup python virtualenv
virtualenv -p `which python2.7` venv --distribute
source venv/bin/activate
pip install -r requirements.txt
Most of this chapter will involve running our Python/Flask web application.
python web/index.py
See previous - start the web app, the fix is applied to 'web/index.py'.
To calculate, run:
pig -l /tmp -x local -v -w p_reply.pig
This will create a mongodb store: 'mongodb://localhost/agile_data.related_addresses'
Run 'mongo.js', or in the mongo terminal:
mongo agile_data
db.reply_ratios.ensureIndex({from: 1, to: 1});
db.reply_ratios.findOne();