Giter Club home page Giter Club logo

prize-pick-predictions's Introduction

ppplogo

**IMPORTANT: I AM CURRENTLY WORKING ON Prize-Pick-Predictions VERSION 2.**
A Flask application that displays current NBA player score predictions. Please take a look below.

Maintained status Release badge

3b3f8646e52a86ce072b400c358e9a22

๐Ÿ“Œ Important Information

This project was made as just a concept. Due to many project constraints, and technical barriers during the project's initial stages, I have decided not to develop this project and it has since been archived. Currently, the application only draws predictions using player averages and compares them to the betting strike prices. While this does work, it nowhere near approaches the precision and complexity of using Multiple Linear, Ridge, or even Polynomial regression predictions.

While this project is no longer in an archive, I will slowly commit and integrate appropriate machine-learning algorithms to generate more accurate predictions using the correlation between different combinations of points, rebounds, and assists with the opponent team's ELO, and potentially other variables down the way including home court advantage, fouls, injuries, etc.

๐Ÿ“‹ Todo List

  1. Calculate team seasonal elo
  2. Get teams season match history
  3. Get match IDS
  4. Get the player's stats for that exact game
  5. Make regression line & get predictions

๐Ÿ€ What is Prize Pick Predictions?

This Python project is a Flask application that provides "recommendations" for sports betting. With a focus on accuracy and data-driven insights, the app delivers relevant and timely information through multiple APIs, ensuring users can access up-to-date data and statistics. Designed to offer valuable insights and recommendations, this app caters to experienced and novice sports bettors, providing an edge in the competitive world of sports betting.

๐Ÿ›  Getting Started

Clone the Repository

  1. Open the desired directory in the command prompt

  2. Clone the repository using the command below

    git clone https://github.com/KevinTrinh1227/Prize-Pick-Predications.git

Initial set-up process

  1. Install dependencies

    pip install -r requirements.txt
  2. Install Firefox & Gecko Driver (Save it inside the driver folder)

    gecko_path = './drivers/geckodriver.exe'
  3. Create a ".env" file with your balldontlie API key (Free account will work fine)

    THE_BALL_DONT_LIEAPI_KEY=<YOUR_API_KEY>

๐Ÿš€ Host the app locally

  1. Run the app and get the HTTP link

    python main.py
  2. Open the http://127.0.0.1:5000 link on a web browser

    ~\Prize-Pick-Predications>python main.py
     * Serving Flask app 'app'
     * Debug mode: off
     * Running on http://127.0.0.1:5000

prize-pick-predictions's People

Contributors

dependabot[bot] avatar jimpallomeni avatar kevintrinh1227 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

prize-pick-predictions's Issues

Not pulling data from prizepicks

Hey, your project is wonderful, I was having this error while starting the app:
image

I went to the API link that you left on the code and proceed to manually copy and paste that info into the pre_formatted_projections.json file and then it successfully started:

image

Is this expected? I am missing something or the format changed?

Thank you for this development, I was trying to do something similar but this is awesome.

Fixing the API issue with Selinium webdriver

I've found a crude workaround the limiting of the prizepicks API. My solution uses a chromium webdriver to access the end point via a browser and scrapes the data using beautiful soup.

###########################################

requirements: download the version of selenium webdriver that matches with your google

chrome and paste it into your CWD.

link: https://chromedriver.chromium.org/downloads

###########################################

from selenium import webdriver
from bs4 import BeautifulSoup
import json

driver = webdriver.Chrome()

#Initializes a web driver and opens the page in a new chrome window
url = 'https://api.prizepicks.com/projections?league_id=7'
driver.get(url)

#Beautiful soup parsing through the page contents
content = driver.page_source
soup = BeautifulSoup(content, 'html.parser')
pre_tag = soup.find('pre') #finds the tag starting with "pre"

#Dumps the json contents into the filenamed "pre_formatted_predictions.json"
json_text = pre_tag.text
data = json.loads(json_text)
filename = "pre_formatted_predictions.json"
with open(filename, "w") as outfile:
json.dump(data, outfile, indent = 1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.