espn-api
espn-api copied to clipboard
Injury Status for BoxPlayer is Incorrect
Sport
Football
Summary
The BoxPlayer object holds information about a performance from a player in a week.
It has fields injured and injuryStatus to represent the player's injury status for that week.
These seem to always be: injured=False and injuryStatus='ACTIVE' whether the player was active or not.
Logs/Data
Example:
Derrick Henry for the 2021 season. DH missed multiple games due to injury in 2021, yet his BoxPlayer objects have the injured and injuryStatus fields showing he was healthy.
This seems to possibly be an issue with the API itself, as I cannot find a call where there is an accurate injury designation.
Example REST Call: https://fantasy.espn.com/apis/v3/games/ffl/seasons/2021/segments/0/leagues/68827904?view=mMatchupScore&view=mScoreboard&scoringPeriodId=7
(search for '"injured": true' in the response) Only Calvin Ridley ?? shows up.
Yeah that is strange because parsing the injury status is pretty simple. I will have to look through the data and see where ESPN's site is getting the injured status.
I think this issue should be closed. At least the information for Brian Robinson in week 1 is correct, i.e. he is injured and is out
Player(Brian Robinson, points:0.0, projected:0.0)
(Pdb) p games_in_week[5].away_lineup[11].injured
True
(Pdb) p games_in_week[5].away_lineup[11].injuryStatus
'OUT'
@Kjeldgaard The original issue is still there.
If you read the original post and look at the injured field there are only 2 players from 2021 that are marked as injured.
I think we can agree that there were more than 2 injured players from 2021.
@joeyagreco I agree it seems odd that only Calvin Ridley and Elijah Moore was marked as injured in 2021. However, since the 2022 dataset seems to be okay, I assume it is not an error in espn-api. Furthermore, if you look at the Boxscore/Matchup page on https://fantasy.espn.com/football/boxscore?leagueId=INSERTLEAGUEID&matchupPeriodId=3&seasonId=2022&teamId=4 the injury information is not shown.
@Kjeldgaard Interesting, If I go to that link you sent but change the year to 2021 I can see the injury designations from that period (example, DeAndre Hopkins is Questionable in 2021 week 3 but has no injury designation in 2020 week 3.
I think I do see the issue... it doesn't seem ESPN stores historical league data for non-starters, which is why in my case, a team played Calvin Ridley that week when they were out but it is very uncommon for a team to start a player that is out.
So I think you are right in that this is an ESPN issue and not the library's fault for returning this data.
Thanks @Kjeldgaard and @joeyagreco for looking a little deeper into this! I know in the past ESPN has scrubbed some historical data or they don't keep all of it depending on the API you are calling.