[Basketball] Having trouble finding specific stats for player positions and lineup slots #545
-
So I'm actually working with WNBA data, which I know is in development, but seems to have mostly the same code as NBA. My overall goal is to list my team's lineup and highlight players that are currently in my lineup that are injured or don't have games today. I have been able to accomplish this in a general sense, pulling player injury data and pulling the full schedule with _get_all_pro_schedule() and comparing pro teams to the schedule to see if today is present in the game list. This all works fine. The problem arises with specific slots. I would like to know who is in my current lineup (meaning not in bench or IR slots) and which position each player is. I checked through teams, matchups, and box scores, and am not seeing a way to see who is in an active slot, just a general list of my players. Additionally, position doesn't match what is on the ESPN GUI and eligible slots list all slots for every player. Is this because it is WNBA and not built out yet? For example: A'ja Wilson is a Center (on ESPN's main site), but listed as an SG in the API for position. Slot shows F, which is fine for F/C. Is there an accurate way to get the correct data here, or is this not present for WNBA? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @zirekyle, you can get the slot position using box_scores and then accessing the teams lineup. Accessing would look something like this For the players position and lineup I am seeing the same thing where they are not correctly matching. Those values are set in this constants file and seems like they were just copied over from the NBA constants. The hard part of getting the correct values is having to look through ESPN's API calls and manually match those numbers to the actual positions. I have a PR Here which I think has most of the positions, I still can't figure out what position 8 and 9 are. |
Beta Was this translation helpful? Give feedback.
Hey @zirekyle, you can get the slot position using box_scores and then accessing the teams lineup. Accessing would look something like this
box[0].away_lineup[0].slot_position
assumingbox
was the retuned valued frombox_scores
.For the players position and lineup I am seeing the same thing where they are not correctly matching. Those values are set in this constants file and seems like they were just copied over from the NBA constants. The hard part of getting the correct values is having to look through ESPN's API calls and manually match those numbers to the actual positions.
I have a PR Here which I think has most of the positions, I still can't figure out what position 8 and 9 are.