Skip to content

Commit

Permalink
Adding files for publisj
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperdff committed Jul 29, 2021
1 parent b9065f4 commit cc854dc
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 0 deletions.
Binary file added dist/nfl_data_py-0.1.0-py3-none-any.whl
Binary file not shown.
Binary file added dist/nfl_data_py-0.1.0.tar.gz
Binary file not shown.
152 changes: 152 additions & 0 deletions nfl_data_py.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
Metadata-Version: 2.1
Name: nfl-data-py
Version: 0.1.0
Summary: Package for working with NFL data
Home-page: https://github.com/cooperdff/nfl_data_py
Author: cooperdff
Author-email: [email protected]
License: MIT
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](https://pip.pypa.io/en/stable/) to install nfl_data_py.

```bash
pip install nfl_data_py
```

## Usage

```python
import nfl_data_py as nfl
```

**Working with play-by-play data**
```python
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

```python
nfl.see_pbp_cols()
```
returns list of columns available in play-by-play dataset

**Working with weekly data**
```python
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

```python
nfl.see_weekly_cols()
```
returns list of columns available in weekly dataset

**Working with seasonal data**
```python
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**
```python
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

```python
nfl.import_win_totals(years)
```
Returns win total lines for years specified
years
: optional, list of years to pull

```python
nfl.import_sc_lines(years)
```
Returns scoring lines for years specified
years
: optional, list of years to pull

```python
nfl.import_officials(years)
```
Returns official information by game for the years specified
years
: optional, list of years to pull

```python
nfl.import_draft_picks()
```
Returns list of draft picks for the years specified
years
: optional, list of years to pull

```python
nfl.import_draft_values()
```
Returns relative values by generic draft pick according to various popular valuation methods
```python
nfl.import_team_desc()
```
Returns dataframe with color/logo/etc information for all NFL team

```python
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**
```python
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](https://twitter.com/benbbaldwin), [Sebastian Carl](https://twitter.com/mrcaseb), and [Lee Sharpe](https://twitter.com/LeeSharpeNFL) for making this data freely available and easy to access. I'd also like to thank [Tan Ho](https://twitter.com/_TanH), 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
[MIT](https://choosealicense.com/licenses/mit/)

Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6
Description-Content-Type: text/markdown
7 changes: 7 additions & 0 deletions nfl_data_py.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
README.md
setup.py
nfl_data_py.egg-info/PKG-INFO
nfl_data_py.egg-info/SOURCES.txt
nfl_data_py.egg-info/dependency_links.txt
nfl_data_py.egg-info/requires.txt
nfl_data_py.egg-info/top_level.txt
1 change: 1 addition & 0 deletions nfl_data_py.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

6 changes: 6 additions & 0 deletions nfl_data_py.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
numpy>1
pandas>1
datetime>3.5
fastparquet>0.5
python-snappy>0.5
snappy>1
1 change: 1 addition & 0 deletions nfl_data_py.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nfl_data_py
38 changes: 38 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from setuptools import setup

# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

setup(
name='nfl_data_py',
version='0.1.0',
description='Package for working with NFL data',
author='cooperdff',
author_email='[email protected]',
url='https://github.com/cooperdff/nfl_data_py',
license='MIT',
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
packages=['nfl_data_py'],
package_dir={'nfl_data_py': ''},
python_requires='>=3.6',
install_requires=[
'numpy>1',
'pandas>1',
'datetime>3.5',
'fastparquet>0.5',
'python-snappy>0.5',
'snappy>1',
],
long_description=long_description,
long_description_content_type='text/markdown'
)

0 comments on commit cc854dc

Please sign in to comment.