This is a basketball stat that I've come up with to show the expected score of a game based on the shooting percentages from certain distances of each shot for the player shooting.
Basic calculation:
- singleShotExpectedScore = playerShootingPercentageFromDistanceOfShot * ShotPointValue
- gameExpectedScore = sum of all singleShotExpectedScore for a team
Argv order:
- node
- String, file to run
- String, shootingNumbers file name
- Boolean, true to use a gameStats file that already exists, false to create a new one
- String, filename of gameStats file to use or gameId to fetch
Example - using a gameId input from the command line
- node index.js jazzShootingNumbers2020-2021 false {{gameId}}
Example - using a preloaded gameStats file
- node index.js jazzShootingNumbers2020-2021 true 2021-11-11-jazz-pacers