AllenMattson / fantasy-csv-data

Fantasy Football data in the form of CSV files available for use in pandas, R, excel etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fantasy Football Data Sets

If you are looking to run the scripts we've provided for locally updating data, clone this repo and install dependencies.

pip install -r requirements.txt

Strength of Schedule data

Strength of Schedule data is available in the sos directory. Data is available going back to 1999. To load this data in pandas using the following the following url format: https://raw.githubusercontent.com/fantasydatapros/data/master/sos/{year}.csv

For example, in pandas do the following:

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/fantasydatapros/data/master/sos/1999.csv', index_col=0)
df.index = df.index.rename('Team')

Weekly Fantasy Stats

Weekly stats going back to 1999 are available are exposed through the following url format

https://raw.githubusercontent.com/fantasydatapros/data/master/weekly/{year}/week{week}.csv

To grab weekly data for year 2019, week 1 in pandas, you would do:

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/fantasydatapros/data/master/weekly/2019/week1.csv')

Yearly Fantasy stats

Yearly fantasy stats are available going back to 1970.

The url format: https://raw.githubusercontent.com/fantasydatapros/data/master/yearly/{year}.csv

To grab yearly data for 2019 in pandas, do the following:

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/fantasydatapros/data/master/yearly/2019.csv')

About

Fantasy Football data in the form of CSV files available for use in pandas, R, excel etc.


Languages

Language:Python 100.0%