BurntSushi / nfldb

A library to manage and update NFL data in a relational database.
The Unlicense
1.08k stars 264 forks source link

Game gsis_id = 2017111911 missing in schedule.json (Ochawkeye issue #298) #308

Open MargareeMan opened 5 years ago

MargareeMan commented 5 years ago

@ochawkeye provided a link to his schedule.json file in issue #298. This was greatly appreciated and allowed me to reinstall and update my nfldb installation.

However, his schedule.json file is missing an entry for gsis_id 2017111911 (TB at MIA) .

When nfldb-update is run with this incomplete schedule.json file, the data for this game is not inserted into the game, drive, play, or play_player tables and the agg_play table is not updated to contain the aggregate stats.

The relevant game data is:

[ "2017111911", { "away": "TB", "day": 19, "eid": "2017111911", "gamekey": "57241", "home": "MIA", "month": 11, "season_type": "REG", "time": "1:00", "wday": "Sun", "week": 11, "year": 2017 } ],

If you insert this into your schedule.json file and run nfldb-update, the game record is inserted into nfldb; but no game data is updated.

Therefore, I am providing the necessary files to insert into nfldb. (if you already updated schedule.json and run nfldb-update; then first delete the empty game record with:

DELETE FROM game WHERE gsis_id = '2017111911'

Then import the data from the .tsv files at: " https://github.com/MargareeMan/Data-for-nfldb-gsis_id-2017111911"

(As I seem to be having trouble with the link, I am uploading the files here. I had trouble importing the last drive of the game (drive_id 25) due to a null value. So, one of the files is a SQL INSERT for this record.

drive_id__ 25 FROM_driveWHERE_gsis_id2017111911.txt FROM_agg_playWHERE_gsis_id2017111911.txt FROM_driveWHEREgsis_id__2017111911.txt FROM_gameWHERE_gsis_id2017111911.txt FROM_playWHERE_gsis_id20171119110.txt FROM_play_playerWHERE_gsis_id2017111911.txt

INSERT for drive_id 25.txt