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

re: Missing ID's #1

Open
gRooster opened this issue Jun 27, 2020 · 0 comments
Open

re: Missing ID's #1

gRooster opened this issue Jun 27, 2020 · 0 comments

Comments

@gRooster
Copy link

gRooster commented Jun 27, 2020

Hello, I think I figured out how the game ID's (EID) are generated (using a pretty simple formula based on the schedule), so it should be fairly easy to generate the missing ID's.

The EID appears to be in this format [4 Digit Year][2 Digit Month][2 Digit Day][00] for regular and post season games, where 00 is the starting number which is incremented by one for each game, on each game day.

e.g.
Take the schedule and sort it by date, "time", and the "home" team (using NFL's official team abbrev I think?). Then for each game day, number the teams (starting at 00) by their (2 digit) sorted position. So, the earliest game on each day, with the "home" team that comes first alphabetically (out of all the games playing that day, at the time) gets the first EID (00). The earliest game on that day, with the "home" team that comes second alphabetically (out of all the games playing that day, at that time) gets the second EID (01), etc (adding one each time). When you hit a new (later) time (on the same day), the home team that comes first alphabetically (out of all the team playing at that time, that day), will get the next EID (the last EID used plus 1) and so on.

For example, take this season, week 1: https://www.nfl.com/schedules/2020/reg1/
The first game is on 09/10/2020 and it is the only game that day.
The EID should be [YEAR][MONTH][DAY][00] or [2020][09][10][00]: 2020091000

Then on Sunday (09/13), the are 9, 1:00 games. Sorting those 9 games by "home", "ATL" should come first, thus Seahawks @ Falcons gets the first EID that day (new day, so we start at 00 again), or 2020091300.
"BAL" would come second, thus, Browns @ Ravens should get the next EID, or 2020091301.
"BUF" would come third thus Jets @ Bills would get the next EID, or 2020091302.
...
with the last team playing at 1:00 getting EID 2020091308.
Then there is only 1 game a 4:05, so that game gets the next EID, or 2020091309.

There are 2 games at 4:25, with "NO" coming before "SF" so Buccaneers @ Saints gets the next EID ...10. followed by Cardinals @ 49ers ...11.

The next game is at 8:20, and is the only game at the time, thus gets the next EID ...12, and it is the final game for that day.

Then on Monday (9/14), there are only 2 games, and they are at different times, so the first game gets the first id (new day so we start at 00 again), so Steelers @ Giants should be 2020091400 and Titans @ Broncos should be 2020091401.

Preseason games seem to follow the same format but use a different number to begin counting. It seems most recently it uses 51 as the starting number, though, looking back to 2009, it seems they may have used 50 at one point.

I am also not sure about Flex scheduling and/or games that got rescheduled for other reasons (but I would guess a new EID would be used based on new date, etc).

This method seems correct as far as I can tell (searching Google for the above EID's does return results matching the correct games). I hope this is useful.

edit: Nevermind, it seems that the format has changed (or I had it wrong), but as the game ID's can now be found on the static.nfl.com site, there is no need try and figure them out (if there is still any use for them, as most of the api is not accessible)

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

1 participant