monsdar / fantasy_nba_scripts

This is a repo to store some of my ESPN Fantasy NBA scripts to analyze data and predict outcomes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collection of scripts to analyze ESPN Fantasy NBA league data

Setup

  • Install latest master of espn-api from https://github.com/cwendt94/espn-api
  • Set environment variables:
    • ESPN_S2, SWID, LEAGUE_ID and LEAGUE_YEAR: Login details for your league
    • BOT_API_KEY and BOT_CHAT_ID: API-Key and Chat ID for the telegram bot and channel you'd like to post messages to
    • INFLUX_SERVER, INFLUX_USER, INFLUX_PASSWORD, INFLUX_DATABASE and INFLUX_SERVER: InfluxDB you'd like to store measures in
  • To get the full NBA schedule download scheduleLeagueV2.json from https://cdn.nba.com/static/json/staticData/scheduleLeagueV2.json

Influx

  • Drop measurement:
    • docker exec -it influxdb /bin/bash
    • influx delete --bucket HomeBucket --start '1970-01-01T00:00:00Z' --stop $(date +"%Y-%m-%dT%H:%M:%SZ") --predicate '_measurement="fantasy_playervalue"'

About

This is a repo to store some of my ESPN Fantasy NBA scripts to analyze data and predict outcomes


Languages

Language:Python 89.8%Language:Dockerfile 5.1%Language:Shell 5.1%