Models and Statistics Weekly -11/16/17 (Thursday)

Hello /r/sportsbook

I promised a bunch of you this post – my goal here is to provide you guys with a tool to start your own models. I lost track of how many times I have come to this sub and see individuals interested in modeling but not know where to start! So this is where I come it. We are going to start this off slowly – with NBA only. If all goes well we can prepare for MLB etc.

So what am I providing? I am giving you guys 60+ NBA data points for every player in the league in the form of a google sheet (excel file). This will be updated daily for the remainder of the season. Simply make a copy of it to your local google drive or download a copy of the file and plug in your own excel functions into the sheet.

The sheets are separated (at the moment) by position. PG, SG, SF, PF, C, it was the easiest way to add the data at a consistent rate.

The data points available: 1. Games Played 2. Two Point Attempts 3. Two Point Attempts Per Game 4. Two Points Made 5. Two Points Made Per Game 6. Two Point Percentage 7. Three Point Attempts 8. Three Point Attempts Per Game 9. Three Points Made 10. Three Points Made Per Game 11. Three Point Percentage 12. Field Goal Attempts 13. Field Goal Attempts Per Game 14. Field Goals Made 15. Field Goals Made Per Game 16. Field Goal Percentage 17. Free Throw Attempts 18. Free Throw Attempts Per Game 19. Free Throws Made 20. Free Throws Made Per Game 21. Free Throw Percentage 22. Offensive Rebouts 23. Offensive Rebounds Per Game 24. Defensive Rebounds 25. Defensive Rebounds Per Game 26. Rebounds 27. Rebounds Per Game 28. Assists 29. Assists Per Game 30. Points 31. Points Per Game 32. Turn Over 33. Turn Overs Per Game 34. Steals 35. Steals Per Game 36. Blocks 37. Blocks Per Game 38. Blocks Against 39. Blocks Against Per Game 40. Fouls 41. Fouls Per Game 42. Fouls Drawn 43. Fouls Drawn Per Game 44. Personal Fouls 45. Personal Fouls Per Game 46. Personal Fouls Drawn Per Game 47. Technical Fouls 48. Technical Fouls Per Game 49. Technical Fouls Drawn 50. Technical Fouls Drawn Per Game 51. Flagrant 1 Fouls 52. Flagrant 1 Fouls Per Game 53. Flagrant 1 Fouls Drawn 54. Flagrant 1 Fouls Drawn Per Game 55. Flagrant 2 Fouls 56. Flagrant 2 Fouls Per Game 57. Flagrant 2 Fouls Drawn 58. Flagrant 2 Fouls Drawn Per Game 59. Ejections 60. Plus Minus 61. Plus Minus Per Game 62. Minutes Seconds 63. Minutes Seconds Per Game

Phew, I’m exhausted after that! You guys get all that?!

Additionally, I have two sheets for daily games, injuries, and team game logs! I thought it may be good to include the team name on all the sheets as I believe it is a good filter mechanism for excel functions.

The team game logs have all the same stats that the cumulative player stats sheets do in addition to: 1. Points Against 2. Points Against Per Game 3. Wins 4. Losses 5. Win Percentage 6. Games Back

The game log sheets are broken up by team abbreviation followed by ‘_tl’, example: ‘BOS_tl’. Some basic information on these sheets are different as well, include Home Team, Away Team, Date, Time, and Location

How did I do this? This is a python script I host on a raspberry pi that runs every day! I don’t want to get too nitty gritty into the code itself, but at a high level it pulls data from somewhere and populates these sheets for me, automatically! Automation, it truly is a beautiful thing. Let the computers do the hard work, we don’t have time for that.

As of now those are the data points I have available for PLAYERS. Additionally, I can add the following: Full Game Schedule, Game Box Scores, Team Game Logs, Game Starting Lineup, Player Game Logs, as well as overall standings in Conference, Division, Playoffs.

Inputting the box score breakdown for each game played along with starting lineup is next on my list of to-do’s. I need to hash out the best way to pull this data and update the sheet. With the holidays coming up I will do my best to get this part out there, because I know it is important data.

My ultimate plan is to make this a single executable I can actually provide for you guys that is fully modular. You want only Boston Celtics player data? You get only Boston Celtics player data. You want team logs for the Rockets? You get only the team logs for the Rockets.

Please be patient with me, I work full time and do have a personal life, it gets a little hectic around the holidays. This is new for me too, so I am open to all criticism/suggestions.

My only thing I ask of all of you – SHARE YOUR RESULTS! No one has the perfect model, but let’s hear how it is working for you! Not asking you to share your hard work but maybe some results. I want this to be something people will use, let’s MAKE MODELING GREAT AGAIN! (Did I do that right?)

Want to do this yourself? Check out these resources!

Udemy Python Course (Free) : https://www.udemy.com/pythonforbeginnersintro/ Youtube Python Intro (Derek is AWESOME!) : https://www.youtube.com/watch?v=N4mEzFDjqtA GSpread (What I use to automate the sheet updates) : https://github.com/burnash/gspread

Sheet Link: https://docs.google.com/spreadsheets/d/1BvCdGq38oKpHqwhBZTH_s4IsMxP3hth7lCHlU-xvzvw/edit?usp=sharing

Current Schedule: Scrape runs at 7:00 AM EST – I will try to update the image on the welcome page when I can – I cannot promise it will always be accurate so use your best judgement.

Feel free to ask me any questions – I am all ears! Lets eat!

/r/sportsbook Thread