Data Science 9/8/2014

131/80, huh? winning some awards here... the code is necessarily complex, I'll grant that. Still, find a way to factor this a little better.