Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/klane/databall

Betting on the NBA with data
https://github.com/klane/databall

github-pages jekyll jupyter-notebook machine-learning nba python scrapy sports-analytics sports-betting

Last synced: 6 days ago
JSON representation

Betting on the NBA with data

Awesome Lists containing this project

README

        

# DataBall: Betting on the NBA with data

[![Test Status](https://github.com/klane/databall/workflows/Tests/badge.svg)](https://github.com/klane/databall/actions)
[![License](https://img.shields.io/github/license/klane/databall.svg?label=License)](LICENSE)

This project combines my interest in data science with my love of sports. I attempt to predict NBA winners against the spread using stats pulled from the [NBA stats website](http://stats.nba.com/) with [nba_api](https://github.com/swar/nba_api) and point spreads and over/under lines from [covers.com](http://covers.com) using the Python web scraping framework [Scrapy](https://scrapy.org/). All code is written in Python and I used the popular machine learning library [scikit-learn](http://scikit-learn.org/stable/) to make all predictions.

Contents:

- [covers](https://github.com/klane/databall/tree/main/databall/covers): Scrapy project to scrape point spreads and over/under lines from [covers.com](http://covers.com)
- [databall](https://github.com/klane/databall/tree/main/databall): Python module with support functions to perform tasks including collecting stats to a SQLite database, simulating seasons, and customizing plots
- [docs](https://github.com/klane/databall/tree/main/docs): Code required to build the GitHub Pages [site](https://klane.github.io/databall/) for this project
- [notebooks](https://github.com/klane/databall/tree/main/notebooks): Jupyter notebooks of all analyses
- [report](https://github.com/klane/databall/tree/main/report): LaTeX files for report and slides

Link to a test database with data from 1990 - March 2020 [test nba.db file](https://drive.google.com/file/d/10CBcCLv2N_neFL39ThykcudUVUv5xqLB/view?usp=sharing)