@sahirb/nba-stats
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -204,3 +204,3 @@ const fs = require('fs'); | ||
.filter(summary => { | ||
return summary.offensiveEfficiencyRank <= 3; | ||
return summary.offensiveEfficiencyRank <= 5; | ||
}).map(summary => { | ||
@@ -216,3 +216,3 @@ return { | ||
}).sort((a, b) => { | ||
return a.offRank - b.offRank; | ||
return a.offensiveEfficiencyRank - b.offensiveEfficiencyRank; | ||
}); | ||
@@ -219,0 +219,0 @@ |
{ | ||
"name": "@sahirb/nba-stats", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "NBA data and Javascript APIs to access stats. Also the util APIs that were used to build the stats files.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,6 +1,12 @@ | ||
[![npm](https://img.shields.io/npm/v/@sahirb/nba-stats?style=for-the-badge)](https://www.npmjs.com/package/@sahirb/nba-stats) | ||
Making NBA data more accessible for fellow fanatics! 🏀 🤗 | ||
# i. NBA Data 🧬 🧱 | ||
Local copy of data with functions to access - with these building blocks the possibilities are endless! 😬 | ||
## **Installation** | ||
```bash | ||
npm install @sahirb/nba-stats | ||
``` | ||
## **What can I use it for?** | ||
🚦 No more getting rate limited by web apis | ||
@@ -12,11 +18,17 @@ | ||
Current Data: | ||
Game scores with season averages `[2003-2023 (20 seasons)]` | ||
- Points scored in each quarter | ||
- Team rank per season | ||
- Points per game | ||
- Pace | ||
- Offensive/defensive efficiency | ||
## **NBA Data 🧬 🧱** | ||
Local copy of data with functions to access - with these building blocks the possibilities are endless! 😬 | ||
| Stat | Season | Notes | | ||
| --- | --- | --- | | ||
| Points per quarter | <code>[2003-2023 (20 seasons)]</code> | basketball-reference.com/boxscores | ||
| Possessions per game | | basketball-reference.com/teams | ||
| Offensive/defensive efficiency | | basketball-reference.com/boxscores | ||
| Points per game | | derived from points per quarter | ||
| Points per possession | | derived | ||
... and some others you'd reasonably expect 🥳 | ||
Possible Future Data: | ||
@@ -38,5 +50,5 @@ - Betting lines | ||
const sortedTop3 = bref.getSeasonSummaries(year) | ||
const sortedTop5 = bref.getSeasonSummaries(year) | ||
.filter(summary => { | ||
return summary.offensiveEfficiencyRank <= 3; | ||
return summary.offensiveEfficiencyRank <= 5; | ||
}).map(summary => { | ||
@@ -71,2 +83,10 @@ return { | ||
{ | ||
teamName: 'Boston', | ||
offensiveEfficiencyRank: 2, | ||
pointsRank: 4, | ||
offensiveEfficiency: 118, | ||
points: 117.9390243902439, | ||
pace: 98.5 | ||
}, | ||
{ | ||
teamName: 'New York', | ||
@@ -78,10 +98,2 @@ offensiveEfficiencyRank: 3, | ||
pace: 97.1 | ||
}, | ||
{ | ||
teamName: 'Boston', | ||
offensiveEfficiencyRank: 2, | ||
pointsRank: 4, | ||
offensiveEfficiency: 118, | ||
points: 117.9390243902439, | ||
pace: 98.5 | ||
} | ||
@@ -200,3 +212,3 @@ ] | ||
# ii. Parse basketball-reference.com | ||
## **Parse basketball-reference.com** | ||
Parse basketball-reference.com for NBA data! 🏀 🧬 | ||
@@ -203,0 +215,0 @@ |
350
6941960
45