cwendt94 / espn-api

ESPN Fantasy API! (Football, Basketball)
MIT License
613 stars 198 forks source link

meaning of statistics keys #478

Open carlobongiovanni opened 11 months ago

carlobongiovanni commented 11 months ago

Sport

Basketball

Summary

hi, has anybody understood what is the meaning of those statistics which have a number as key? For e.g.: in this example you can see that some keys in the stats["2024_projected"] are named 30, 31, 32, etc..

Kemba Walker 6479 [] DAL PG {'applied_total': 19.0, 'applied_avg': 19.0, 'team': None, 'date': None, 'avg': {'PTS': 12.0, 'STL': 1.0, 'AST': 4.0, 'REB': 3.0, 'TO': 1.0, 'FGM': 4.0, 'FGA': 11.0, 'FTM': 2.0, 'FTA': 3.0, '3PTM': 2.0, '3PTA': 6.0, 'FG%': 0.412, 'FT%': 0.86, '3PT%': 0.35, '23': 7.0, '24': 1.0, '25': 4.0, '26': 3.6, '27': 0.2, 'MPG': 25.3, '29': 13.0442, '30': 3.0, '31': 0.7, '32': 1.3, '33': 2.0, '34': 0.52, '35': 4.0, '36': 1.0, 'MIN': 25.3, 'GP': 1.0}, 'total': {'PTS': 12.0, 'STL': 1.0, 'AST': 4.0, 'REB': 3.0, 'TO': 1.0, 'FGM': 4.0, 'FGA': 11.0, 'FTM': 2.0, 'FTA': 3.0, '3PTM': 2.0, '3PTA': 6.0, 'FG%': 0.412, 'FT%': 0.86, '3PT%': 0.35, '23': 7.0, '24': 1.0, '25': 4.0, '26': 3.6, '27': 0.2, 'MPG': 25.3, '29': 13.0442, '30': 3.0, '31': 0.7, '32': 1.3, '33': 2.0, '34': 0.52, '35': 4.0, '36': 1.0, 'MIN': 25.3, 'GP': 1.0}}

thanks

Logs/Data

No response

bigkho commented 11 months ago

I don't know why they're bothered to be mapped but I'm pretty sure it's just filler repeating stats. The API seems to just have a list from 0-40 ish and has a lot of miscellaneous stats that just appear to repeat itself. The author of this API has correctly mapped each stat, and ignored the ones that have no significance by mapping it with their index it seems. I don't think you gotta worry too much about those, and I hope this helps.

cwendt94 commented 11 months ago

Thanks @bigkho, yeah we tried to map all of the important stats and hopefully haven't missed any. The ones that are numbered and don't have a name basically means we don't know exactly what they are.

ESPN doesn't directly tell use the mapping so we have to do a lot of manual checking and figuring it from their UI to then the data. If you are looking for a stat that is not named in the API it could possibly be one of those numbers. But like @bigkho said they do have a lot of random/repeated stats as well.

samthom1 commented 11 months ago

The only one I've found significance in is the '30' in Hockey denotes to games appeared in. There are separate mappings for goalie games started and skater games played, but the '30' field universally indicates the number of games a player actually appeared in.