Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

See player position at time of game #242

Open
ryantuck opened this issue Jul 16, 2017 · 2 comments
Open

See player position at time of game #242

ryantuck opened this issue Jul 16, 2017 · 2 comments

Comments

@ryantuck
Copy link

ryantuck commented Jul 16, 2017

I noticed that retired players have both position and team labeled UNK:

nfldb=# select * from player where full_name = 'Donovan McNabb';
-[ RECORD 1 ]--+--------------------------------------------------------
player_id      | 00-0011022
gsis_name      | D.McNabb
full_name      | Donovan McNabb
first_name     | Donovan
last_name      | McNabb
team           | UNK
position       | UNK
profile_id     | 2502044
profile_url    | http:https://www.nfl.com/player/donovanmcnabb/2502044/profile
uniform_number |
birthdate      | 11/25/1976
college        | Syracuse
height         | 74
weight         | 240
years_pro      | 13
status         | Unknown

This is problematic when attempting to run historical performance analysis for all QBs and Donovan McNabb is nowhere to be found (after filtering my query on position = 'QB').

No immediate solution to this problem presents itself after perusing the data model. I imagine I could remove the requirement that a player is a QB and simply analyze anyone who had meaningful passing yards in a given game, and back into whatever team they were on at the time a la the solution provided in #176. This would be a good-enough workaround for my purposes.

Am I missing something here, or is there no way to get a historical position?

@ryantuck ryantuck changed the title See position as time of game See player position at time of game Jul 16, 2017
@CPOConnor
Copy link

I had the same issue. I concluded there's really no consistent way to determine the position based on stats either (how would you tell a WR from a TE? Receiving stats + height/weight ratio? Still unreliable)

I ended up running a script that parsed retired player positions out of Pro Football Reference's csv files (http:https://static.pfref.com/years/2010/fantasy.htm) and updated that player's position in Postgres. I joined the PG data with the csv's on unknown player's full names and PG birthdates equaling Pro Football Reference ages. Kinda an invasive solution, and not 100% accurate (I'm sure I updated some retired WR named Chris Johnson to have the RB position or something like that).

Overall it made my life a lot easier, but note there are costs if you decide to go this route. Let me know if you'd like to use my code.

@andymiller-og
Copy link

@ryantuck feeling your pain.
@CPOConnor would love if you would share your code... Would be much MUCH appreciated. [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants