roclark / sportsipy

A free sports API written for python
MIT License
488 stars 189 forks source link

Playoff indicator #78

Closed zakraicik closed 5 years ago

zakraicik commented 5 years ago

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like Boxscore_ID should be updated to include a playoff vs. regular season indicator.

Describe alternatives you've considered I can manually assign the indicator using the date but it would be nice for it to be built in.

This is how I made a makeshift indicator.

def playoff_ind(i):
    if i+1 <= 82:
        return 'N'
    if i+1 > 82:
        return 'Y'
    else:
        return None

sched = nba_schedue('BOS')
games = []
for i,game  in enumerate(sched):
    games.append(game.boxscore_index + playoff_ind(i))
roclark commented 5 years ago

Hello again @zakraicik! Great idea! It makes a lot of sense to add an indicator for playoff games, but I would just hesitate to combine it with the boxscore index since the index is used to match a specific game and adds parity to the website. Perhaps I could add another property to specify whether a game is in the playoffs or not. I actually include this property in a few of the other sports, so it would be good to include this with NBA as well to ensure a common API. Any thoughts on this?