The National Football League Fixture Statistics Aggregator.
In the script's current state, it produces a JSON file in the format:
{
"<Week #>":[
{
"<Fixture Id>": {
"player_data": {
"<player_id>": {...},
"<player_id>": {...},
...
},
"fixture_data": {
"home_stat": {...},
"vis_stat": {...}
},
"pbp_data": [
{
"details": "...",
"players": [
("<player_id>", "<player_name>"),
("<player_id>", "<player_name>"),
...
]
}
]
}
},
{
"<Fixture Id>": {
"player_data": {
"<player_id>": {...},
"<player_id>": {...},
...
},
"fixture_data": {
"home_stat": {...},
"vis_stat": {...}
},
"pbp_data": [
{
"details": "...",
"players": [
("<player_id>", "<player_name>"),
("<player_id>", "<player_name>"),
...
]
}
]
}
},
...
]
}
Currently, data is only grabbed per individual week, but functionality can easily be expanded to process multiple weeks or years at a time.
Data sourced from Pro Footall Reference.
Do not violate any of PFR's Data Use and Bot Traffic policies. Any violations will possibly result in a site ban.
Due to necessary sleep()
functions embedded in the code, this script will be too slow to be called from within another program and should be run independently.