Skip to content

Learn to build a NBA Fantasy Projection Model in Python with Pandas

Notifications You must be signed in to change notification settings

Jman4190/nba-stats-model

Repository files navigation

NBA Stats Projection Model

KNN inspired NBA Stats Fantasy Projection Model in Python with Pandas

Getting Started

These instructions will get you a copy of the model up and running on your local machine for development and testing purposes. This is for MacOS.

Prerequisites

Recommend using Homebrew to install python and pyenv. Need to install xcode first then install homebrew.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installation

A step by step guide to get your venv running

Install pyenv using homebrew on macOS

brew install pyenv

Install python using pyenv

pyenv install 3.6.8

Install at the global level

pyenv global 3.6.6
pyenv shell 3.6.6

Create a virtual environment

python -m venv venv

Activate the virtual environment

source venv/bin/activate

Install packages

pip install -r requirements.txt

CSV Files

Data pulled from NBA stats and saved down into CSV files to be imported into dataframes. Filenames may be updated over time.

Acknowledgments

  • While data was previously pulled down via NBA API, I came across an NBA chrome extension that made it super easy to get NBA stats in CSV form. NBA Data Retriever
  • Projection Model was heavily inspired by the FATS Model from NBA Math

Notes

I am in the process of turning this into a Udemy class focused on pandas basics but also walking through how to build the model step by step. Any feedback I can get would be extremely helpful!

About

Learn to build a NBA Fantasy Projection Model in Python with Pandas

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published