python library for interacting with NFL data sourced from nflfastR
Project description
nfl_data_py
nfl_data_py is a Python library for interacting with NFL data sourced from nflfastR (https://github.com/nflverse/nflfastR-data/) and nfldata (https://github.com/nflverse/nfldata/).
Installation
Use the package manager pip to install nfl_data_py.
pip install nfl_data_py
Usage
import nfl_data_py as nfl
Working with play-by-play data
nfl.import_pbp_data(years, columns)
Returns play-by-play data for the years and columns specified
years : required, list of years to pull data for (earliest available is 1999)
columns : optional, list of columns to pull data for
nfl.see_pbp_cols()
returns list of columns available in play-by-play dataset
Working with weekly data
nfl.import_weekly_data(years, columns)
Returns weekly data for the years and columns specified
years : required, list of years to pull data for (earliest available is 1999)
columns : optional, list of columns to pull data for
nfl.see_weekly_cols()
returns list of columns available in weekly dataset
Working with seasonal data
nfl.import_seasonal_data(years)
Returns seasonal data, including various calculated market share stats
years : required, list of years to pull data for (earliest available is 1999)
Additional data imports
nfl.import_rosters(years, columns)
Returns roster information for years and columns specified
years : required, list of years to pull data for (earliest available is 1999)
columns : optional, list of columns to pull data for
nfl.import_win_totals(years)
Returns win total lines for years specified years : optional, list of years to pull
nfl.import_sc_lines(years)
Returns scoring lines for years specified years : optional, list of years to pull
nfl.import_officials(years)
Returns official information by game for the years specified years : optional, list of years to pull
nfl.import_draft_picks()
Returns list of draft picks for the years specified years : optional, list of years to pull
nfl.import_draft_values()
Returns relative values by generic draft pick according to various popular valuation methods
nfl.import_team_desc()
Returns dataframe with color/logo/etc information for all NFL team
nfl.import_schedules(years)
Returns dataframe with schedule information for years specified
years: required, list of years to pull data for (earliest available is 1999)
Additional features
nfl.clean_nfl_data(df)
Runs descriptive data (team name, player name, etc.) through various cleaning processes
df : required, dataframe to be cleaned
Recognition
I'd like to recognize all of Ben Baldwin, Sebastian Carl, and Lee Sharpe for making this data freely available and easy to access. I'd also like to thank Tan Ho, who has been an invaluable resource as I've worked through this project, and Josh Kazan for the resources and assistance he's provided.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nfl_data_py-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 554e71a39abc2e4fdf296e620805a63be6b045e63aa5161f37f1139b83472a08 |
|
MD5 | d5e05321245adc188921261d10625e28 |
|
BLAKE2b-256 | 37b670dfb440453c60d24c2ac799b3df4002e0b9156a631a71bdd79968d38ee5 |