Nflfastpy Save Abandoned

Python package for loading nflfastR play by play data

Project README

nflfastpy

This is a Python package for easily loading NFL play by play data via nflfastR

Installing nflfastpy

nflfastpy is available on PyPI

$ pip install nflfastpy

nflfastpy supports Python 3.6+

Usage

Loading Play by Play Data

Play by play data is available going back to 1999.

import nflfastpy

df = nflfastpy.load_pbp_data(year=2020)

Loading Roster Data

Roster data comes with player headshots. Rookies are not included in roster data as roster data is only available up to 2019. To account for this, a variable is available in the module called nflfastpy.default_headshot that is a numpy array representation of a default player headshot.

roster_df = nflfastpy.load_roster_data()

Joining Roster Data and Team Logo Data with Play by Play Data

To join roster data with play by play data, player id's in the play by play data must be converted to the old GSIS ID. The helper function in nflfastpy.utils.convert_to_gsis_id accomplishes this. Check out the file named "Roster Data and Team Logo Data.ipynb" under the examples folder to see how to use the function.

Loading Schedule Data

Schedule data is available from 1999 to 2020.

schedule = nflfastpy.load_schedule_data(year=2020)
Open Source Agenda is not affiliated with "Nflfastpy" Project. README Source: fantasydatapros/nflfastpy
Stars
63
Open Issues
2
Last Commit
2 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating