Python Sports Analytics Made Simple (Part 2)
Python Sports Analytics Made Simple (Part 1) — Creating a public sports API
Python Sports Analytics Made Simple (Part 2) — Pull any sports metric in 10 lines of Python
Welcome to this two-part series where I demonstrate how to pull thousands of sports metrics with just a few lines of Python.
In the first part, I detailed the steps I took to create a public API called sportsreference
. In this second article, I dive into the installation and usage of the API and demonstrate how easy it can be to pull various sports statistics.
Setup
Prerequisites
Prior to installing sportsreference
, the following prerequisites are required for your development environment:
- Python 2.7 or Python ≥ 3.5
- PIP ≥ 8.1.2
Recommendations
In addition to the requirements above, it is also highly recommended to use a virtualenv
for development work to avoid what is affectionately known as “dependency hell”.
Dependency hell is a colloquial term for the…