Statistical analysis of Vegas spreads in sports
Spreads uses Python version 3 to download the data
set and Stata version 10 or greater for
analysis. Required Python packages are listed in requirements.txt.
Download the project from GitHub. Then install the Python requirements with Pip:
$ pip install -r requirements.txtFirst, download the data set with spreads.py. For its usage instructions, run
$ python3 spreads.py --helpspreads.py writes the data to standard out, so you may want to redirect its
output. For example, if you want to save the data in a file called
spreads.csv, run
$ python3 spreads.py > spreads.csvOnce you have downloaded the data to, say, spreads.csv, import it to Stata using the Stata ADO program spreads_read.ado:
. spreads_read spreads.csv, clearThe Python code comes with automated unit tests. Run them, like usual, with:
$ python3 -m unittest discover